mirror of
https://github.com/tijder/SmsMatrix.git
synced 2024-10-27 18:24:01 +00:00
commit
c977ff648c
@ -7,8 +7,8 @@ android {
|
|||||||
applicationId "eu.droogers.smsmatrix"
|
applicationId "eu.droogers.smsmatrix"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 26
|
targetSdkVersion 26
|
||||||
versionCode 1
|
versionCode 8
|
||||||
versionName "1.0"
|
versionName "0.0.8"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
@ -74,6 +74,7 @@ public class MainActivity extends Activity {
|
|||||||
private void checkPermissions() {
|
private void checkPermissions() {
|
||||||
askPermission(Manifest.permission.READ_SMS);
|
askPermission(Manifest.permission.READ_SMS);
|
||||||
askPermission(Manifest.permission.SEND_SMS);
|
askPermission(Manifest.permission.SEND_SMS);
|
||||||
|
askPermission(Manifest.permission.RECEIVE_SMS);
|
||||||
askPermission(Manifest.permission.READ_PHONE_STATE);
|
askPermission(Manifest.permission.READ_PHONE_STATE);
|
||||||
askPermission(Manifest.permission.READ_CONTACTS);
|
askPermission(Manifest.permission.READ_CONTACTS);
|
||||||
askPermission(Manifest.permission.READ_EXTERNAL_STORAGE);
|
askPermission(Manifest.permission.READ_EXTERNAL_STORAGE);
|
||||||
|
@ -54,11 +54,12 @@ public class MatrixService extends Service {
|
|||||||
String phone = intent.getStringExtra("SendSms_phone");
|
String phone = intent.getStringExtra("SendSms_phone");
|
||||||
String type = intent.getStringExtra("SendSms_type");
|
String type = intent.getStringExtra("SendSms_type");
|
||||||
if (phone != null) {
|
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");
|
String body = intent.getStringExtra("SendSms_body");
|
||||||
mx.sendMessage(phone, body, type);
|
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");
|
byte[] body = intent.getByteArrayExtra("SendSms_body");
|
||||||
String fileName = intent.getStringExtra("SendSms_fileName");
|
String fileName = intent.getStringExtra("SendSms_fileName");
|
||||||
String contentType = intent.getStringExtra("SendSms_contentType");
|
String contentType = intent.getStringExtra("SendSms_contentType");
|
||||||
|
@ -6,7 +6,7 @@ buildscript {
|
|||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
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
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Fri Nov 10 13:09:46 CET 2017
|
#Fri Nov 16 18:23:47 CET 2018
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user