M molder26 Member Licensed User Longtime User Jul 1, 2011 #1 Hi guys, i am newbie in b4a and i want create a service without activity. the service need be started in the actvity? For example: Sub Activity_Create(FirstTime As Boolean) StartService (test) End Sub This code start my service, but when the service code is finished the screen is black like the program not is in background. Thanks in advance Regards mou
Hi guys, i am newbie in b4a and i want create a service without activity. the service need be started in the actvity? For example: Sub Activity_Create(FirstTime As Boolean) StartService (test) End Sub This code start my service, but when the service code is finished the screen is black like the program not is in background. Thanks in advance Regards mou
eps Expert Licensed User Longtime User Jul 1, 2011 #2 This is what I would expect to happen. The Activity has a screen. You haven't defined any objects on the screen, so it has started the Service and displays the blank screen... What exactly are you trying to achieve here? You could probably set the Activity to not display... I would suggest reading the documentation. Upvote 0
This is what I would expect to happen. The Activity has a screen. You haven't defined any objects on the screen, so it has started the Service and displays the blank screen... What exactly are you trying to achieve here? You could probably set the Activity to not display... I would suggest reading the documentation.
M molder26 Member Licensed User Longtime User Jul 1, 2011 #3 hi eps, the idea is start a service in background without any activity visible, because the idea is run a background code and dont need show nothing to the user. Upvote 0
hi eps, the idea is start a service in background without any activity visible, because the idea is run a background code and dont need show nothing to the user.
M molder26 Member Licensed User Longtime User Jul 2, 2011 #5 hi eps, i am using activity.finish now, but this open the activity show a black screen and after close the activity, and i want do without show the activity. But if it's not possible then i will continue it like now. Thanks eps Regards Upvote 0
hi eps, i am using activity.finish now, but this open the activity show a black screen and after close the activity, and i want do without show the activity. But if it's not possible then i will continue it like now. Thanks eps Regards
Erel B4X founder Staff member Licensed User Longtime User Jul 3, 2011 #6 Your other option is to start the service after device boot. This is done by choosing Project - Service properties - Start at boot. Upvote 0
Your other option is to start the service after device boot. This is done by choosing Project - Service properties - Start at boot.
eps Expert Licensed User Longtime User Jul 4, 2011 #7 Erel said: Your other option is to start the service after device boot. This is done by choosing Project - Service properties - Start at boot. Click to expand... Hadn't realised this, thanks for that Erel Upvote 0
Erel said: Your other option is to start the service after device boot. This is done by choosing Project - Service properties - Start at boot. Click to expand... Hadn't realised this, thanks for that Erel