Page 1 of 2

Tablet goes to sleep, half of app disappears

Posted: Tue Apr 01, 2014 6:52 am
by paul_gr
Hi all,
I use a smart cover that puts my Android Tablet to sleep.
On restart any LC app I have running is half blacked out; I have to close and open the app to recover.
Device is Galaxy Note 8.0 running Android 4.2.2.
Test App is very simple; one card, one button...
I've tried every combo of fullscreenmode.
Problem occurs in LC 6.5.2 and LC 6.6.

As a workaround, is there any way force an app to close if the device goes to sleep?
Then at least it can be restarted without showing half an app.
I'm fairly new to Android so any help appreciated.

Paul

Re: Tablet goes to sleep, half of app disappears

Posted: Tue Apr 01, 2014 2:21 pm
by pkocsis
Hello Paul,

This sounds related to my bug 12035. Although my bug as reported is demonstrated in my test stack by using mobilePickPhoto "camera", I'm really starting to think that it may have nothing to do with mobilePickPhoto, but more to do with a problem with screen repaints after some orientation changes have occurred during the time that the main LC stack screen was obscured by either the camera app (as in my test stack), or by a screen timeout where your app may not really have been swapped out of memory and is actually still "active". Feel free to add a comment to that bug report if you think this might indeed be the case...

Thanks for putting this on the forum Paul.

Paul K.

Re: Tablet goes to sleep, half of app disappears

Posted: Tue Apr 01, 2014 9:29 pm
by paul_gr
Hi Paul K,
I'm inclined to agree with you.

App is one textbox to display the mobileDeviceOrientation.
Nothing else.
If the device goes to sleep and then wakes up the app shows about 60%.
see attached.

I'll open a new bug report and mention yours in it.
UPDATE -- opened bug 12099
http://quality.runrev.com/show_bug.cgi?id=12099

Re: Tablet goes to sleep, half of app disappears

Posted: Wed Apr 02, 2014 1:51 am
by pkocsis
Yes, that looks eerily similar to what I'm seeing on my Nexus 5 phone. Only difference is about 50% of my screen goes black compared with your 40%.....but I'd be surprised if they are not related.

Thanks for mentioning my bug report in your bug report :) ...was starting to wonder if they're thinking I'm nuts with what I see happening, so your mention of my bug adds credibility to my report (and hopefully vice-versa).

Paul K.

Re: Tablet goes to sleep, half of app disappears

Posted: Wed Apr 02, 2014 8:21 pm
by paul_gr
HI Paul K,
Another user (Panos Merakos) confirmed the behaviour I am seeing.

Try this.
Drop a square on the left of one of your stacks. Make the square the same size as the width of the stack in portrait mode. My stack is 1280x800, the same size as my device, so the square is 800x800.
On my device after recovering from sleep in landscape mode the visible part of the stack is the same size and shape as the square.
Would be useful to see if your device does the same.

Paul

Re: Tablet goes to sleep, half of app disappears

Posted: Thu Apr 03, 2014 12:31 am
by pkocsis
Hi Paul,

My test stack on my Nexus 5 is portrait only. When I'm able to get LC confused, holding the phone in portrait, the bottom half-ish (less than half actually) is black. I've done what you've described and agree that the height of the visible portion of my stack is equal to the width of the stack.

I really hope they take this problem seriously and can fix it soon. In the normal use of my app, even though its meant to be used portrait only, since I use mobilePickPhoto "camera" and sometimes users utilize the camera in landscape, this triggers the LC orientation confusion and the result is an app that users label as buggy....

In trying to find a workaround...so far I've noticed that if I put an input field in the top part of the stack (the 'visible' part of the stack once this bug happens), once I get the bug to rear its head, if I tap the input field to make the keyboard come up, *that* somehow makes the app redraw and become fully visible again. Not a workaround, but at least that shows that there may be a way to recover. Since this bug (for me) seems to happen when my stack is obscured by the camera (mobilePickPhoto) and an orientation change occurs while the stack is underneath the camera app, I'm gonna try to put this after mobilePickPhoto returns:

lock screen
set the fullscreenmode of this stack to empty
set the fullscreenmode of this stack to "letterbox"
unlock screen

....gonna test with stuff like that to see if I can force the screen to fully redraw after the camera is dismissed...will post back if I find a way....

Re: Tablet goes to sleep, half of app disappears

Posted: Thu Apr 03, 2014 12:56 am
by pkocsis
Well, toggling the screen did not make the screen fully redraw. Even commenting out the lock/unlock screen statements, once the bug appears and the bottom of my screen is black, you can see the fullscreenmode switch as it goes from empty then back to letterbox, yet the black part never changes.....(sigh)......will keep trying things, but I would think this would be a fixable thing....hope it gets attention soon from LC folks as for some (many?), this kind of bug really makes an app look bad/buggy to users.....

Re: Tablet goes to sleep, half of app disappears

Posted: Thu Apr 03, 2014 1:04 am
by pkocsis
One more observation. My test stack was using "letterbox"....and I thought, "well, letterbox can render black top/bottom (or left/right) whereas "showAll" does not do that".

So I changed to "showAll", interested if the bottom of the screen would still be black or the color of my card. No change, using "showAll" instead of letterbox, the bug remains the same with the bottom of my screen being black...FWIW...

Re: Tablet goes to sleep, half of app disappears

Posted: Thu Apr 03, 2014 1:23 am
by sefrojones
I get the same effect with "exactfit" as well.....

Re: Tablet goes to sleep, half of app disappears

Posted: Tue Apr 08, 2014 4:38 pm
by LCNeil
Hi All,

This issue should be fixed in todays 6.6.1 release. Please update to this version and let us know how you get on

http://downloads.livecode.com/livecode/

Kind Regards,


Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——

Re: Tablet goes to sleep, half of app disappears

Posted: Tue Apr 08, 2014 5:37 pm
by pkocsis
Hello Neil,

Unfortunately, the bug is NOT fixed. See my original bug 12035.

Also, bug 12099 of which my bug was marked a duplicate of, shows a status of "awaiting build", yet it is not included in the release notes of 6.6.1gm1.

Trying the test stack in my original bug 12035 along with my added notes in that bug clearly shows that this bug is not fixed in 6.6.1gm1

Paul K.

EDIT: was the "awaiting build" fix for bug 12099 left out of the release build of 6.6.1?

Re: Tablet goes to sleep, half of app disappears

Posted: Tue Apr 08, 2014 6:02 pm
by LCNeil
Hi Paul,

I may have jumped the gun a bit :)

The bug that has been resolved is http://quality.runrev.com/show_bug.cgi?id=11708, which does relate to a specific Android wake issue.

I have spoken to our developer, Panos, and he has informed me that the bug 12099 should be scheduled for the next build of LiveCode.

Kind Regards,


Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——

Re: Tablet goes to sleep, half of app disappears

Posted: Tue Apr 08, 2014 11:40 pm
by paul_gr
runrevneil wrote:Hi Paul,
I may have jumped the gun a bit :)
Thanks for letting us know...

Paul G

Re: Tablet goes to sleep, half of app disappears

Posted: Sun Nov 29, 2015 9:56 pm
by KimD
Hi

Where did this get to? I suspect that I'm seeing the same thing.

LiveCode 7.1; deployed to an Android 5.1 smartphone for testing. The app that I'm testing currently does not implement any scaling / fullscreen commands.

Upon re-activating the app, using the recent apps button, after the phone has gone to sleep - the app is sometimes restored with only 60% of the card displayed. The remaining 40% of the card is black. The app "is still there", because buttons that are in the black area (I can't see them, I just know where they are) still respond to touches. The effect of the touch can be to reverse which 60% of the card is displayed (if the bottom 60% was being displayed, then it is reversed and the top 60% is now displayed), but other than killing and re-starting the app I haven't found a way to get the whole 100% of the card back on display.

This problem is inconsistent. It occurs for me about 10% of the time that I re-activate my test app.

Thanks in advance

Re: Tablet goes to sleep, half of app disappears

Posted: Tue Dec 08, 2015 12:36 pm
by rblackmore245
I have had this problem recently with a android app I created.

Only way around it was either to force the screenlock on so it never timed out or to use the

on orientationChanged

and when the app changes orientation it fires the quit so it is not on the screen.

See video of this happening in an app when the screen goes into the lock screen and is rotated and then unlocked.

https://www.youtube.com/watch?v=XTiYWZs9erk