[TIMOB-5190] Android: Add "Ti.App.idleTimerDisabled" support
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, parity |
Reporter | Reggie Seagraves |
Assignee | Joshua Quick |
Created | 2011-09-01T10:21:54.000+0000 |
Updated | 2018-11-09T00:25:54.000+0000 |
Description
This is the iOS side of android ticket TIMOB-2102
There is http://docs.appcelerator.com/platform/latest/#!/api/Titanium.App-property-idleTimerDisabled for controlling the whole application. It might be useful to link this to
keepScreenOn
and enable/disable it when this window is opened/closed.Hello I have the same problem. On an app that I developed that performs communication and recordings of data that can take several minutes we need to keep the app active and visible on android (for display of a time chart).
[~sandrolain], the Android equivalent is to set the window or view's "keepScreenOn" property
true
instead. Just note that you'll to set this property on every window that needs to keep the screen on. See... https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-keepScreenOn So, this is not a bug. This concept exists on both Android and iOS. The issue is that there is no parity between the 2 platforms because they're natively achieved in different ways. On iOS, this is set globally on the app. On Android, this is set per window or view. I hope this helps.Hello Thanks, I try to use "keepScreenOn". Is the setting to be given for each Window or just set it on the main one?
[~sandrolain], you need to use "keepScreenOn" on every window on Android. That is, the window with "keepScreenOn" needs to be in the foreground in order for it to keep the screen on. If you display a child window on top of it and the child window's "keepScreenOn" is not set to
true
, then it won't keep the screen on. This is the native Android behavior.