Svegliare la mia app (Wake up my app when it receives an SMS message)

Ciao a tutti, ho realizzato una semplice app che quando riceve un SMS chiama il numero dal quale ha ricevuto l'sms. L'app funziona solo se è "attiva" se viene chiusa non lavora. Esistono app da aggiungere al mio smartphone che non mi facciano dormire la mia app?
Come posso rendere il mio lavoro sempre pronto a funzionare? Una soluzione semplice e veloce sarebbe perfetta! Ho poco tempo.. grazie infinite a tutti.


Try the itoo extension to get it working in the background

However to make a phonecall, you app might be first brought back to the foreground... also starting a phonecall might not work if the device is locked


As a work around to a Foreground or Background app, either use a Stay Awake block routine using a Notifier

or you use Taifun’s Tools Extension:

Using either an extension or a block routine drains your device battery rapidly . These work around methods are not running the app in the Background, they force the app
screen to stay open .

So STAYAWAKE to keep the Screen on.

I now set up a small example to test, if it is possible to receive an sms in the background

piero.aia (103.0 KB)

Unfortunately it does not work like this... my guess is, the texting service is not available in the background...

So if you want a background solution, then you have 2 options

  1. use the notification listener extension to listen to a new sms, see also Notification Listener (powered by itoox-wrapper) and Itoo, or

  2. use the texting extension and check regularly, if a new sms arrived, see also my example here How can I activate clock in the background when exiting the application? - #9 by Taifun

and then use the alarmmanager extension to bring the app to the forground to start the phone call

Depending on your device you might have to ignore battery optimization to get it running, see also Also most probably you will not be able to start the phone call automatically if the device is locked, you most probably have to first unlock it.