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 / Android App Fails to Launch

Author
Message
Brian Lancaster
10
Years of Service
User Offline
Joined: 20th Dec 2013
Location: Oakland, CA
Posted: 23rd Apr 2020 23:46 Edited at: 24th Apr 2020 00:18
Hi. I'm trying to get my game to work on my Android phone. The APK installs fine, I see the icon, but launching it goes to a black screen then closes. I'm designing it to work on a touch screen, but I also have rawinput commands for Windows hotkeys. Are there any other possible reasons or PC-only commands that could be preventing my game from launching? Thanks.

EDIT: Nevermind. Just saw in the help files that rawinput is not cross-platform.

DOUBLE EDIT: I took out all the raw input commands and it's still not launching. About 3 seconds of black screen. Any other compatibility issues I should know about?

Thanks.
Brian Lancaster
10
Years of Service
User Offline
Joined: 20th Dec 2013
Location: Oakland, CA
Posted: 24th Apr 2020 00:26
And also to cut back on my testing work load, can I keep the rawinput commands in the code and just not call them unless a variable touchscreen=0? It would make it easier for future patching. Thanks.
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Brian Lancaster
10
Years of Service
User Offline
Joined: 20th Dec 2013
Location: Oakland, CA
Posted: 24th Apr 2020 01:08 Edited at: 24th Apr 2020 01:24
That is useful. So it's OK to have rawinput commands in the code as long as they are not called on Android, right?

But my original question is the most important: are there any other commands preventing my app from launching on android? I have removed all rawinput commands. I don't want to make people go through 3000 lines of code. Any other commands I should be aware of that are incompatible?
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 24th Apr 2020 01:26
did you try SetErrorMode(1) ?
life's one big game
spec= i5 4ghz, 16gb ram, Nvidia 1070ti gpu
Brian Lancaster
10
Years of Service
User Offline
Joined: 20th Dec 2013
Location: Oakland, CA
Posted: 24th Apr 2020 01:41 Edited at: 24th Apr 2020 01:51
Before I try SetErrorMode is it because I use the text commands and Android doesn't have the windows fonts?

Also, will Android actually come up with an error? I'm not sure how that would be different from windows.

EDIT: Is it this? useNewDefaultFonts(1) Thanks for saving some of my time. Just tell me if you know, I gotta work on some other part for mental sanity.
EdzUp
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: UK
Posted: 24th Apr 2020 04:00
Install the AppGameKit Player on your phone and broadcast from the IDE to your phone for testing this will at least give you way more of an idea than us guessing why it's failing
-EdzUp
AliceSim1
6
Years of Service
User Offline
Joined: 15th Oct 2018
Location: Barcelona
Posted: 24th Apr 2020 11:31
Use the LOGCAT app to trace APK error messages when they run as they return error messages.

I had a crash app error, for using commands that do not exist in the APK version
but in the version AppGameKit Player App if they work.

Notice that the generated APK corresponds to a PREVIOUS compiled version of APK.

Are you using new AppGameKit commands?
AppGameKit Version 2019.12.16
"* Added GetRendererName to return "OpenGL" on desktop platforms and "OpenGLES" on mobile platforms
* Added GetNetworkClientIP to return the IP address of a network client
* Added GetNetworkServerIP to return the IP address of the server"


Notice that the APK is not the current verison AppGameKit, by MP to Paul:

"Hi,
I want to report and help, a BUG CRASH when running the Android app, generated APK.
I have tried other projects and if they work they run.
I use the latest version AGKclassic Windows.

With this it sends to Crash, I put the logcat of the returned error:

native-activity:
Bytecode contains unknown instructions, please update the AppGameKit Player

native-activity:
Unrecognised instruction: 0 in main.agc at line 0

InputDispatcher:
channel 'fd4ae46 com.alicesim1.cyberhotel/com.thegamecreators.agk_player.AGKActivity (server)' ~ Channel is unrecoverably broken and will be disposed!


Thanks, I don't know what problem my game has, which causes this strange error."


The GetRawKey and GetRawJoystick commands are fully functional on Android, since it is possible to use physical keyboards and mice by USB-OTG it really works!
And it is not a problem for S.O. Android


Strongly use the LOGCAT app, Also try other different Android devices to discard
Brian Lancaster
10
Years of Service
User Offline
Joined: 20th Dec 2013
Location: Oakland, CA
Posted: 24th Apr 2020 11:37
Excellent thanks. I will install AppGameKit Player and use LOGAPP in a couple days.

The help files say rawinput commands are not compatible, but I hope you are right.

I tried it on two phones, both of which I bought from Walgreens for $20, but they run plenty of games just fine.
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 24th Apr 2020 15:24
Are you using AppGameKit Classic, or AppGameKit Studio? The latter has had some trouble with Android export.
Brian Lancaster
10
Years of Service
User Offline
Joined: 20th Dec 2013
Location: Oakland, CA
Posted: 24th Apr 2020 22:17 Edited at: 25th Apr 2020 04:24
Classic. My android got really hot for 3 seconds on a blank screen then the app closed. I might just need a better Android.

I'm gonna try all this stuff in a week or so and get back to you.
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 24th Apr 2020 22:25
It seems like fortunetelling, but I will try.

It is like you are processing something in a loop that is not correct.
Brian Lancaster
10
Years of Service
User Offline
Joined: 20th Dec 2013
Location: Oakland, CA
Posted: 8th May 2020 11:32
I'm gonna check next week, I swear. Other business things arose and I don't want the post to close, but thank you everyone.

Login to post a reply

Server time is: 2024-11-22 04:14:05
Your offset time is: 2024-11-22 04:14:05