T TestThree New Member Oct 6, 2016 #1 MessageReceived event works ok and runs only 1 time but MessageSent event trigger multiple times (3-4). Where can be problem? (Phone v2.28) It's running inside starter service and initializing: Sub Service_Create SI.Initialize("SI") SI.ListenToOutgoingMessages Something like this is also here but opaque https://www.b4x.com/android/forum/threads/sms-interceptor-repeating-message_received.37613/
MessageReceived event works ok and runs only 1 time but MessageSent event trigger multiple times (3-4). Where can be problem? (Phone v2.28) It's running inside starter service and initializing: Sub Service_Create SI.Initialize("SI") SI.ListenToOutgoingMessages Something like this is also here but opaque https://www.b4x.com/android/forum/threads/sms-interceptor-repeating-message_received.37613/
Erel B4X founder Staff member Licensed User Longtime User Oct 7, 2016 #2 It can fire multiple times as it listens to database changes in the SMS store. You will need to handle the multiple messages in your code. Upvote 0
It can fire multiple times as it listens to database changes in the SMS store. You will need to handle the multiple messages in your code.
T TestThree New Member Oct 7, 2016 #3 Thank you, I think i solve it by remembering last MessageId and comparing with next one. If it's equal -> ignore it. Upvote 0
Thank you, I think i solve it by remembering last MessageId and comparing with next one. If it's equal -> ignore it.