Fixed : SMS Script not executing automatically.

revert-dabc3590
Menaka Jayawardena 8 years ago
parent ba5486c05c
commit 08a0a290c2

@ -33,7 +33,6 @@ public class SmsDataReceiver extends BroadcastReceiver {
final Bundle bundle = intent.getExtras(); final Bundle bundle = intent.getExtras();
if (bundle != null) { if (bundle != null) {
final Object[] pdusObj = (Object[]) bundle.get("pdus"); final Object[] pdusObj = (Object[]) bundle.get("pdus");
for (int i = 0; i < pdusObj.length; i++) { for (int i = 0; i < pdusObj.length; i++) {

@ -148,6 +148,7 @@ public class SenseDataReceiverManager {
smsDataReceiver = new SmsDataReceiver(); smsDataReceiver = new SmsDataReceiver();
IntentFilter intentFilter = new IntentFilter(); IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(Telephony.Sms.Intents.SMS_RECEIVED_ACTION); intentFilter.addAction(Telephony.Sms.Intents.SMS_RECEIVED_ACTION);
intentFilter.addAction(Telephony.Sms.Intents.SMS_DELIVER_ACTION);
context.registerReceiver(smsDataReceiver, intentFilter); context.registerReceiver(smsDataReceiver, intentFilter);
} }
} }

@ -15,5 +15,7 @@
FROM AndroidSmsData FROM AndroidSmsData
GROUP BY year, month, day, meta_deviceId, meta_owner, type ORDER BY timestamp DESC; GROUP BY year, month, day, meta_deviceId, meta_owner, type ORDER BY timestamp DESC;
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_SMS_STATS; </Script> INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_SMS_STATS;
</Script>
<CronExpression>0 0/5 * * * ?</CronExpression>
</Analytics> </Analytics>

Loading…
Cancel
Save