mirror of
https://github.com/tijder/SmsMatrix.git
synced 2024-10-27 18:24:01 +00:00
Fix app crashing when device is been called
This commit is contained in:
parent
1228e5e6be
commit
19abc64af0
@ -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");
|
||||||
|
Loading…
Reference in New Issue
Block a user