Page 1 of 1

Back key creates black screen

Posted: Sat Oct 20, 2012 7:09 pm
by Cool Dave
This has be asked before, but there was no answer, so I'll ask it again rather that post on that old thread.

If I hit the back key in my app, the app closes, but it is still open according to task manager. When I try to open it again, it just shows a black screen. Is there something I can do when I trap it to eliminate this behavior?

Thanks in advance.
Dave

Re: Back key creates black screen

Posted: Sun Oct 21, 2012 2:59 pm
by qberty1337
When your app is being run, when the back key is pressed, the "backKey" message is sent to the current Card of the current Stack you are already on.

You can trap the back key by putting

on backKey

end backKey

in your cards script.

Depending on where you are in your app, Android won't actually CLOSE the app. That's what androids whole "multi-tasker" thing is about.

Re: Back key creates black screen

Posted: Sun Oct 21, 2012 4:24 pm
by deebee
I think this is a known bug that should be fixed for the next minor version release, or so is indicated by support.

Re: Back key creates black screen

Posted: Tue Oct 23, 2012 10:42 pm
by Cool Dave
qberty,

Hitting the back key, unless you have trapped it, does close the app. And also creates this bug. In alomst all android apps, hitting the back button will first navigate to its root menu and then close.

This bug has been around for quite a while, I think. It had better get fixed soon, though, or people will start to complain.

Dave

Re: Back key creates black screen

Posted: Wed Oct 24, 2012 5:41 am
by qberty1337
Cool Dave wrote:qberty,

Hitting the back key, unless you have trapped it, does close the app. And also creates this bug. In alomst all android apps, hitting the back button will first navigate to its root menu and then close.

This bug has been around for quite a while, I think. It had better get fixed soon, though, or people will start to complain.

Dave
It's not a bug. That's how Android's stack UI works.

In a NORMAL android app built from scratch, when pressing back, it only goes back to the pages that the app specifies the backKey will direct to.

SAME thing for LiveCode. Trap it, and tell it where to go. Very simple, and not a bug or big problem.

Re: Back key creates black screen

Posted: Sat Oct 27, 2012 11:09 pm
by Cool Dave
I guess my quoted statement was misleading. What I believe is a bug is Livecode's refusal to reopen the app, after it has been closed using the back button.

On my first card, I do not trap backKey. My app closes properly. Task manager assures me it is still open. That's okay. But when I try to open my app again, I just get a black screen. That's not okay.

Other people have had this same problem, and many have concluded that it is a bug.

Is that clear enough?
Dave

Re: Back key creates black screen

Posted: Sat Oct 27, 2012 11:29 pm
by deebee
Cool Dave wrote:If I hit the back key in my app, the app closes, but it is still open according to task manager.
Not a bug, I agree (EDIT: This IS a bug because as per the documentation, LiveCode closes the app when the backKey message is not captured by a handler). However I think this is where qberty may have stopped reading the post.
Cool Dave wrote:When I try to open it again, it just shows a black screen.
I'd agree this is a bug and I believe it is supposed to be fixed in 5.5.3. I haven't tried yet but maybe someone who has can confirm.

EDIT: Just tried it and it seems to be fixed in 5.5.3!