cordova-plugin-sms
cordova-plugin-sms copied to clipboard
"onSmsArrive" is triggered only once
I am using this plugin with ionic framework. After initializing the watch by SMS.startWatch()
, it works well when the first SMS arrives. But it does not broadcasts any event for subsequent messages.
Is it the same message that you're sending twice? The plugin is coded to ignore repeat messages:
https://github.com/floatinghotpot/cordova-plugin-sms/blob/master/src/android/SMSPlugin.java#L327
Change the content a bit and it should trigger again, although I can't say what the author's intentions were when this was written.
Did you try delete the received SMS?
Meaning: Recive -> watch fired -> delete sms -> recive again -> watch fired again (?) ...
if you are sending same SMS again onSMSArrive will not trigger..
is it still the same? I am facing the same issue.