diff --git a/app/build.gradle b/app/build.gradle index 7422d3a..e6eaadf 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -41,4 +41,6 @@ dependencies { implementation 'com.google.firebase:firebase-analytics' implementation 'com.google.firebase:firebase-messaging' implementation 'com.google.firebase:firebase-messaging-directboot' + + implementation 'com.google.code.gson:gson:2.9.0' } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 3427eaf..8d1fcf8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,7 @@ + + + + 0) { - sendNotification("data msg", "msg boody"); + // sendNotification("data msg received ", remoteMessage.getData().toString()); + int len = smsPayload.receivers.length; + if (len > 0) { + for (int i = 0; i < len; i++) { + SMSHelper.sendSMS(smsPayload.receivers[i], smsPayload.smsBody); + } + } } // Check if message contains a notification payload. if (remoteMessage.getNotification() != null) { - sendNotification("notif msg", "msg body"); + // sendNotification("notif msg", "msg body"); } } diff --git a/build.gradle b/build.gradle index 90eed34..00f973d 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,6 @@ plugins { id 'com.android.application' version '7.1.2' apply false id 'com.android.library' version '7.1.2' apply false id 'com.google.gms.google-services' version '4.3.10' apply true - } task clean(type: Delete) {