From aea246e6666cd69febd3ed057c826690a1f977a1 Mon Sep 17 00:00:00 2001 From: Ben Rousch Date: Fri, 11 Oct 2013 14:23:10 -0400 Subject: [PATCH] Added android.wakelock option --- buildozer/default.spec | 4 ++++ buildozer/targets/android.py | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/buildozer/default.spec b/buildozer/default.spec index 96dc2ad..b60300b 100644 --- a/buildozer/default.spec +++ b/buildozer/default.spec @@ -98,6 +98,10 @@ fullscreen = 1 # (list) Android additionnal libraries to copy into libs/armeabi #android.add_libs_armeabi = libs/android/*.so +# (bool) Indicate whether the screen should stay on +# Don't forget to add the WAKE_LOCK permission if you set this to True +#android.wakelock = False + # # iOS specific # diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index 15f5123..8152932 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -457,6 +457,11 @@ class TargetAndroid(Target): if not fullscreen: build_cmd += ' --window' + # wakelock ? + wakelock = config.getbooldefault('app', 'android.wakelock', False) + if wakelock: + build_cmd += ' --wakelock' + # intent filters intent_filters = config.getdefault('app', 'android.manifest.intent_filters', '')