Hello!
I would like to ask the following:
As I understand, I could have the Starter service for background tasks like push messages functionality with web sockets, send/receive messages via the websocket push framework and background GPS management to send location data to server even if the app is in "background". I also need to "wake" the app from "background" when receiving specific messages.
Things I need to clarify:
1. Do I really need a background service in order to keep the app alive when in background?
2. If yes, should I remove the following line from Starter service, in order to prevent the process being killed from Android?
And do I need StartServiceAt?
3. Could I use notifications like any other app with background service running? If the service is not needed then how notifications are implemented?
4. How do I "wake" the app from "background"? By now I did the following inside the background service running as foreground service:
With B4XPages, what is the equivalent?
Thank you in advance!
I would like to ask the following:
As I understand, I could have the Starter service for background tasks like push messages functionality with web sockets, send/receive messages via the websocket push framework and background GPS management to send location data to server even if the app is in "background". I also need to "wake" the app from "background" when receiving specific messages.
Things I need to clarify:
1. Do I really need a background service in order to keep the app alive when in background?
2. If yes, should I remove the following line from Starter service, in order to prevent the process being killed from Android?
B4X:
Service.StopAutomaticForeground
And do I need StartServiceAt?
3. Could I use notifications like any other app with background service running? If the service is not needed then how notifications are implemented?
4. How do I "wake" the app from "background"? By now I did the following inside the background service running as foreground service:
B4X:
If msg.type = "ET" then
If IsPaused(Main) Then
StartActivity(Main)
End If
End If
Thank you in advance!