[TIMOB-14503] LiveView: A Live-View enabled app should force the screen to stay on
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2016-08-31T20:26:00.000+0000 |
Affected Version/s | Release 3.1.1 |
Fix Version/s | n/a |
Components | LiveView |
Labels | cb-tooling |
Reporter | Fokke Zandbergen |
Assignee | Praveen Innamuri |
Created | 2013-07-09T19:28:39.000+0000 |
Updated | 2017-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.
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.
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.
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:
I am not able to reproduce this. Apps run with liveview will automatically attempt to reconnect to the liveview server.
[~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.
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
Resolved [MASTER] https://github.com/appcelerator/liveview/commit/a59299d15f151dbadb1e1d2896c7566a67b88014 Current latest version of liveview is now 1.0.0
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
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.
[~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?
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?I agree with option #2. I'll resolve this ticket. I've also created TIDOC-2570 to update the docs.
Closing ticket as Won't Fix with reference to the above comments.