Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5190] Android: Add "Ti.App.idleTimerDisabled" support

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, parity
ReporterReggie Seagraves
AssigneeJoshua Quick
Created2011-09-01T10:21:54.000+0000
Updated2018-11-09T00:25:54.000+0000

Description

This is the iOS side of android ticket TIMOB-2102

Comments

  1. Michael Gangolf 2017-04-17

    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.
  2. Sandro Lain 2018-11-07

    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).
  3. Joshua Quick 2018-11-07

    [~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.
  4. Sandro Lain 2018-11-08

    Hello Thanks, I try to use "keepScreenOn". Is the setting to be given for each Window or just set it on the main one?
  5. Joshua Quick 2018-11-09

    [~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.

JSON Source