Reids Member Licensed User Longtime User May 13, 2015 #1 Hello I just creating chat apps, the apps work fine when activity still active, or when user clicked back button message still can be arrived, but if user kill apps with taskmanager (holding home button and swipe it) the apps is killed and service won't start again so message won't arrive anymore how I can handle this? summary : ** Activity (main) Create, isFirst = true ** >>> message still can arrived ** Activity (main) Create, isFirst = false** >>> message still cannot arrived I tried to use Code: Copy Sub Activity_Pause (UserClosed As Boolean) If UserClosed Then Log("main is paused") StartService(PushService) CallSubDelayed(PushService, "ReconnectTimer_Tick") Awake.ReleaseKeepAlive End If End Sub service still not executed anybody can help?
Hello I just creating chat apps, the apps work fine when activity still active, or when user clicked back button message still can be arrived, but if user kill apps with taskmanager (holding home button and swipe it) the apps is killed and service won't start again so message won't arrive anymore how I can handle this? summary : ** Activity (main) Create, isFirst = true ** >>> message still can arrived ** Activity (main) Create, isFirst = false** >>> message still cannot arrived I tried to use Code: Copy Sub Activity_Pause (UserClosed As Boolean) If UserClosed Then Log("main is paused") StartService(PushService) CallSubDelayed(PushService, "ReconnectTimer_Tick") Awake.ReleaseKeepAlive End If End Sub service still not executed anybody can help?
Erel B4X founder Staff member Licensed User Longtime User May 13, 2015 #2 On newer versions of Android, the app will not start after the user explicitly killed it (unless the user has explicitly started it again). Call Service.StartForeground. It may prevent the process from being killed. Upvote 0
On newer versions of Android, the app will not start after the user explicitly killed it (unless the user has explicitly started it again). Call Service.StartForeground. It may prevent the process from being killed.
Reids Member Licensed User Longtime User May 13, 2015 #3 Hi erel, sorry about my post before on other thread, I finally solve the problem, it is because some parameter couldn't be passed from activity to service now the apps work well thank you very much! Upvote 0
Hi erel, sorry about my post before on other thread, I finally solve the problem, it is because some parameter couldn't be passed from activity to service now the apps work well thank you very much!