Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Android: Keeping screen awake + enabling the keyguard, possible?

Explorer ,
Oct 17, 2013 Oct 17, 2013

The people at the Samsung App Store have a problem with disabling the lockscreen on their apps.

So when I have these 2 permissions enabled:


<uses-permission android:name="android.permission.WAKE_LOCK" />

<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />

it makes sure the application does not dim the screen, however it also disables the lockscreen of course.

Is there no way to make sure the screen does not dim while still having the lockscreen enabled?

SInce Samsung rejects apps for this...

TOPICS
Development
3.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 17, 2013 Oct 17, 2013

Have you also set:

NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 17, 2013 Oct 17, 2013

I did actually, and I toggle between the NORMAL and KEEP_AWAKE when going into the background.

But somehow I managed to get the screen to stay awake without that DISABLE_KEYGUARD line in the permissions at this point.

So I think it's fully working... it's still strange that it went to dim the screen at a certain point in a previous build of my app.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 11, 2014 Oct 11, 2014
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 03, 2016 Nov 03, 2016
LATEST

I had the same problem so I implemented own keepAwake function as a part of this open source ANE https://github.com/Oldes/ANEAndroidCommon

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines