I'm making an application that detects incoming text messages.
When a message is received, the application must perform a certain action, depending on the sender and the content.
The problem is that the application must work at all times. Detecting messages works through a BroadcastReceiver class. Via a Toast message I can see that the application (open or closed) receives the message.
The problem then is that I must perform certain actions, which are stored in a local database (DB40). But I can't access the database when the application is closed.
So, how can I perform database access and run other code (like making the phone vibrate, or play a ringtone) when the application is closed?
Thanks in advance