Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / App Game kit classic android exit app problem.

Author
Message
Telemac
7
Years of Service
User Offline
Joined: 9th Feb 2017
Playing:
Posted: 12th Feb 2021 13:29
Hello,

When I quit my app on Android everything looks ok, but in the background the app stays open with a black screen (see attached file) and I have to manually close it otherwise the app refuses to restart.

to close app i use :

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 12th Feb 2021 22:48 Edited at: 12th Feb 2021 22:50
Try this pseudocode

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Feb 2021 23:18
I think they do that because when they terminated the app they were getting an app crashed alert which downgraded the app on the play store.
I have a lot of apps on my phone and i don't think ANY of them actually terminate
n00bstar
20
Years of Service
User Offline
Joined: 9th Feb 2004
Location: Montreal, Canada.
Posted: 13th Feb 2021 14:26
I think it's assumed that on mobile devices, you terminate apps from the multitasking pane. If your app is going to run both on mobile and desktop, you can simply check which platform it's currently running on and offer a quit function for desktop only.
-----------------------------------------------------------------------------
We all got a chicken duck woman thing waiting for us
TamBam
12
Years of Service
User Offline
Joined: 29th Nov 2011
Location: India
Posted: 20th Feb 2021 18:47 Edited at: 20th Feb 2021 19:03
I also put same post on Studio forum ..
Paul answer me as below =
AGK used to force the app to quit when you used the end command on Android, however the Google Play store started counting this as a crash and scoring the app negatively if it had too many crashes. So now the end command will send the app to the background to keep Google Play happy.


https://forum.thegamecreators.com/thread/227018
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 20th Feb 2021 19:22 Edited at: 21st Feb 2021 02:35
"End" is also the last command of any AppGameKit program.
https://github.com/TheGameCreators/AGKTier2/blob/master/apps/interpreter/ProgramData.cpp#L886
So simply reaching the end of byte code will do the same thing as calling End.

When AppGameKit changed a couple of updates ago, I had to change my programs to call MinimizeApp() at the end and loop back to the top.
PSY
Developer
8
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 21st Feb 2021 19:04 Edited at: 21st Feb 2021 19:05
Try MinimizeApp() instead of using End

That should fix the problem


PSY


PSY LABS Games
Coders don't die, they just gosub without return
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 21st Feb 2021 20:35
@PSY: If I remember correctly, only calling MinimizeApp at the end requires the user force close the app in order to restart it. The last instruction in the bytecode is always "end".
n00bstar
20
Years of Service
User Offline
Joined: 9th Feb 2004
Location: Montreal, Canada.
Posted: 21st Feb 2021 22:41
This works fine too...

-----------------------------------------------------------------------------
We all got a chicken duck woman thing waiting for us
PSY
Developer
8
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 22nd Feb 2021 02:16
@adambiser
Sorry, for some reason I didn't realize you mentioned MinimizeApp() in your post before mine.
Thanks for the info
Gonna run some tests on this.

@n00bstar
LOL

PSY


PSY LABS Games
Coders don't die, they just gosub without return
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 22nd Feb 2021 04:10
@PSY: MinimizeApp and loop back to the beginning or the user has to force close the app manually.

But all of this feels like a workaround for a problem in the engine. Why doesn't AppGameKit handle the END statement better on Android?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 22nd Feb 2021 06:19
I think it's the way apps are on mobile devices as opposed to an END statement problem.
Mobile device apps simply do not end.
I have a ton of apps on my android device and absolutely NONE of them have an exit button...none i tells ya!!
adambiser
AGK Developer
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 22nd Feb 2021 06:49
@blink0k: Which is why I think that END should be handled better for mobile than it is since END isn't really something for mobile apps. It makes more since for END to minimize the app and put it back into the beginning state.

Login to post a reply

Server time is: 2024-11-24 05:45:01
Your offset time is: 2024-11-24 05:45:01