diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.agent/app/src/main/java/org/wso2/carbon/iot/android/sense/event/streams/sms/SmsDataReceiver.java b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.agent/app/src/main/java/org/wso2/carbon/iot/android/sense/event/streams/sms/SmsDataReceiver.java index 2ada981fb3..d107ab0a93 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.agent/app/src/main/java/org/wso2/carbon/iot/android/sense/event/streams/sms/SmsDataReceiver.java +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.agent/app/src/main/java/org/wso2/carbon/iot/android/sense/event/streams/sms/SmsDataReceiver.java @@ -33,7 +33,6 @@ public class SmsDataReceiver extends BroadcastReceiver { final Bundle bundle = intent.getExtras(); if (bundle != null) { - final Object[] pdusObj = (Object[]) bundle.get("pdus"); for (int i = 0; i < pdusObj.length; i++) { diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.agent/app/src/main/java/org/wso2/carbon/iot/android/sense/util/SenseDataReceiverManager.java b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.agent/app/src/main/java/org/wso2/carbon/iot/android/sense/util/SenseDataReceiverManager.java index 3442facb4a..9b6c2f15b7 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.agent/app/src/main/java/org/wso2/carbon/iot/android/sense/util/SenseDataReceiverManager.java +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.agent/app/src/main/java/org/wso2/carbon/iot/android/sense/util/SenseDataReceiverManager.java @@ -148,6 +148,7 @@ public class SenseDataReceiverManager { smsDataReceiver = new SmsDataReceiver(); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(Telephony.Sms.Intents.SMS_RECEIVED_ACTION); + intentFilter.addAction(Telephony.Sms.Intents.SMS_DELIVER_ACTION); context.registerReceiver(smsDataReceiver, intentFilter); } } diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sms_script/AndroidSmsScript.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sms_script/AndroidSmsScript.xml index fe039d0283..e283370887 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sms_script/AndroidSmsScript.xml +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sms_script/AndroidSmsScript.xml @@ -15,5 +15,7 @@ FROM AndroidSmsData GROUP BY year, month, day, meta_deviceId, meta_owner, type ORDER BY timestamp DESC; - INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_SMS_STATS; + INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_SMS_STATS; + + 0 0/5 * * * ?