Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14503] LiveView: A Live-View enabled app should force the screen to stay on

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2016-08-31T20:26:00.000+0000
Affected Version/sRelease 3.1.1
Fix Version/sn/a
ComponentsLiveView
Labelscb-tooling
ReporterFokke Zandbergen
AssigneePraveen Innamuri
Created2013-07-09T19:28:39.000+0000
Updated2017-03-23T22:34:16.000+0000

Description

When Live-View enabling an app, the app should force the device to keep its screen on. This is even more important because my experience is that the LiveView client loses connection when the device goes in lock-mode and doesn't reconnect again. I really have to force-quit the app and re-open to again establish connection.

Comments

  1. Christian Sullivan 2013-07-11

    What version of liveview are you testing on. By default the app will try and reconnect forever if the server is not online. I have tested on liveview 0.1.27 and I am able to lock the device and reconnect on unlock fine.
  2. Fokke Zandbergen 2013-07-12

    Where do you find that version? From the About it says: LiveView Feature 1.0.0.201307021617-3--59H5F8B9F9 com.appcelerator.titanium.liveview.feature.feature.group Appcelerator, Inc. I see there's an update. I'll try that one.
  3. Fokke Zandbergen 2013-07-12

    Still the same with the latest updates. Tried to create a blank project to test if it's just my app, but on these new project(s) even builds fail when having LiveView enabled. The log:
       [TRACE] :  [DEBUG] :  Copying /tmp/liveview.js => /Users/zandbergen/Documents/Appcelerator/TIMOB-14503-V/build/iphone/build/Debug-iphoneos/TIMOB-14503-V.app/app.js
       [TRACE] :  timers.js:103
       [TRACE] :              if (!process.listeners('uncaughtException').length) throw e;
       [TRACE] :                                                                        ^
       [TRACE] :  Error: ENOENT, no such file or directory '/tmp/liveview.js'
       
  4. Christian Sullivan 2013-09-30

    I am not able to reproduce this. Apps run with liveview will automatically attempt to reconnect to the liveview server.
  5. Fokke Zandbergen 2013-09-30

    [~csullivan], good to hear this is fixed. However, I'd still recommend to keep the app alive using [idleTimerDisabled](http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.App-property-idleTimerDisabled) for a better debugging experience without having to disable auto locking on the device as a whole.
  6. Samuel Dowse 2013-12-10

    Tested functionality on: Mac OSX 10.9 Mavericks Appcelerator Studio, build: 3.2.0.201312091648 Titanium SDK, build: 3.2.0.v20131209192649 CLI: 3.2.0-cr Alloy: 1.3.0-cr LiveView: 0.1.35 Android Device: 4.4 +Steps taken+ 1. Updated to latest build of Studio, CLI, SDK and LiveView 2. Created default classic project 3. Enabled LiveView and build to device 4. Screen timed out after 15 seconds Re-Opening
  7. Christian Sullivan 2013-12-10

    Resolved [MASTER] https://github.com/appcelerator/liveview/commit/a59299d15f151dbadb1e1d2896c7566a67b88014 Current latest version of liveview is now 1.0.0
  8. Paras Mishra 2014-05-08

    A connection error occurred after inactivity of app and screen timeout, reopening the issue. Verified the issue on : Device : Google Nexus 4, Android Version: 4.1.1 SDK: 3.3.0.v20140507163312 CLI version : 3.3.0-dev OS : MAC OSX 10.9.2 Alloy: 1.4.0-dev ACS: 1.0.14 npm:1.3.2 LiveView: 1.0.4 Appcelerator Studio, build: 3.3.0.201405011408 titanium-code-processor: 1.1.1 XCode : 5.1.1
  9. Praveen Innamuri 2014-05-29

    iOS supports the global app property idleTimerDisabled to disable the idle timer across the app. However, there isn't a similar property for Android - we need to set the keepScreenOn property across each window/view instance. Since liveview doesn't have access to each view/window of the app, it might not be straight forward to set this property and keep the device awake while the app is run with liveview. In order to keep the device on, it requires a global property similar to iOS. When the app is run, Titanium framework should take care of delegating the property setting value to each window/view instance.
  10. Chris Barber 2016-08-30

    [~msamah] How hard would it be if the Android build baked a boolean property into the app when building with LiveView that would automatically set keepScreenOn to true on ALL windows?
  11. Ashraf Abu 2016-08-31

    I think it would be a little involved. I feel that this approach would be overkill. (Just my opinion.) There's 3 ways that, I believe can, achieve this:- 1) Add that property in the views (the one you mentioned) 2) In the Emulator OR Device, go to Developer options (you need to enable developer mode first) and set it to Stay awake 3) Download a third-party app that keeps the screen on. For development (Live-View), I think choice 2 is not a bad choice. Just a little bit manual but not difficult. What do you think?
  12. Chris Barber 2016-08-31

    I agree with option #2. I'll resolve this ticket. I've also created TIDOC-2570 to update the docs.
  13. Lee Morris 2017-03-23

    Closing ticket as Won't Fix with reference to the above comments.

JSON Source