AutoBoot and/or Alarm not working after reboot

182 views
Skip to first unread message

Jo Elegolo

unread,
Mar 20, 2021, 10:51:51 AM3/20/21
to DroidScript

Dear Developers,
desparate I'm growing. Be sure, I've tried several days to find a working solution.

Appended is an SDK, with which I tried to have an app running automatically after reboot.
It uses 2 possibilities, namely app.SetAutoBoot( true ) and app.SetAlarm( ... ).
Also appended is a screenshot of the running app, showing DS Version (2.06) and OS version (23).
(The app contains a TERMINATE button to safely reset AutoBoot and Alarm, which I did NOT use to terminate the app before performing the reboot.) After manually starting the app and having pressed the Back-button, the Alarm always brings the app to the foreground when activated (about) every 15 seconds (the internal count shown on screen in Geen colour is counting on). If I terminate the app by deleting it from the app list, the alarm restarts the app (count is resetted then). Everything works as expected so far. However, performing a reboot results in no (automatic) action at all, the app remains dead.

Can anybody give some help, tell me what I am doing wrong or open alternatives? (I cannot use the new scheduling command, as of its requirement for long term timeouts. I need a quite fast - about 15 sec is ok - startup after reboot.)
Jo

Annotation to the spk-source: Commented out is the use of a debug file for showing the call sequences. Unfortunately, whenever I made a reboot, the file, that correctly showed debugged content before as expected, vanished as if deleted(?) I presume the system shutdown breaks one of the outputting WriteFile operations, what leads to an undefined file description block, or such.

robby.jpg
checkAlarm.spk
Message has been deleted

Jo Elegolo

unread,
Mar 20, 2021, 11:49:57 AM3/20/21
to DroidScript
Sorry, I've deleted my 2nd post, as it might have been incorrect. Still testing ...

Jo Elegolo

unread,
Mar 20, 2021, 12:00:12 PM3/20/21
to DroidScript
Sorry again, info of 2nd post had been correct:
Automatic start after reboot works on OS 22 ( A 5.1.1 ), (2) permissions had been requested on installation.
NO automatic start after reboot on OS28 ( A 9.0 ), no permissions requested on installation.
As of post1:
NO automatic start after reboot on OS23 ( A 6.0 ), no permissions requested on installation.

APKs were generated using DS 2.06 with APK builder downloaded/installed via DS ide menu.

Regards
Jo

I'll try to find out, which permissions to be given and how to do that via coding ...

Jo Elegolo

unread,
Mar 20, 2021, 12:48:25 PM3/20/21
to DroidScript
I tried to use the X-Version (DS 2.06), manually installed. I installed the APK builder (2.06X) via DS as well - shown in the docs as installed and message box 'package installed' popped up after install. But after that, whenever I want to build an APK, a dialog box pops up, telling that an APK builder is requested instead to be installed via Plugins-Menu-Topic (Its in German, so my retranslation might be incorrect). When I use the ide setting plugins menu to reinstall the APK, I can build the APK, but I am afraid this could not be the right (X) version used then.
(Android 9.0 / OS 28)

Dave

unread,
Mar 21, 2021, 7:29:32 AM3/21/21
to DroidScript
More recent version of Android and certain models of phone (particularly Huawei) have settings which control whether apps are allowed to automatically start at boot.  Sometimes these settings appear to default to blocking apps starting at boot.  Check what your Android settings/permissions are set to.

What model of phones are you using?

Jo Elegolo

unread,
Mar 21, 2021, 6:09:52 PM3/21/21
to DroidScript
Hi Dave,
the phone without the problem is a Samsung Galaxy (Android 5.1.1), the two other showing the issue are relatively cheap and unusual ones, namely 'Wiko Robby' (by a French company with Android 6.0) and an 'Acepad A130' tablet (German company, Android 9.0). The latter is the one I want to have my 'kiosk' system running on.
I now understand that my problem is not general, but special for the very system 'clone' that runs the device, so I have to look for a solution myself, i.e. finding the switch to turn on or off somewhere in the settings (if available).

Thank you for your support
Jo

Dave

unread,
Apr 5, 2021, 8:34:56 AM4/5/21
to DroidScript
If you are making a kiosk on Android 9, then you might want to use the proper Android COSU feature which DroidScript supports.

You need to turn it on via ADB using a USB cable.  

Reply all
Reply to author
Forward
0 new messages