Hi Erel
I may not be explaining myself clearly enough in earlier posts and despite scouring everything I can find around intercepting sms messages I am unable to locate anything that tells me how to get around this last issue I have and the link above (
Intent Filters - Intercepting SMS messages in the background) does not give me any clue.
I have the service associated with my app working and it will intercept messages, check for a specified word and if it finds that word it will send a responce. Providing the service was already running it will then stop the incoming message from going to the the default sms handler. So far so good.
The situation I cannot find a clear answer to is this:
If the service has stopped - as it may well do - it will start when the next sms is received.
If the
first message is not one I need to respond to, it passes thru to the default sms handler
But...
If the
first message is one I am interested in then 2 things happen
1> It handles the response (great)
2> However it still allows that same message to be passed to the defaut sms handler (not so great)
There is nothing I have found on this forum that tells me how to handle the situation surrounding that
first message.
Are you able to review my code (link is in #8 above) and maybe test it on a device to see what I mean. Once installed the service needs to be stopped and then the first text received needs to just be the word "secret". If it works the same as it does on my LG phone, it will send a response, but you will also get the message passed thru to your normal InBox.
Or do I have wrong expectations about the handling of the
first message.
Sorry for the repeated questioning on this but I cant find the correct way to achieve what I want - trap and silently handle that first message