laviniut Active Member Licensed User Longtime User Oct 7, 2017 #1 I have an application with widget that monitors battery voltage. The old version has a widget with run at boot setting and it works. It was maded with on old version of B4Android. Now i made minor modification and i build it with B4Android 7.3 and it not run automatically at boot. Now it has a starter module. I set run at boot setting to false and to true in starter module, but nothing helps. Not running at boot. Widget module is the same. I use this attributes in widget service: Code: Copy #Region Service Attributes #StartAtBoot: True #StartCommandReturnValue: android.app.Service.START_STICKY #End Region Application is tested on android 7.1.1 Why is that? Last edited: Oct 7, 2017
I have an application with widget that monitors battery voltage. The old version has a widget with run at boot setting and it works. It was maded with on old version of B4Android. Now i made minor modification and i build it with B4Android 7.3 and it not run automatically at boot. Now it has a starter module. I set run at boot setting to false and to true in starter module, but nothing helps. Not running at boot. Widget module is the same. I use this attributes in widget service: Code: Copy #Region Service Attributes #StartAtBoot: True #StartCommandReturnValue: android.app.Service.START_STICKY #End Region Application is tested on android 7.1.1 Why is that?
DonManfred Expert Licensed User Longtime User Oct 7, 2017 #2 laviniut said: and to true in starter module Click to expand... Do not use the starter service for this. You can use any service for this. Just set this setting only to this service. Note the Comments in the starter tutorial. Erel said: Notes The Starter service is identified by its name. You can add a new service named Starter to an existing project and it will be the program entry point. This is an optional feature. You can remove the Starter service. You can call StopService(Me) in Service_Start if you don't want the service to keep on running. However this means that the service will not be able to handle events (for example you will not be able to use the asynchronous SQL methods). The starter service should be excluded from compiled libraries. Its #ExcludeFromLibrary attribute is set to True by default. The starter service should never be explicitly started. This means that if you want to start a service at boot then add a different service. Click to expand... Upvote 0
laviniut said: and to true in starter module Click to expand... Do not use the starter service for this. You can use any service for this. Just set this setting only to this service. Note the Comments in the starter tutorial. Erel said: Notes The Starter service is identified by its name. You can add a new service named Starter to an existing project and it will be the program entry point. This is an optional feature. You can remove the Starter service. You can call StopService(Me) in Service_Start if you don't want the service to keep on running. However this means that the service will not be able to handle events (for example you will not be able to use the asynchronous SQL methods). The starter service should be excluded from compiled libraries. Its #ExcludeFromLibrary attribute is set to True by default. The starter service should never be explicitly started. This means that if you want to start a service at boot then add a different service. Click to expand...
laviniut Active Member Licensed User Longtime User Oct 7, 2017 #3 Do you mean to delete the starter service? I set starter attributes run at boot to false and widget service run at boot to true. But is not working. Not run at boot. Maybe is needed some setting in manifest editor for android 7 to run in background and run at boot? Upvote 0
Do you mean to delete the starter service? I set starter attributes run at boot to false and widget service run at boot to true. But is not working. Not run at boot. Maybe is needed some setting in manifest editor for android 7 to run in background and run at boot?
laviniut Active Member Licensed User Longtime User Oct 7, 2017 #4 I set B4A to work with android 25 and now is starting at boot. I tested on my android 7 tablet. Also i think my phone don't let automatically an application to start at boot. Upvote 0
I set B4A to work with android 25 and now is starting at boot. I tested on my android 7 tablet. Also i think my phone don't let automatically an application to start at boot.
laviniut Active Member Licensed User Longtime User Oct 7, 2017 #5 Something else bothers me now. When application service start at boot, a message in status bar appear and say that application started and you can view other information about application. But i can not delete this message. If i start the application than message disappear automatically. Why is that? Upvote 0
Something else bothers me now. When application service start at boot, a message in status bar appear and say that application started and you can view other information about application. But i can not delete this message. If i start the application than message disappear automatically. Why is that?
Erel B4X founder Staff member Licensed User Longtime User Oct 8, 2017 #6 Why do you need to start it at boot? If the widget is installed then it will start anyway. I'm not familiar with such a message. It sounds like a custom "security" feature. Upvote 0
Why do you need to start it at boot? If the widget is installed then it will start anyway. I'm not familiar with such a message. It sounds like a custom "security" feature.
laviniut Active Member Licensed User Longtime User Oct 10, 2017 #7 After a phone boot i get this message and i can't delete it. If i start application once, the message is gone. My app with widget is Battery monitoring 3. Attachments 2017-10-10-23-53-42.jpg 336 KB · Views: 558 Upvote 0
After a phone boot i get this message and i can't delete it. If i start application once, the message is gone. My app with widget is Battery monitoring 3.
Erel B4X founder Staff member Licensed User Longtime User Oct 11, 2017 #8 This is an OS feature. As I wrote you don't really need to start your app at boot if the widget is installed. It will start anyway. Upvote 0
This is an OS feature. As I wrote you don't really need to start your app at boot if the widget is installed. It will start anyway.
laviniut Active Member Licensed User Longtime User Oct 11, 2017 #9 I understand. I only set run at boot feature at widget module. But my problem is I can't delete the message that appears. Upvote 0
I understand. I only set run at boot feature at widget module. But my problem is I can't delete the message that appears.
DonManfred Expert Licensed User Longtime User Oct 11, 2017 #10 You dont need to do that in your widget. If the widget is placed on the desktop it will start atomatically Upvote 0
You dont need to do that in your widget. If the widget is placed on the desktop it will start atomatically
laviniut Active Member Licensed User Longtime User Oct 11, 2017 #11 Ok. But in my app to put the widget on screen is optional. If widget is not put on screen, than widget is starting automatically? Upvote 0
Ok. But in my app to put the widget on screen is optional. If widget is not put on screen, than widget is starting automatically?
DonManfred Expert Licensed User Longtime User Oct 11, 2017 #12 laviniut said: than widget is starting automatically? Click to expand... No. There is no need to start the widget service manually..... IF it is placed on the desktop then it will be launched automatically by the launcher-app If the widget is not on the desktop then the service will not start Upvote 0
laviniut said: than widget is starting automatically? Click to expand... No. There is no need to start the widget service manually..... IF it is placed on the desktop then it will be launched automatically by the launcher-app If the widget is not on the desktop then the service will not start