J Jonathan Rigley Member Licensed User Longtime User Sep 13, 2014 #1 Hi, I have created and started a service that listens to incoming SMS Messages and pops up a toast message with the phone number. It works perfect while the app is open but the service is distroyed when the app closes. How do I keep the service alive in the background once my app is closed and start up again after the phone is rebooted? Many thanks Jonathan
Hi, I have created and started a service that listens to incoming SMS Messages and pops up a toast message with the phone number. It works perfect while the app is open but the service is distroyed when the app closes. How do I keep the service alive in the background once my app is closed and start up again after the phone is rebooted? Many thanks Jonathan
mangojack Expert Licensed User Longtime User Sep 14, 2014 #2 see this ... Service.StartForeground .. for the reboot issue add this to your service module attributes. B4X: #Region Module Attributes #StartAtBoot: True #End Region Tutorial -Sticky Services ... http://www.b4x.com/android/forum/th...-service-long-running-background-tasks.27065/ Upvote 0
see this ... Service.StartForeground .. for the reboot issue add this to your service module attributes. B4X: #Region Module Attributes #StartAtBoot: True #End Region Tutorial -Sticky Services ... http://www.b4x.com/android/forum/th...-service-long-running-background-tasks.27065/
J Jonathan Rigley Member Licensed User Longtime User Sep 14, 2014 #3 Perfect! Thank you very much. Jonathan Upvote 0