TaifunTools.KeepScreenOn

I tested this nice ext on some devices.
It works perfectly for me on Samsung phone and tablet.
It didn’t work on Xiaomi and Oppo.
Is there anything I should care about to prevent this issue or any permissions to be granded?

Please cek this, meybe this will help you
https://puravidaapps.com/tools.php

1 Like

which Android version do these devices use?
what exactly means "didn't work"? any error message?

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

1 Like

Xiaomi version is 9 PKQ1.180904.001
Oppo is 9.
“Didn’t work” means it doesn’t KeepScreenOn :slight_smile:
No error message, the display just doesn’t stay on, after the timeout it dims to off.
About the relevant block, there are about 1000 blocks in this app, but on some phones it works as I told (my phone is 8.0.0), so it’s not a matter of instructions i think.

this might be a limitation of these devices?

Are these full Android devices, i.e are they using Android 9? Probably not 100% compatible? Sorry, I'm not familiar whith these... @Anke, you have a lot of test devices, what is your impression?

You might want to try this solution App Inventor Code Snippets | Pura Vida Apps
let us know, how it goes...

Taifun

It works perfectly on a Xiaomi Redmi Note 5 (Android 9, also on Android 8) and also on all other 15 test devices.

I use this method in all of my apps and I have tens of thousands of users. There has never been a problem with it in recent years.

So make a simple test aia with only this block in Screen1.Initialize:

grafik

Nothing else and check it on your Xiaomi (Comanion or APK).

2 Likes

Thank you all.
I tested on Redmi Note 7.
But I will make that simple test program and test it again and let you know.

1 Like

Oh my god, it looks like i spend my time boring you for nothing, sorry. :frowning:
KeepScreenOn works properly.

My mistake was that the block containing KeepScreenOn was disabled by an error of duplication of the block.
Because the IDE lacks in the Search, I often use to duplicate the block name when i want to Find that block quickly among so many blocks:

image

This generates 2 errors that help me to find immediately the block i’m looking for, clicking on the Error arrows Up / Down.
(i don’t know if you use a better method to move among blocks, sometimes i use to leave empty text like fake bookmarks).

This time i forgot to remove the duplication and of course that block was not executed.
Sorry again

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.