From 3319d951f231ef97170b499ce246657382fccfd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 19 Aug 2015 21:11:59 -0700 Subject: [PATCH 1/9] Clean up gitignore --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f79785ad..bf4d9877 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ local.properties # Gradle generated files .gradle/ +build/ # Signing files .signing/ @@ -25,5 +26,3 @@ local.properties .Trashes ehthumbs.db Thumbs.db -gen/ -module_android-smsmms.xml From 7c8f671e5ddb99250003729e428ce01db7ea0cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 19 Aug 2015 21:12:04 -0700 Subject: [PATCH 2/9] Bump gradle plugin version --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 58264c23..e51aef8b 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,6 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:1.3.1' } } From ef576d05ad87629260b4e17f4c3f32b36f3a6cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 19 Aug 2015 21:13:02 -0700 Subject: [PATCH 3/9] Bump gradle to 2.4 --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d53a7f32..b6c4b948 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip From 20aed8e760c4405bbd86680a523d88814396b19d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 19 Aug 2015 21:14:47 -0700 Subject: [PATCH 4/9] Deduplicate buildscript gradle setup --- QKSMS/build.gradle | 9 --------- 1 file changed, 9 deletions(-) diff --git a/QKSMS/build.gradle b/QKSMS/build.gradle index 52c50486..20f01b7e 100644 --- a/QKSMS/build.gradle +++ b/QKSMS/build.gradle @@ -1,11 +1,3 @@ -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' - } -} apply plugin: 'com.android.application' repositories { @@ -16,7 +8,6 @@ android { lintOptions { checkReleaseBuilds false abortOnError false - } compileSdkVersion 22 From c6a69a303c6a1671f197b8ac1927cb14acaa390a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 19 Aug 2015 21:14:55 -0700 Subject: [PATCH 5/9] Bump support libraries point release --- QKSMS/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/QKSMS/build.gradle b/QKSMS/build.gradle index 20f01b7e..086a5496 100644 --- a/QKSMS/build.gradle +++ b/QKSMS/build.gradle @@ -48,9 +48,9 @@ dependencies { compile 'com.koushikdutta.ion:ion:1.1.7' // Google libraries - compile 'com.android.support:appcompat-v7:22.2.0' - compile 'com.android.support:support-v13:22.2.0' - compile 'com.android.support:recyclerview-v7:22.2.0' + compile 'com.android.support:appcompat-v7:22.2.1' + compile 'com.android.support:support-v13:22.2.1' + compile 'com.android.support:recyclerview-v7:22.2.1' compile 'com.google.android.gms:play-services-analytics:7.5.0' // External services From 1456c674a895c8338d68e23059e282c46ade22e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 19 Aug 2015 21:18:04 -0700 Subject: [PATCH 6/9] Bump buildToolsVersion to 23.0.0 --- .travis.yml | 2 +- QKSMS/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6e20d1a7..53f09134 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ android: - tools # The BuildTools version used by your project - - build-tools-22.0.1 + - build-tools-23.0.0 # The SDK version used to compile your project - android-22 diff --git a/QKSMS/build.gradle b/QKSMS/build.gradle index 086a5496..25f5f464 100644 --- a/QKSMS/build.gradle +++ b/QKSMS/build.gradle @@ -11,7 +11,7 @@ android { } compileSdkVersion 22 - buildToolsVersion '22.0.1' + buildToolsVersion '23.0.0' defaultConfig { versionCode 110 From d449b990fffb401f34a50369796f1d08aae116d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 19 Aug 2015 21:20:56 -0700 Subject: [PATCH 7/9] Disable proguard optimizations They cause more trouble than anything. Obfuscation is also pointless for free software apps, if anything it only makes debugging harder. --- QKSMS/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QKSMS/build.gradle b/QKSMS/build.gradle index 25f5f464..b6ece62a 100644 --- a/QKSMS/build.gradle +++ b/QKSMS/build.gradle @@ -24,7 +24,7 @@ android { release { minifyEnabled true shrinkResources true - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'qksms-proguard.pro' + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'qksms-proguard.pro' } } } From 744fc050e79a74f5cd8a84ece3df4282a5015835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 19 Aug 2015 21:22:14 -0700 Subject: [PATCH 8/9] Remove manifest merger report file --- QKSMS/manifest-merger-release-report.txt | 822 ----------------------- 1 file changed, 822 deletions(-) delete mode 100644 QKSMS/manifest-merger-release-report.txt diff --git a/QKSMS/manifest-merger-release-report.txt b/QKSMS/manifest-merger-release-report.txt deleted file mode 100644 index 45567444..00000000 --- a/QKSMS/manifest-merger-release-report.txt +++ /dev/null @@ -1,822 +0,0 @@ --- Merging decision tree log --- -manifest -ADDED from AndroidManifest.xml:2:1 - package - ADDED from AndroidManifest.xml:3:5 - android:versionName - INJECTED from AndroidManifest.xml:0:0 - INJECTED from AndroidManifest.xml:0:0 - xmlns:android - ADDED from AndroidManifest.xml:4:5 - android:versionCode - INJECTED from AndroidManifest.xml:0:0 - INJECTED from AndroidManifest.xml:0:0 -uses-permission#android.permission.ACCESS_COARSE_LOCATION -ADDED from AndroidManifest.xml:6:5 - android:name - ADDED from AndroidManifest.xml:6:22 -uses-permission#android.permission.ACCESS_FINE_LOCATION -ADDED from AndroidManifest.xml:7:5 - android:name - ADDED from AndroidManifest.xml:7:22 -uses-permission#android.permission.ACCESS_NETWORK_STATE -ADDED from AndroidManifest.xml:8:5 -MERGED from com.google.android.gms:play-services-analytics:7.5.0:22:5 - android:name - ADDED from AndroidManifest.xml:8:22 -uses-permission#android.permission.ACCESS_WIFI_STATE -ADDED from AndroidManifest.xml:9:5 - android:name - ADDED from AndroidManifest.xml:9:22 -uses-permission#android.permission.CALL_PHONE -ADDED from AndroidManifest.xml:10:5 - android:name - ADDED from AndroidManifest.xml:10:22 -uses-permission#android.permission.CAMERA -ADDED from AndroidManifest.xml:11:5 - android:name - ADDED from AndroidManifest.xml:11:22 -uses-permission#android.permission.CHANGE_CONFIGURATION -ADDED from AndroidManifest.xml:12:5 - android:name - ADDED from AndroidManifest.xml:12:22 -uses-permission#android.permission.CHANGE_NETWORK_STATE -ADDED from AndroidManifest.xml:13:5 - android:name - ADDED from AndroidManifest.xml:13:22 -uses-permission#android.permission.CHANGE_WIFI_STATE -ADDED from AndroidManifest.xml:14:5 - android:name - ADDED from AndroidManifest.xml:14:22 -uses-permission#android.permission.FLASHLIGHT -ADDED from AndroidManifest.xml:15:5 - android:name - ADDED from AndroidManifest.xml:15:22 -uses-permission#android.permission.GET_ACCOUNTS -ADDED from AndroidManifest.xml:16:5 - android:name - ADDED from AndroidManifest.xml:16:22 -uses-permission#android.permission.INTERNET -ADDED from AndroidManifest.xml:17:5 -MERGED from com.google.android.gms:play-services-analytics:7.5.0:21:5 - android:name - ADDED from AndroidManifest.xml:17:22 -uses-permission#android.permission.MANAGE_ACCOUNTS -ADDED from AndroidManifest.xml:18:5 - android:name - ADDED from AndroidManifest.xml:18:22 -uses-permission#android.permission.NFC -ADDED from AndroidManifest.xml:19:5 - android:name - ADDED from AndroidManifest.xml:19:22 -uses-permission#android.permission.READ_CALL_LOG -ADDED from AndroidManifest.xml:20:5 - android:name - ADDED from AndroidManifest.xml:20:22 -uses-permission#android.permission.READ_CONTACTS -ADDED from AndroidManifest.xml:21:5 - android:name - ADDED from AndroidManifest.xml:21:22 -uses-permission#android.permission.READ_PHONE_STATE -ADDED from AndroidManifest.xml:22:5 - android:name - ADDED from AndroidManifest.xml:22:22 -uses-permission#android.permission.READ_PROFILE -ADDED from AndroidManifest.xml:23:5 - android:name - ADDED from AndroidManifest.xml:23:22 -uses-permission#android.permission.READ_EXTERNAL_STORAGE -ADDED from AndroidManifest.xml:24:5 - android:name - ADDED from AndroidManifest.xml:24:22 -uses-permission#android.permission.READ_SMS -ADDED from AndroidManifest.xml:25:5 - android:name - ADDED from AndroidManifest.xml:25:22 -uses-permission#android.permission.RECEIVE_BOOT_COMPLETED -ADDED from AndroidManifest.xml:26:5 - android:name - ADDED from AndroidManifest.xml:26:22 -uses-permission#android.permission.RECEIVE_MMS -ADDED from AndroidManifest.xml:27:5 - android:name - ADDED from AndroidManifest.xml:27:22 -uses-permission#android.permission.RECEIVE_SMS -ADDED from AndroidManifest.xml:28:5 - android:name - ADDED from AndroidManifest.xml:28:22 -uses-permission#android.permission.RECORD_AUDIO -ADDED from AndroidManifest.xml:29:5 - android:name - ADDED from AndroidManifest.xml:29:22 -uses-permission#android.permission.SEND_SMS -ADDED from AndroidManifest.xml:30:5 - android:name - ADDED from AndroidManifest.xml:30:22 -uses-permission#android.permission.SYSTEM_ALERT_WINDOW -ADDED from AndroidManifest.xml:31:5 - android:name - ADDED from AndroidManifest.xml:31:22 -uses-permission#android.permission.USE_CREDENTIALS -ADDED from AndroidManifest.xml:32:5 - android:name - ADDED from AndroidManifest.xml:32:22 -uses-permission#android.permission.VIBRATE -ADDED from AndroidManifest.xml:33:5 - android:name - ADDED from AndroidManifest.xml:33:22 -uses-permission#android.permission.WRITE_CONTACTS -ADDED from AndroidManifest.xml:34:5 - android:name - ADDED from AndroidManifest.xml:34:22 -uses-permission#android.permission.WAKE_LOCK -ADDED from AndroidManifest.xml:35:5 - android:name - ADDED from AndroidManifest.xml:35:22 -uses-permission#android.permission.WRITE_EXTERNAL_STORAGE -ADDED from AndroidManifest.xml:36:5 - android:name - ADDED from AndroidManifest.xml:36:22 -uses-permission#android.permission.WRITE_SMS -ADDED from AndroidManifest.xml:37:5 - android:name - ADDED from AndroidManifest.xml:37:22 -uses-permission#com.android.vending.BILLING -ADDED from AndroidManifest.xml:38:5 - android:name - ADDED from AndroidManifest.xml:38:22 -application -ADDED from AndroidManifest.xml:40:5 -MERGED from com.android.support:appcompat-v7:22.2.0:22:5 -MERGED from com.android.support:support-v4:22.2.0:22:5 -MERGED from qksms:qkms:unspecified:9:5 -MERGED from com.github.johnkil.android-robototextview:robototextview:2.1.0:11:5 -MERGED from com.melnykov:floatingactionbutton:1.3.0:12:5 -MERGED from com.android.support:support-v4:22.2.0:22:5 -MERGED from com.pushbullet:android-extensions:1.0.4:9:5 -MERGED from com.android.support:support-v4:22.2.0:22:5 -MERGED from com.nispok:snackbar:2.10.6:10:5 -MERGED from com.android.support:support-v4:22.2.0:22:5 -MERGED from com.android.support:appcompat-v7:22.2.0:22:5 -MERGED from com.android.support:support-v4:22.2.0:22:5 -MERGED from com.android.support:support-v13:22.2.0:22:5 -MERGED from com.android.support:support-v4:22.2.0:22:5 -MERGED from com.android.support:support-v4:22.2.0:22:5 -MERGED from com.google.android.gms:play-services-analytics:7.5.0:24:5 -MERGED from com.google.android.gms:play-services-base:7.5.0:20:5 -MERGED from com.android.support:support-v4:22.2.0:22:5 - android:label - ADDED from AndroidManifest.xml:44:9 - android:allowBackup - ADDED from AndroidManifest.xml:42:9 - android:icon - ADDED from AndroidManifest.xml:43:9 - android:largeHeap - ADDED from AndroidManifest.xml:45:9 - android:theme - ADDED from AndroidManifest.xml:46:9 - android:name - ADDED from AndroidManifest.xml:41:9 -activity#com.moez.QKSMS.ui.popup.QKComposeActivity -ADDED from AndroidManifest.xml:47:9 - android:excludeFromRecents - ADDED from AndroidManifest.xml:49:13 - android:windowSoftInputMode - ADDED from AndroidManifest.xml:52:13 - android:theme - ADDED from AndroidManifest.xml:51:13 - android:taskAffinity - ADDED from AndroidManifest.xml:50:13 - android:name - ADDED from AndroidManifest.xml:48:13 -intent-filter#android.intent.action.SEND+android.intent.action.SENDTO+android.intent.category.BROWSABLE+android.intent.category.DEFAULT -ADDED from AndroidManifest.xml:53:13 -action#android.intent.action.SEND -ADDED from AndroidManifest.xml:54:17 - android:name - ADDED from AndroidManifest.xml:54:25 -action#android.intent.action.SENDTO -ADDED from AndroidManifest.xml:55:17 - android:name - ADDED from AndroidManifest.xml:55:25 -category#android.intent.category.DEFAULT -ADDED from AndroidManifest.xml:57:17 - android:name - ADDED from AndroidManifest.xml:57:27 -category#android.intent.category.BROWSABLE -ADDED from AndroidManifest.xml:58:17 - android:name - ADDED from AndroidManifest.xml:58:27 -data -ADDED from AndroidManifest.xml:60:17 - android:scheme - ADDED from AndroidManifest.xml:60:23 -intent-filter#android.intent.action.SEND+android.intent.category.DEFAULT -ADDED from AndroidManifest.xml:65:13 -activity#com.moez.QKSMS.ui.MainActivity -ADDED from AndroidManifest.xml:80:9 - android:label - ADDED from AndroidManifest.xml:83:13 - android:launchMode - ADDED from AndroidManifest.xml:84:13 - android:windowSoftInputMode - ADDED from AndroidManifest.xml:86:13 - android:icon - ADDED from AndroidManifest.xml:82:13 - android:logo - ADDED from AndroidManifest.xml:85:13 - android:name - ADDED from AndroidManifest.xml:81:13 -intent-filter#android.intent.action.MAIN -ADDED from AndroidManifest.xml:87:13 -action#android.intent.action.MAIN -ADDED from AndroidManifest.xml:88:17 - android:name - ADDED from AndroidManifest.xml:88:25 -activity-alias#com.moez.QKSMS.ui.MainActivity-Teal -ADDED from AndroidManifest.xml:92:9 - android:enabled - ADDED from AndroidManifest.xml:94:13 - android:label - ADDED from AndroidManifest.xml:96:13 - android:targetActivity - ADDED from AndroidManifest.xml:97:13 - android:icon - ADDED from AndroidManifest.xml:95:13 - android:name - ADDED from AndroidManifest.xml:93:13 -intent-filter#android.intent.action.MAIN+android.intent.category.LAUNCHER -ADDED from AndroidManifest.xml:98:13 -category#android.intent.category.LAUNCHER -ADDED from AndroidManifest.xml:101:17 - android:name - ADDED from AndroidManifest.xml:101:27 -activity-alias#com.moez.QKSMS.ui.MainActivity-Red -ADDED from AndroidManifest.xml:104:9 - android:enabled - ADDED from AndroidManifest.xml:106:13 - android:label - ADDED from AndroidManifest.xml:108:13 - android:targetActivity - ADDED from AndroidManifest.xml:109:13 - android:icon - ADDED from AndroidManifest.xml:107:13 - android:name - ADDED from AndroidManifest.xml:105:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-Pink -ADDED from AndroidManifest.xml:116:9 - android:enabled - ADDED from AndroidManifest.xml:118:13 - android:label - ADDED from AndroidManifest.xml:120:13 - android:targetActivity - ADDED from AndroidManifest.xml:121:13 - android:icon - ADDED from AndroidManifest.xml:119:13 - android:name - ADDED from AndroidManifest.xml:117:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-Purple -ADDED from AndroidManifest.xml:128:9 - android:enabled - ADDED from AndroidManifest.xml:130:13 - android:label - ADDED from AndroidManifest.xml:132:13 - android:targetActivity - ADDED from AndroidManifest.xml:133:13 - android:icon - ADDED from AndroidManifest.xml:131:13 - android:name - ADDED from AndroidManifest.xml:129:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-DeepPurple -ADDED from AndroidManifest.xml:140:9 - android:enabled - ADDED from AndroidManifest.xml:142:13 - android:label - ADDED from AndroidManifest.xml:144:13 - android:targetActivity - ADDED from AndroidManifest.xml:145:13 - android:icon - ADDED from AndroidManifest.xml:143:13 - android:name - ADDED from AndroidManifest.xml:141:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-Indigo -ADDED from AndroidManifest.xml:152:9 - android:enabled - ADDED from AndroidManifest.xml:154:13 - android:label - ADDED from AndroidManifest.xml:156:13 - android:targetActivity - ADDED from AndroidManifest.xml:157:13 - android:icon - ADDED from AndroidManifest.xml:155:13 - android:name - ADDED from AndroidManifest.xml:153:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-Blue -ADDED from AndroidManifest.xml:164:9 - android:enabled - ADDED from AndroidManifest.xml:166:13 - android:label - ADDED from AndroidManifest.xml:168:13 - android:targetActivity - ADDED from AndroidManifest.xml:169:13 - android:icon - ADDED from AndroidManifest.xml:167:13 - android:name - ADDED from AndroidManifest.xml:165:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-LightBlue -ADDED from AndroidManifest.xml:176:9 - android:enabled - ADDED from AndroidManifest.xml:178:13 - android:label - ADDED from AndroidManifest.xml:180:13 - android:targetActivity - ADDED from AndroidManifest.xml:181:13 - android:icon - ADDED from AndroidManifest.xml:179:13 - android:name - ADDED from AndroidManifest.xml:177:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-Cyan -ADDED from AndroidManifest.xml:188:9 - android:enabled - ADDED from AndroidManifest.xml:190:13 - android:label - ADDED from AndroidManifest.xml:192:13 - android:targetActivity - ADDED from AndroidManifest.xml:193:13 - android:icon - ADDED from AndroidManifest.xml:191:13 - android:name - ADDED from AndroidManifest.xml:189:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-Green -ADDED from AndroidManifest.xml:200:9 - android:enabled - ADDED from AndroidManifest.xml:202:13 - android:label - ADDED from AndroidManifest.xml:204:13 - android:targetActivity - ADDED from AndroidManifest.xml:205:13 - android:icon - ADDED from AndroidManifest.xml:203:13 - android:name - ADDED from AndroidManifest.xml:201:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-LightGreen -ADDED from AndroidManifest.xml:212:9 - android:enabled - ADDED from AndroidManifest.xml:214:13 - android:label - ADDED from AndroidManifest.xml:216:13 - android:targetActivity - ADDED from AndroidManifest.xml:217:13 - android:icon - ADDED from AndroidManifest.xml:215:13 - android:name - ADDED from AndroidManifest.xml:213:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-Lime -ADDED from AndroidManifest.xml:224:9 - android:enabled - ADDED from AndroidManifest.xml:226:13 - android:label - ADDED from AndroidManifest.xml:228:13 - android:targetActivity - ADDED from AndroidManifest.xml:229:13 - android:icon - ADDED from AndroidManifest.xml:227:13 - android:name - ADDED from AndroidManifest.xml:225:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-Yellow -ADDED from AndroidManifest.xml:236:9 - android:enabled - ADDED from AndroidManifest.xml:238:13 - android:label - ADDED from AndroidManifest.xml:240:13 - android:targetActivity - ADDED from AndroidManifest.xml:241:13 - android:icon - ADDED from AndroidManifest.xml:239:13 - android:name - ADDED from AndroidManifest.xml:237:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-Amber -ADDED from AndroidManifest.xml:248:9 - android:enabled - ADDED from AndroidManifest.xml:250:13 - android:label - ADDED from AndroidManifest.xml:252:13 - android:targetActivity - ADDED from AndroidManifest.xml:253:13 - android:icon - ADDED from AndroidManifest.xml:251:13 - android:name - ADDED from AndroidManifest.xml:249:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-Orange -ADDED from AndroidManifest.xml:260:9 - android:enabled - ADDED from AndroidManifest.xml:262:13 - android:label - ADDED from AndroidManifest.xml:264:13 - android:targetActivity - ADDED from AndroidManifest.xml:265:13 - android:icon - ADDED from AndroidManifest.xml:263:13 - android:name - ADDED from AndroidManifest.xml:261:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-DeepOrange -ADDED from AndroidManifest.xml:272:9 - android:enabled - ADDED from AndroidManifest.xml:274:13 - android:label - ADDED from AndroidManifest.xml:276:13 - android:targetActivity - ADDED from AndroidManifest.xml:277:13 - android:icon - ADDED from AndroidManifest.xml:275:13 - android:name - ADDED from AndroidManifest.xml:273:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-Brown -ADDED from AndroidManifest.xml:284:9 - android:enabled - ADDED from AndroidManifest.xml:286:13 - android:label - ADDED from AndroidManifest.xml:288:13 - android:targetActivity - ADDED from AndroidManifest.xml:289:13 - android:icon - ADDED from AndroidManifest.xml:287:13 - android:name - ADDED from AndroidManifest.xml:285:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-Grey -ADDED from AndroidManifest.xml:296:9 - android:enabled - ADDED from AndroidManifest.xml:298:13 - android:label - ADDED from AndroidManifest.xml:300:13 - android:targetActivity - ADDED from AndroidManifest.xml:301:13 - android:icon - ADDED from AndroidManifest.xml:299:13 - android:name - ADDED from AndroidManifest.xml:297:13 -activity-alias#com.moez.QKSMS.ui.MainActivity-BlueGrey -ADDED from AndroidManifest.xml:308:9 - android:enabled - ADDED from AndroidManifest.xml:310:13 - android:label - ADDED from AndroidManifest.xml:312:13 - android:targetActivity - ADDED from AndroidManifest.xml:313:13 - android:icon - ADDED from AndroidManifest.xml:311:13 - android:name - ADDED from AndroidManifest.xml:309:13 -activity#com.moez.QKSMS.ui.welcome.WelcomeActivity -ADDED from AndroidManifest.xml:321:9 - android:theme - ADDED from AndroidManifest.xml:323:13 - android:name - ADDED from AndroidManifest.xml:322:13 -activity#com.moez.QKSMS.ui.popup.QKReplyActivity -ADDED from AndroidManifest.xml:326:9 - android:excludeFromRecents - ADDED from AndroidManifest.xml:328:13 - android:windowSoftInputMode - ADDED from AndroidManifest.xml:331:13 - android:theme - ADDED from AndroidManifest.xml:330:13 - android:taskAffinity - ADDED from AndroidManifest.xml:329:13 - android:name - ADDED from AndroidManifest.xml:327:13 -activity#com.moez.QKSMS.ui.popup.MessagePickerActivity -ADDED from AndroidManifest.xml:334:9 - android:excludeFromRecents - ADDED from AndroidManifest.xml:336:13 - android:noHistory - ADDED from AndroidManifest.xml:337:13 - android:theme - ADDED from AndroidManifest.xml:339:13 - android:taskAffinity - ADDED from AndroidManifest.xml:338:13 - android:name - ADDED from AndroidManifest.xml:335:13 -activity#com.moez.QKSMS.ui.mms.SlideshowActivity -ADDED from AndroidManifest.xml:341:9 - android:name - ADDED from AndroidManifest.xml:341:19 -receiver#com.moez.QKSMS.receiver.WearableIntentReceiver -ADDED from AndroidManifest.xml:343:9 - android:exported - ADDED from AndroidManifest.xml:345:13 - android:name - ADDED from AndroidManifest.xml:344:13 -intent-filter#com.moez.QKSMS.receiver.WearableIntentReceiver.REPLY -ADDED from AndroidManifest.xml:346:13 -action#com.moez.QKSMS.receiver.WearableIntentReceiver.REPLY -ADDED from AndroidManifest.xml:347:17 - android:name - ADDED from AndroidManifest.xml:347:25 -receiver#com.moez.QKSMS.receiver.SmsReceiver -ADDED from AndroidManifest.xml:352:9 - android:enabled - ADDED from AndroidManifest.xml:354:13 - android:permission - ADDED from AndroidManifest.xml:355:13 - android:name - ADDED from AndroidManifest.xml:353:13 -intent-filter#android.provider.Telephony.SMS_DELIVER -ADDED from AndroidManifest.xml:356:13 -action#android.provider.Telephony.SMS_DELIVER -ADDED from AndroidManifest.xml:357:17 - android:name - ADDED from AndroidManifest.xml:357:25 -receiver#com.moez.QKSMS.receiver.IconColorReceiver -ADDED from AndroidManifest.xml:360:9 - android:enabled - ADDED from AndroidManifest.xml:362:13 - android:exported - ADDED from AndroidManifest.xml:363:13 - android:name - ADDED from AndroidManifest.xml:361:13 -intent-filter#android.intent.action.PACKAGE_CHANGED -ADDED from AndroidManifest.xml:364:13 -action#android.intent.action.PACKAGE_CHANGED -ADDED from AndroidManifest.xml:365:17 - android:name - ADDED from AndroidManifest.xml:365:25 -intent-filter#com.moez.QKSMS.action.PENDING_PACKAGE_CHANGE -ADDED from AndroidManifest.xml:369:13 -action#com.moez.QKSMS.action.PENDING_PACKAGE_CHANGE -ADDED from AndroidManifest.xml:370:17 - android:name - ADDED from AndroidManifest.xml:370:25 -receiver#com.moez.QKSMS.receiver.SmsReceiverLegacy -ADDED from AndroidManifest.xml:375:9 - android:enabled - ADDED from AndroidManifest.xml:377:13 - android:name - ADDED from AndroidManifest.xml:376:13 -intent-filter#android.provider.Telephony.SMS_RECEIVED -ADDED from AndroidManifest.xml:378:13 - android:priority - ADDED from AndroidManifest.xml:378:28 -action#android.provider.Telephony.SMS_RECEIVED -ADDED from AndroidManifest.xml:379:17 - android:name - ADDED from AndroidManifest.xml:379:25 -receiver#com.moez.QKSMS.receiver.PushReceiver -ADDED from AndroidManifest.xml:384:9 - android:permission - ADDED from AndroidManifest.xml:386:13 - android:name - ADDED from AndroidManifest.xml:385:13 -intent-filter#android.provider.Telephony.WAP_PUSH_DELIVER+android.provider.Telephony.WAP_PUSH_RECEIVED -ADDED from AndroidManifest.xml:387:13 -action#android.provider.Telephony.WAP_PUSH_RECEIVED -ADDED from AndroidManifest.xml:388:17 - android:name - ADDED from AndroidManifest.xml:388:25 -action#android.provider.Telephony.WAP_PUSH_DELIVER -ADDED from AndroidManifest.xml:389:17 - android:name - ADDED from AndroidManifest.xml:389:25 -receiver#com.moez.QKSMS.analytics.AnalyticsReportReceiver -ADDED from AndroidManifest.xml:394:9 - android:name - ADDED from AndroidManifest.xml:394:19 -intent-filter#android.intent.action.BOOT_COMPLETED -ADDED from AndroidManifest.xml:395:13 -action#android.intent.action.BOOT_COMPLETED -ADDED from AndroidManifest.xml:396:17 - android:name - ADDED from AndroidManifest.xml:396:25 -receiver#com.moez.QKSMS.receiver.BootReceiver -ADDED from AndroidManifest.xml:399:9 - android:name - ADDED from AndroidManifest.xml:399:19 -receiver#com.klinker.android.send_message.SentReceiver -ADDED from AndroidManifest.xml:404:9 - android:name - ADDED from AndroidManifest.xml:404:19 -intent-filter#com.moez.QKSMS.SMS_SENT -ADDED from AndroidManifest.xml:405:13 -action#com.moez.QKSMS.SMS_SENT -ADDED from AndroidManifest.xml:406:17 - android:name - ADDED from AndroidManifest.xml:406:25 -receiver#com.moez.QKSMS.receiver.DeliveredReceiver -ADDED from AndroidManifest.xml:409:9 - android:name - ADDED from AndroidManifest.xml:409:19 -intent-filter#com.moez.QKSMS.SMS_DELIVERED -ADDED from AndroidManifest.xml:410:13 -action#com.moez.QKSMS.SMS_DELIVERED -ADDED from AndroidManifest.xml:411:17 - android:name - ADDED from AndroidManifest.xml:411:25 -receiver#com.moez.QKSMS.receiver.MessageFailedReceiver -ADDED from AndroidManifest.xml:414:9 - android:name - ADDED from AndroidManifest.xml:414:19 -intent-filter#com.moez.QKSMS.NOTIFY_SMS_FAILURE -ADDED from AndroidManifest.xml:415:13 -action#com.moez.QKSMS.NOTIFY_SMS_FAILURE -ADDED from AndroidManifest.xml:416:17 - android:name - ADDED from AndroidManifest.xml:416:25 -receiver#com.moez.QKSMS.receiver.MarkReadReceiver -ADDED from AndroidManifest.xml:419:9 - android:name - ADDED from AndroidManifest.xml:419:19 -intent-filter#com.moez.QKSMS.MARK_READ -ADDED from AndroidManifest.xml:420:13 -action#com.moez.QKSMS.MARK_READ -ADDED from AndroidManifest.xml:421:17 - android:name - ADDED from AndroidManifest.xml:421:25 -receiver#com.moez.QKSMS.receiver.MarkSeenReceiver -ADDED from AndroidManifest.xml:424:9 - android:name - ADDED from AndroidManifest.xml:424:19 -intent-filter#com.moez.QKSMS.MARK_SEEN -ADDED from AndroidManifest.xml:425:13 -action#com.moez.QKSMS.MARK_SEEN -ADDED from AndroidManifest.xml:426:17 - android:name - ADDED from AndroidManifest.xml:426:25 -receiver#com.moez.QKSMS.ui.widget.WidgetProvider -ADDED from AndroidManifest.xml:430:9 - android:name - ADDED from AndroidManifest.xml:430:19 -intent-filter#android.appwidget.action.APPWIDGET_UPDATE -ADDED from AndroidManifest.xml:431:13 -action#android.appwidget.action.APPWIDGET_UPDATE -ADDED from AndroidManifest.xml:432:17 - android:name - ADDED from AndroidManifest.xml:432:25 -intent-filter#com.moez.QKSMS.intent.action.ACTION_NOTIFY_DATASET_CHANGED -ADDED from AndroidManifest.xml:434:13 -action#com.moez.QKSMS.intent.action.ACTION_NOTIFY_DATASET_CHANGED -ADDED from AndroidManifest.xml:435:17 - android:name - ADDED from AndroidManifest.xml:435:25 -meta-data#android.appwidget.provider -ADDED from AndroidManifest.xml:438:13 - android:resource - ADDED from AndroidManifest.xml:440:17 - android:name - ADDED from AndroidManifest.xml:439:17 -receiver#com.moez.QKSMS.receiver.NightModeAutoReceiver -ADDED from AndroidManifest.xml:443:9 - android:name - ADDED from AndroidManifest.xml:443:19 -receiver#com.mariussoft.endlessjabber.sdk.EndlessJabberReceiver -ADDED from AndroidManifest.xml:444:9 - android:enabled - ADDED from AndroidManifest.xml:446:13 - android:name - ADDED from AndroidManifest.xml:445:13 -intent-filter#com.mariussoft.endlessjabber.action.extend -ADDED from AndroidManifest.xml:447:13 -action#com.mariussoft.endlessjabber.action.extend -ADDED from AndroidManifest.xml:448:17 - android:name - ADDED from AndroidManifest.xml:448:25 -service#com.mariussoft.endlessjabber.sdk.EndlessJabberWakefulService -ADDED from AndroidManifest.xml:452:9 - android:name - ADDED from AndroidManifest.xml:452:18 -service#com.moez.QKSMS.receiver.UnreadBadgeService -ADDED from AndroidManifest.xml:454:9 - android:exported - ADDED from AndroidManifest.xml:456:13 - android:name - ADDED from AndroidManifest.xml:455:13 -service#com.moez.QKSMS.service.HeadlessSmsSendService -ADDED from AndroidManifest.xml:459:9 - android:exported - ADDED from AndroidManifest.xml:461:13 - android:permission - ADDED from AndroidManifest.xml:462:13 - android:name - ADDED from AndroidManifest.xml:460:13 -intent-filter#android.intent.action.RESPOND_VIA_MESSAGE+android.intent.category.DEFAULT -ADDED from AndroidManifest.xml:463:13 -action#android.intent.action.RESPOND_VIA_MESSAGE -ADDED from AndroidManifest.xml:464:17 - android:name - ADDED from AndroidManifest.xml:464:25 -service#com.moez.QKSMS.service.PushbulletService -ADDED from AndroidManifest.xml:474:9 - android:permission - ADDED from AndroidManifest.xml:476:13 - android:name - ADDED from AndroidManifest.xml:475:13 -intent-filter#com.pushbullet.android.extension.MessagingExtension -ADDED from AndroidManifest.xml:477:13 -action#com.pushbullet.android.extension.MessagingExtension -ADDED from AndroidManifest.xml:478:17 - android:name - ADDED from AndroidManifest.xml:478:25 -meta-data#protocolVersion -ADDED from AndroidManifest.xml:481:13 - android:value - ADDED from AndroidManifest.xml:483:17 - android:name - ADDED from AndroidManifest.xml:482:17 -service#com.android.mms.transaction.TransactionService -ADDED from AndroidManifest.xml:485:9 - android:name - ADDED from AndroidManifest.xml:485:18 -service#com.moez.QKSMS.service.NotificationService -ADDED from AndroidManifest.xml:486:9 - android:name - ADDED from AndroidManifest.xml:486:18 -service#com.moez.QKSMS.service.MarkReadService -ADDED from AndroidManifest.xml:487:9 - android:name - ADDED from AndroidManifest.xml:487:18 -service#com.moez.QKSMS.service.MarkSeenService -ADDED from AndroidManifest.xml:488:9 - android:name - ADDED from AndroidManifest.xml:488:18 -service#com.moez.QKSMS.service.DeleteUnreadMessageService -ADDED from AndroidManifest.xml:489:9 - android:name - ADDED from AndroidManifest.xml:489:18 -service#com.moez.QKSMS.service.CopyUnreadMessageTextService -ADDED from AndroidManifest.xml:490:9 - android:name - ADDED from AndroidManifest.xml:490:18 -service#com.moez.QKSMS.ui.widget.WidgetService -ADDED from AndroidManifest.xml:491:9 - android:permission - ADDED from AndroidManifest.xml:493:13 - android:name - ADDED from AndroidManifest.xml:492:13 -uses-sdk -INJECTED from AndroidManifest.xml:0:0 reason: use-sdk injection requested -MERGED from qksms:slidingMenu:unspecified:7:5 -MERGED from com.android.support:appcompat-v7:22.2.0:20:5 -MERGED from com.android.support:support-v4:22.2.0:20:5 -MERGED from qksms:colorPicker:unspecified:7:5 -MERGED from qksms:qkms:unspecified:5:5 -MERGED from com.github.johnkil.android-robototextview:robototextview:2.1.0:7:5 -MERGED from com.melnykov:floatingactionbutton:1.3.0:8:5 -MERGED from com.android.support:recyclerview-v7:22.2.0:20:5 -MERGED from com.android.support:support-v4:22.2.0:20:5 -MERGED from com.pushbullet:android-extensions:1.0.4:5:5 -MERGED from com.klinkerapps:android-chips:1.0.0:22:5 -MERGED from com.android.support:support-v4:22.2.0:20:5 -MERGED from com.nispok:snackbar:2.10.6:6:5 -MERGED from com.android.support:recyclerview-v7:22.2.0:20:5 -MERGED from com.android.support:support-v4:22.2.0:20:5 -MERGED from com.github.lzyzsd:circleprogress:1.1.0:7:5 -MERGED from me.leolin:ShortcutBadger:1.1.1:7:5 -MERGED from com.android.support:appcompat-v7:22.2.0:20:5 -MERGED from com.android.support:support-v4:22.2.0:20:5 -MERGED from com.android.support:support-v13:22.2.0:20:5 -MERGED from com.android.support:support-v4:22.2.0:20:5 -MERGED from com.android.support:recyclerview-v7:22.2.0:20:5 -MERGED from com.android.support:support-v4:22.2.0:20:5 -MERGED from com.google.android.gms:play-services-analytics:7.5.0:18:5 -MERGED from com.google.android.gms:play-services-base:7.5.0:18:5 -MERGED from com.android.support:support-v4:22.2.0:20:5 -MERGED from com.squareup.leakcanary:leakcanary-android-no-op:1.3:20:5 - android:targetSdkVersion - INJECTED from AndroidManifest.xml:0:0 - INJECTED from AndroidManifest.xml:0:0 - android:minSdkVersion - INJECTED from AndroidManifest.xml:0:0 - INJECTED from AndroidManifest.xml:0:0 -uses-permission#com.sec.android.provider.badge.permission.READ -ADDED from me.leolin:ShortcutBadger:1.1.1:19:5 - android:name - ADDED from me.leolin:ShortcutBadger:1.1.1:19:22 -uses-permission#com.sec.android.provider.badge.permission.WRITE -ADDED from me.leolin:ShortcutBadger:1.1.1:20:5 - android:name - ADDED from me.leolin:ShortcutBadger:1.1.1:20:22 -uses-permission#com.htc.launcher.permission.READ_SETTINGS -ADDED from me.leolin:ShortcutBadger:1.1.1:23:5 - android:name - ADDED from me.leolin:ShortcutBadger:1.1.1:23:22 -uses-permission#com.htc.launcher.permission.UPDATE_SHORTCUT -ADDED from me.leolin:ShortcutBadger:1.1.1:24:5 - android:name - ADDED from me.leolin:ShortcutBadger:1.1.1:24:22 -uses-permission#com.sonyericsson.home.permission.BROADCAST_BADGE -ADDED from me.leolin:ShortcutBadger:1.1.1:27:5 - android:name - ADDED from me.leolin:ShortcutBadger:1.1.1:27:22 -uses-permission#com.anddoes.launcher.permission.UPDATE_COUNT -ADDED from me.leolin:ShortcutBadger:1.1.1:30:5 - android:name - ADDED from me.leolin:ShortcutBadger:1.1.1:30:22 -uses-permission#com.majeur.launcher.permission.UPDATE_BADGE -ADDED from me.leolin:ShortcutBadger:1.1.1:33:5 - android:name - ADDED from me.leolin:ShortcutBadger:1.1.1:33:22 -meta-data#com.google.android.gms.version -ADDED from com.google.android.gms:play-services-base:7.5.0:21:9 - android:value - ADDED from com.google.android.gms:play-services-base:7.5.0:23:13 - android:name - ADDED from com.google.android.gms:play-services-base:7.5.0:22:13 From 4f840b57462f952f500d84a2b16f61951d7e3ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 19 Aug 2015 21:26:57 -0700 Subject: [PATCH 9/9] Replace endlessjabbersdk jar with source Pulled from https://github.com/celeronpm/YappySDK at commit 07f41007613b98ddc8765984f6e7189e30a63a75 --- QKSMS/build.gradle | 1 - QKSMS/libs/endlessjabbersdk.jar | Bin 9282 -> 0 bytes .../sdk/EndlessJabberInterface.java | 105 ++++++++++++++ .../sdk/EndlessJabberReceiver.java | 22 +++ .../sdk/EndlessJabberWakefulService.java | 78 ++++++++++ .../sdk/IEndlessJabberImplementation.java | 50 +++++++ .../mariussoft/endlessjabber/sdk/MMSPart.java | 57 ++++++++ .../sdk/WakefulBroadcastReceiver.java | 135 ++++++++++++++++++ 8 files changed, 447 insertions(+), 1 deletion(-) delete mode 100644 QKSMS/libs/endlessjabbersdk.jar create mode 100644 QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/EndlessJabberInterface.java create mode 100644 QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/EndlessJabberReceiver.java create mode 100644 QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/EndlessJabberWakefulService.java create mode 100644 QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/IEndlessJabberImplementation.java create mode 100644 QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/MMSPart.java create mode 100644 QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/WakefulBroadcastReceiver.java diff --git a/QKSMS/build.gradle b/QKSMS/build.gradle index b6ece62a..241209fe 100644 --- a/QKSMS/build.gradle +++ b/QKSMS/build.gradle @@ -55,5 +55,4 @@ dependencies { // External services compile 'com.crittercism:crittercism-android-agent:5.0.3' - compile files('libs/endlessjabbersdk.jar') } diff --git a/QKSMS/libs/endlessjabbersdk.jar b/QKSMS/libs/endlessjabbersdk.jar deleted file mode 100644 index 55a014e7a2b5cc6fe1d99389ae3d7743a181e94f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9282 zcmbuF1yGx9x2`GfQY?6p;_eQ`Demr02$o>QDNS)H6nAfND^7vnTC6~EZ*eWbPrLtp z_SgN*+2?%!oRxWJk~fpJCeN&Qp6kA!rKy61OoV`rj*f7iZYGcLM-U+(BdE#izTi++ zSKv~6p{}eTucOPUrtmO~fUvoZh@h#0hF(0ynxTEX}vGcUIva#c|aj^n}vkk6I zDCUSIG@eppprYXcD7Y}HQbP=h+SHN&6a)QhtSL1V*fac*d`hpypN*CAy#}_qX11zK zK~^&%7SnxZODLJmYOPHckGVffgOn#S$)3m{62h*=7LO&aR=~&pH&+zZov3Sv@YJw~ zE_#u+WY!;XBFC*iV^Vo50w&#;jRIeNbJuna;uN496c zewnpsTy=t6M8k5LV4An%MW~~}Rk*av;5bEW1YLf?lT75Jk+c*ZQHz2K@C{@V{|m3T zI+r?r80Fg}p5uZanBpldioQsQYED9+mK<|-a=%bBGqUAju}|q5+b&0S?K253T>ePQ zIVp$qSh3J38s@}(WKr-Ks%>){oN5u27OOfT>5h>9FC{?3rP*Z50AVj(w6yGXb zzT~X6fVk`E-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V2xy`o3-r2gg@yIOaB9)QZo1ZJVe{S}bmQLP1^LnhNRwY)WwBW&$L$s7({akZ z2I09iN!-0*f!5%mDAdx_KNwja69<^;F*@Awzh!>UfDUWVmZee{q}W7`DI_MXAtn6~ z7|E^XZbq@Co*+6@O{7}1E4Kv}9 z(B;N$FGDS8fMK*PJxFY&WC^=9vII zTWC!d$vO8dfBj}F7!MN~f`?R0Z58VqlRat-TO*Vs#*Vdq5>5=CavQ2X5tu;dz&<0m zMcse+54=N+bW6PcWwhpD{oZAsAQB<`H45?PXv6POi2ok{(_qA(S$+$|KMyf}k3swu zFMqxL{~C(;v()cXkw2Z|-=`vfMG5-9Tk5~>k$+bD?L_~nhkrZKe?``>h5Yya)c?ts z{S&Z|U$?u#*1s v?EexHf9C#8M}KzoZ#w!b3d#RL?*BV0X{!9jF$4tkUoZM!aE3wq`_umd==hwB diff --git a/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/EndlessJabberInterface.java b/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/EndlessJabberInterface.java new file mode 100644 index 00000000..df4c5c26 --- /dev/null +++ b/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/EndlessJabberInterface.java @@ -0,0 +1,105 @@ +package com.mariussoft.endlessjabber.sdk; + +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.content.pm.PackageManager; +import android.content.pm.PackageManager.NameNotFoundException; +import android.net.Uri; + +public class EndlessJabberInterface { + + /** Checks whether or not EndlessJabber is installed */ + public static boolean IsInstalled(Context ctx) { + + PackageManager pm = ctx.getPackageManager(); + try { + pm.getPackageInfo("com.mariussoft.endlessjabber", PackageManager.GET_ACTIVITIES); + return true; + } catch (NameNotFoundException e) { + return false; + } + } + + /** Opens up GooglePlay and redirects it to the EndlessJabber app */ + public static void OpenGooglePlayLink(Context ctx) { + final String appPackageName = "com.mariussoft.endlessjabber"; + try { + ctx.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName))); + } catch (android.content.ActivityNotFoundException anfe) { + ctx.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=" + appPackageName))); + } + } + + /** Launches EndlessJabber */ + public static void LaunchEndlessJabber(Context ctx) { + Intent intent = ctx.getPackageManager().getLaunchIntentForPackage("com.mariussoft.endlessjabber"); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + ctx.startActivity(intent); + } + + /** + * Enables integration by specifying which class to call + * + * @param context + * The context to use + * @param concreteImplementation + * The concrete implementation to call on events + * @param sendSMS + * If true, your app will be responsible for sending SMS messages + * as well as presisting them to the SMS repository + * @param sendMMS + * If true, your app will be responsible for sending & persisting + * MMS messages to the MMS repository + * @throws Exception + */ + @SuppressWarnings("rawtypes") + public static void EnableIntegration(Context context, Class concreteImplementation, boolean sendSMS, boolean sendMMS) throws Exception { + Class clazz = concreteImplementation; + if (!IEndlessJabberImplementation.class.isAssignableFrom(clazz)) { + throw new Exception("Class must implement IEndlessJabberImplementation"); + } + + SharedPreferences.Editor editor = context.getSharedPreferences("EndlessJabberSDK", Context.MODE_PRIVATE).edit(); + editor.putString("InterfaceClass", concreteImplementation.getName()); + editor.putBoolean("SendSMS", sendSMS); + editor.putBoolean("SendMMS", sendMMS); + editor.commit(); + + SendInfoToEndlessJabber(context); + } + + /** Disables integration */ + @SuppressWarnings("rawtypes") + public static void DisableIntegration(Context context, Class nameOfImplementation) { + SharedPreferences.Editor editor = context.getSharedPreferences("EndlessJabberSDK", Context.MODE_PRIVATE).edit(); + editor.clear(); + editor.commit(); + + SendInfoToEndlessJabber(context); + } + + /** + * Refresh integration info with EndlessJabber + * + * @param ctx + * Context to use + */ + static void SendInfoToEndlessJabber(Context context) { + String EndlessJabber_INTENT = "com.mariussoft.endlessjabber.action.extendResponse"; + SharedPreferences prefs = context.getSharedPreferences("EndlessJabberSDK", Context.MODE_PRIVATE); + + Intent i = new Intent(); + i.setAction(EndlessJabber_INTENT); + i.putExtra("Action", "UpdateInfo"); + i.putExtra("PackageName", context.getPackageName()); + i.putExtra("Enabled", prefs.contains("InterfaceClass")); + + if (prefs.contains("InterfaceClass")) { + i.putExtra("SendSMS", prefs.getBoolean("SendSMS", false)); + i.putExtra("SendMMS", prefs.getBoolean("SendMMS", false)); + } + + context.sendBroadcast(i); + } +} diff --git a/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/EndlessJabberReceiver.java b/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/EndlessJabberReceiver.java new file mode 100644 index 00000000..9eebc92c --- /dev/null +++ b/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/EndlessJabberReceiver.java @@ -0,0 +1,22 @@ +package com.mariussoft.endlessjabber.sdk; + +import android.content.Context; +import android.content.Intent; + +public class EndlessJabberReceiver extends WakefulBroadcastReceiver { + + public static final String EndlessJabber_INTENT = "com.mariussoft.endlessjabber.action.extend"; + + @Override + public void onReceive(Context context, Intent intent) { + + if (intent.getAction().equals(EndlessJabber_INTENT)) { + + // This is the Intent to deliver to our service. + Intent service = new Intent(context, EndlessJabberWakefulService.class); + service.putExtras(intent.getExtras()); + + startWakefulService(context, service); + } + } +} diff --git a/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/EndlessJabberWakefulService.java b/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/EndlessJabberWakefulService.java new file mode 100644 index 00000000..dbe22a51 --- /dev/null +++ b/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/EndlessJabberWakefulService.java @@ -0,0 +1,78 @@ +package com.mariussoft.endlessjabber.sdk; + +import android.app.IntentService; +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; + +public class EndlessJabberWakefulService extends IntentService { + + public EndlessJabberWakefulService() { + super("EndlessJabberWakefulService"); + } + + @Override + protected void onHandleIntent(Intent intent) { + Context context = getApplicationContext(); + + // Get the class to call + String implemenationClass = context.getSharedPreferences("EndlessJabberSDK", Context.MODE_PRIVATE).getString("InterfaceClass", null); + + if (implemenationClass == null) { + return; + } + + IEndlessJabberImplementation instanceOfMyClass; + try { + instanceOfMyClass = (IEndlessJabberImplementation) Class.forName(implemenationClass).newInstance(); + + Bundle extras = intent.getExtras(); + + switch (extras.getString("Action")) { + case "UpdateRead": { + long time = extras.getLong("Time"); + int conversationID = extras.getInt("ConversationID"); + instanceOfMyClass.UpdateReadMessages(context, time, conversationID); + break; + } + case "DeleteThread": { + + int conversationID = extras.getInt("ConversationID"); + instanceOfMyClass.DeleteThread(context, conversationID); + break; + } + case "SendMMS": { + + boolean save = extras.getBoolean("Save"); + boolean send = extras.getBoolean("Send"); + String[] Recipients = extras.getStringArray("Recipients"); + + MMSPart[] parts = new MMSPart[extras.getParcelableArray("Parts").length]; + + for (int i = 0; i < parts.length; i++) { + parts[i] = (MMSPart) extras.getParcelableArray("Parts")[i]; + } + + instanceOfMyClass.SendMMS(context, Recipients, parts, extras.getString("Subject"), save, send); + break; + } + case "SendSMS": { + boolean send = extras.getBoolean("Send"); + String[] Recipients = extras.getStringArray("Recipients"); + String message = extras.getString("Message"); + + instanceOfMyClass.SendSMS(context, Recipients, message, send); + break; + } + case "UpdateInfo": { + EndlessJabberInterface.SendInfoToEndlessJabber(context); + break; + } + } + } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) { + + } + + EndlessJabberReceiver.completeWakefulIntent(intent); + } +} diff --git a/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/IEndlessJabberImplementation.java b/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/IEndlessJabberImplementation.java new file mode 100644 index 00000000..eddd832c --- /dev/null +++ b/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/IEndlessJabberImplementation.java @@ -0,0 +1,50 @@ +package com.mariussoft.endlessjabber.sdk; + +import android.content.Context; + +/** + * + * Interface to implement EndlessJabber integration + * + */ +public interface IEndlessJabberImplementation { + + /** + * Update all messages in the SMS/MMS repositories as read where the time <= the provided time as well as where the threadID matches the provided ID + * @param context The context to utilize + * @param time The 'time' in the SMS database to use when marking messages as read + * (NOTE* for MMS divide by 1000 as MMS repository stores times as 1/1000th of the SMS) + * @param threadID The ID of the thread in the SMS/MMS repositories to update + */ + void UpdateReadMessages(Context context, long time, int threadID); + + /** + * Delete any messages/conversations in the SMS/MMS repositories where the threadID matches the provided ID + * @param context The context to utilize + * @param threadID The ID of the thread in the SMS/MMS repositories to delete + */ + void DeleteThread(Context context,int threadID); + + /** + * Method gets called when EndlessJabber is requested to send an MMS message via the web app + * @param context The context to utilize + * @param recipients List of recipients to send message to + * @param parts The message parts to send along with message + * @param subject The MMS subject of the message + * @param save Whether or not to save the MMS to the MMS repository + * @param send If true, send the message along with saving it to the MMS repository + * NOTE: On KitKat save will be true only when enabled in the SDK & your app is the default messaging app on the system + * + * If both save & send are false, this call is only for informational purposes (e.g. modify notifications, update UI, etc...) + */ + void SendMMS(Context context, String[] recipients, MMSPart[] parts, String subject, boolean save, boolean send); + + /** + * Method gets called when EndlessJabber is requested to send an SMS message via the web app + * @param context The context to utilize + * @param recipients List of recipients to send message to + * @param message The message to send + * @param send If true, send the message along with saving it to the SMS repository, otherwise this is only for informational purposes (e.g. modify notifications, update UI, etc...) + */ + void SendSMS(Context context, String[] recipients, String message, boolean send); +} diff --git a/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/MMSPart.java b/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/MMSPart.java new file mode 100644 index 00000000..278aa6d5 --- /dev/null +++ b/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/MMSPart.java @@ -0,0 +1,57 @@ +package com.mariussoft.endlessjabber.sdk; + +import android.os.Parcel; +import android.os.Parcelable; + +/** + * + * An MMS attachment + * + */ +public class MMSPart implements Parcelable { + /** + * The name of the MMS attachment + */ + public String Name = ""; + /** + * The MimeType of the MMS attachment + */ + public String MimeType = ""; + /** + * The byte[] of the MMS attachment + */ + public byte[] Data; + + public MMSPart() { + } + + public MMSPart(Parcel parcel) { + Name = parcel.readString(); + MimeType = parcel.readString(); + Data = new byte[parcel.readInt()]; + parcel.readByteArray(Data); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int arg1) { + dest.writeString(Name); + dest.writeString(MimeType); + dest.writeInt(Data.length); + dest.writeByteArray(Data); + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + public MMSPart createFromParcel(Parcel in) { + return new MMSPart(in); + } + + public MMSPart[] newArray(int size) { + return new MMSPart[size]; + } + }; +} \ No newline at end of file diff --git a/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/WakefulBroadcastReceiver.java b/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/WakefulBroadcastReceiver.java new file mode 100644 index 00000000..d75f50a5 --- /dev/null +++ b/QKSMS/src/main/java/com/mariussoft/endlessjabber/sdk/WakefulBroadcastReceiver.java @@ -0,0 +1,135 @@ +package com.mariussoft.endlessjabber.sdk; + +/* + * Copyright (C) 2013 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +import android.content.BroadcastReceiver; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.os.PowerManager; +import android.util.Log; +import android.util.SparseArray; + +/** + * Helper for the common pattern of implementing a {@link BroadcastReceiver} + * that receives a device wakeup event and then passes the work off + * to a {@link android.app.Service}, while ensuring that the + * device does not go back to sleep during the transition. + * + *

This class takes care of creating and managing a partial wake lock + * for you; you must request the {@link android.Manifest.permission#WAKE_LOCK} + * permission to use it.

+ * + *

Example

+ * + *

A {@link WakefulBroadcastReceiver} uses the method + * {@link WakefulBroadcastReceiver#startWakefulService startWakefulService()} + * to start the service that does the work. This method is comparable to + * {@link android.content.Context#startService startService()}, except that + * the {@link WakefulBroadcastReceiver} is holding a wake lock when the service + * starts. The intent that is passed with + * {@link WakefulBroadcastReceiver#startWakefulService startWakefulService()} + * holds an extra identifying the wake lock.

+ * + * {@sample development/samples/Support4Demos/src/com/example/android/supportv4/content/SimpleWakefulReceiver.java complete} + * + *

The service (in this example, an {@link android.app.IntentService}) does + * some work. When it is finished, it releases the wake lock by calling + * {@link WakefulBroadcastReceiver#completeWakefulIntent + * completeWakefulIntent(intent)}. The intent it passes as a parameter + * is the same intent that the {@link WakefulBroadcastReceiver} originally + * passed in.

+ * + * {@sample development/samples/Support4Demos/src/com/example/android/supportv4/content/SimpleWakefulService.java complete} + */ +public abstract class WakefulBroadcastReceiver extends BroadcastReceiver { + private static final String EXTRA_WAKE_LOCK_ID = "android.support.content.wakelockid"; + + private static final SparseArray mActiveWakeLocks + = new SparseArray(); + private static int mNextId = 1; + + /** + * Do a {@link android.content.Context#startService(android.content.Intent) + * Context.startService}, but holding a wake lock while the service starts. + * This will modify the Intent to hold an extra identifying the wake lock; + * when the service receives it in {@link android.app.Service#onStartCommand + * Service.onStartCommand}, it should pass back the Intent it receives there to + * {@link #completeWakefulIntent(android.content.Intent)} in order to release + * the wake lock. + * + * @param context The Context in which it operate. + * @param intent The Intent with which to start the service, as per + * {@link android.content.Context#startService(android.content.Intent) + * Context.startService}. + */ + public static ComponentName startWakefulService(Context context, Intent intent) { + synchronized (mActiveWakeLocks) { + int id = mNextId; + mNextId++; + if (mNextId <= 0) { + mNextId = 1; + } + + intent.putExtra(EXTRA_WAKE_LOCK_ID, id); + ComponentName comp = context.startService(intent); + if (comp == null) { + return null; + } + + PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE); + PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, + "wake:" + comp.flattenToShortString()); + wl.setReferenceCounted(false); + wl.acquire(60*1000); + mActiveWakeLocks.put(id, wl); + return comp; + } + } + + /** + * Finish the execution from a previous {@link #startWakefulService}. Any wake lock + * that was being held will now be released. + * + * @param intent The Intent as originally generated by {@link #startWakefulService}. + * @return Returns true if the intent is associated with a wake lock that is + * now released; returns false if there was no wake lock specified for it. + */ + public static boolean completeWakefulIntent(Intent intent) { + final int id = intent.getIntExtra(EXTRA_WAKE_LOCK_ID, 0); + if (id == 0) { + return false; + } + synchronized (mActiveWakeLocks) { + PowerManager.WakeLock wl = mActiveWakeLocks.get(id); + if (wl != null) { + wl.release(); + mActiveWakeLocks.remove(id); + return true; + } + // We return true whether or not we actually found the wake lock + // the return code is defined to indicate whether the Intent contained + // an identifier for a wake lock that it was supposed to match. + // We just log a warning here if there is no wake lock found, which could + // happen for example if this function is called twice on the same + // intent or the process is killed and restarted before processing the intent. + Log.w("WakefulBroadcastReceiver", "No active wake lock id #" + id); + return true; + } + } +} \ No newline at end of file