Firstly - thank you for a brilliant product. My use of it is purely for personal pleasure, but have written a few apps already. One of these is a recent go at capturing and auto responding to text messages. I have a working app (full code attached) but it is not quite starting up as I would expect and hope someone can see where I have gone wrong, or have missed something.
What I am trying to do here is intercept each text, and if the body of the message is the word 'secret' then respond to the text and not allow it to go proceed to the default message handler. While it does this I find that:
1> if my app is not running and a text is received, the app / service does start, but does not trap the first text even if it contains the word 'secret'. On that first occasion it bypasses my app and is handled by the default one. The second and subsequent text are however trapped and processed correctly.
2> If I don't have the sNotif segment in my code then the service stops after a while.
While I can live with my way, I am interested to know what the correct approach should be.
What I am trying to do here is intercept each text, and if the body of the message is the word 'secret' then respond to the text and not allow it to go proceed to the default message handler. While it does this I find that:
1> if my app is not running and a text is received, the app / service does start, but does not trap the first text even if it contains the word 'secret'. On that first occasion it bypasses my app and is handled by the default one. The second and subsequent text are however trapped and processed correctly.
2> If I don't have the sNotif segment in my code then the service stops after a while.
While I can live with my way, I am interested to know what the correct approach should be.