JakeBullet70 Well-Known Member Licensed User Longtime User Sep 17, 2016 #1 Hi all. Trying to create an app with no gui. just basically a service that's runs at startup and monitors some things and logs to a text file. I have that working fine. But I want to get rid of the activity screen. How do I do that? thanks.
Hi all. Trying to create an app with no gui. just basically a service that's runs at startup and monitors some things and logs to a text file. I have that working fine. But I want to get rid of the activity screen. How do I do that? thanks.
KMatle Expert Licensed User Longtime User Sep 17, 2016 #2 You can create a sticky service and close the activity directly after it has been created (so it appears just a millisecond). I have a gps tracker app which works fine that way. Upvote 0
You can create a sticky service and close the activity directly after it has been created (so it appears just a millisecond). I have a gps tracker app which works fine that way.
JakeBullet70 Well-Known Member Licensed User Longtime User Sep 17, 2016 #3 I tried activity.finish. How are you closing the activity? Upvote 0
JakeBullet70 Well-Known Member Licensed User Longtime User Sep 17, 2016 #4 I also have everything in he Starter service. did you use a normal service? Upvote 0
imbault Well-Known Member Licensed User Longtime User Sep 17, 2016 #5 You should have a look on this Service tutorial : Service Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Sep 18, 2016 #6 1. Just call Activity.Finish in Activity_Create of the main activity. 2. You need to add another service. The starter service should never be explicitly started. Upvote 0
1. Just call Activity.Finish in Activity_Create of the main activity. 2. You need to add another service. The starter service should never be explicitly started.
JakeBullet70 Well-Known Member Licensed User Longtime User Sep 19, 2016 #7 Thanks all. Moved this last weekend to a new flat so have not had time to get back to this. Upvote 0
JakeBullet70 Well-Known Member Licensed User Longtime User Sep 20, 2016 #8 I have all working now. Thought I would share the source code. Thanks! https://www.b4x.com/android/forum/threads/app-power-switcher-source-code.71163/ Upvote 0
I have all working now. Thought I would share the source code. Thanks! https://www.b4x.com/android/forum/threads/app-power-switcher-source-code.71163/