diff --git a/app/build.gradle b/app/build.gradle index 3a755cc..5efbaa1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "eu.droogers.smsmatrix" minSdkVersion 23 targetSdkVersion 26 - versionCode 1 - versionName "1.0" + versionCode 8 + versionName "0.0.8" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { diff --git a/app/src/main/java/eu/droogers/smsmatrix/MainActivity.java b/app/src/main/java/eu/droogers/smsmatrix/MainActivity.java index 8f1ff99..41babb8 100644 --- a/app/src/main/java/eu/droogers/smsmatrix/MainActivity.java +++ b/app/src/main/java/eu/droogers/smsmatrix/MainActivity.java @@ -74,6 +74,7 @@ public class MainActivity extends Activity { private void checkPermissions() { askPermission(Manifest.permission.READ_SMS); askPermission(Manifest.permission.SEND_SMS); + askPermission(Manifest.permission.RECEIVE_SMS); askPermission(Manifest.permission.READ_PHONE_STATE); askPermission(Manifest.permission.READ_CONTACTS); askPermission(Manifest.permission.READ_EXTERNAL_STORAGE); diff --git a/app/src/main/java/eu/droogers/smsmatrix/MatrixService.java b/app/src/main/java/eu/droogers/smsmatrix/MatrixService.java index 1102561..9fbd89a 100644 --- a/app/src/main/java/eu/droogers/smsmatrix/MatrixService.java +++ b/app/src/main/java/eu/droogers/smsmatrix/MatrixService.java @@ -54,11 +54,12 @@ public class MatrixService extends Service { String phone = intent.getStringExtra("SendSms_phone"); String type = intent.getStringExtra("SendSms_type"); if (phone != null) { - if (type.equals(Matrix.MESSAGE_TYPE_TEXT)) + System.out.println(phone); + if (type.equals(Matrix.MESSAGE_TYPE_TEXT) || type.equals(Matrix.MESSAGE_TYPE_NOTICE)) { String body = intent.getStringExtra("SendSms_body"); mx.sendMessage(phone, body, type); - } else { + } else if (type.equals(Matrix.MESSAGE_TYPE_IMAGE) || type.equals(Matrix.MESSAGE_TYPE_VIDEO)) { byte[] body = intent.getByteArrayExtra("SendSms_body"); String fileName = intent.getStringExtra("SendSms_fileName"); String contentType = intent.getStringExtra("SendSms_contentType"); diff --git a/build.gradle b/build.gradle index 7e01a0a..ae9fbaf 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' + classpath 'com.android.tools.build:gradle:3.2.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a1dcb52..537120a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Nov 10 13:09:46 CET 2017 +#Fri Nov 16 18:23:47 CET 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip