Reputation: 4289
I have made an application that listens for a particular type of SMS. Problem is occurring when suppose the application is not running then on receipt of a particular SMS, at first the broadcast receiver start the desired activity which (the desired activity) after completion starts the main activity in the application and from then on Broadcast receivers wont start the desired activity on receipt of that particular SMS. When the application's main activity is explicitly started, the Broadcast receiver works fine and it starts the desired activity on receipt of the particular SMS for any no. of time.
Any help is awaited. Thankyou.
Upvotes: 0
Views: 128
Reputation:
For this you will either will have to store the number (so that next time you can take respective action) either in local file/cache or make a database and then do it. No other way. Then on each request you can check for the number and the proceed. The problem also is that Broaccast receiver only run's for 5 seconds. So this technique wont be succesful for more number of numbers
Upvotes: 1