Android Question Start Screensaver programmatically

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi everyone, I’m developing an app that will run on a panel tablet (kiosk).

This tablet has the screensaver function in system settings (colors or clock) with a button to start it. From settings seems that the screensaver can start ONLY if the tablet is charging… but since it is a tablet panel pc this thing does not kinda work….

SO, the question is: Can I start the screensaver directly from my app? Maybe with some intent idk



Edit:

I attached the sample code with Erel solution for the future people
 

Attachments

  • Screensaver_Test.zip
    10.1 KB · Views: 116
Last edited:
Solution
Try this:
B4X:
Dim in As Intent
in.Initialize("", "")
in.SetComponent("com.android.systemui/com.android.systemui.Somnambulator")
StartActivity(in)

Mike1970

Well-Known Member
Licensed User
Longtime User
Try this:
B4X:
Dim in As Intent
in.Initialize("", "")
in.SetComponent("com.android.systemui/com.android.systemui.Somnambulator")
StartActivity(in)
Update:

This seems to not work while the device is locked in Kiosk Mode, the display lowers the brightness but the screensaver does not actually start.
I tried to add the package "com.android.systemui/com.android.systemui.Somnambulator" or "com.android.systemui.Somnambulator" or both to the allowed apps in Kiosk mode (thinking it was the gold ticket) but didn't work... same behaviour.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…