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.

Android / android tier 1 problem

Author
Message
sovr
14
Years of Service
User Offline
Joined: 2nd Jan 2010
Location: USA
Posted: 15th Jun 2012 01:34 Edited at: 15th Jun 2012 01:38
Hello, I have looked at the tier 1 android guide, and looked at different posts on the forums and I am still having problems with having my tier 1 app working. Here are the things that I have done so far:

-followed the android guide in tier 1 and seemed to work, except when I put in my tier 1 app.

-created media folder in assets and put bytcode.byc in media
-uncommented the strcopy thing in the .cpp file
-even added in some of the blank strcopy's in the start of the .cpp file with bytecode.byc.

-the tier 1 app works perfectly in the agk IDE
*has http commands, advertisement commands, openbrowser command
*common pre-1.07 commands in it also

here is what eclipse says in the console:




What shows on the android screen simulator is a blank black screen. The orientation questions work, but that is it. Thank you for you help, cheers!



edit: this is what it shows for cygdrive:



sov the game creator!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th Jun 2012 18:28
What version of AppGameKit are you using?

They did away with the need for the orientation question thing in 1075 and fixed it in 1076.

Quote: "-even added in some of the blank strcopy's in the start of the .cpp file with bytecode.byc."


I'm not sure what you mean by this, but it might not have been a good idea.

Which line did you uncomment? If it wasn't the one after "#ifdef IDE_ANDROID", it wasn't the correct one. That is the only line you need to change in interpreter.cpp.

Do you have an Android device that you can test on? I never got the simulator to work properly. I'm not sure I ever saw the app show up in it.

This might be a dumb question, but are you trying to run the interpreter_android project or one that you created using a renamed copy of that directory?

Cheers,
Ancient Lady
sovr
14
Years of Service
User Offline
Joined: 2nd Jan 2010
Location: USA
Posted: 15th Jun 2012 18:39
I did un-commented the IDE_ANDROID, I do have an android device but I havent tested it yet. I have not copied the interpereter_android folder. I guess I can test it on the device and see what happens.

sov the game creator!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 15th Jun 2012 19:06
You might have more success on the actual device. Like I said, I never got the simulator to work for me. It might be my setup or an inherent fault in the simulator.

Cheers,
Ancient Lady
sovr
14
Years of Service
User Offline
Joined: 2nd Jan 2010
Location: USA
Posted: 18th Jun 2012 08:15
Ok I did try putting my app on a motorola android phone. It is 1-2 generations old, but I got a problem when installing my applications .apk onto the device.

It seemed to work, downloading the USB drivers and google USB driver and everything! in till I press the run button and select my device, the compiler says this:





again thank you for your help! I will go over the guide one more time tomorrow and see if I missed anything.

sov the game creator!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 18th Jun 2012 15:52
Did you edit the AndroidManifest.xml to set the package name for your game?

The fourth line of the original file has 'package="com.thegamecreators.agk_player"'.

For your own apps, you need to change that to something specific to you. Replace 'thegamecreators' with the name you want to be associated with you/your company. Replace 'agk_player' with the name of your app, no spaces.

Cheers,
Ancient Lady
sovr
14
Years of Service
User Offline
Joined: 2nd Jan 2010
Location: USA
Posted: 19th Jun 2012 00:27 Edited at: 19th Jun 2012 00:28
ok I did change the package to something unique. The app loads on perfectly to the android device, but after having the app ask you to do the orientation it just crashes. Again it works in tier 1, but when ever I try to put it on devices, it crashes? It is almost like I have to do tier 2 .

The problem is, there is no real proof to show except for a blank screen... I guess I will just be poking around in my code to figure it out. Thank you for your help

P.s. If anyone figures out my problem that would be great if you could post! again thank you

sov the game creator!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 19th Jun 2012 00:58
If you are using AppGameKit 1075 or 1076, then you don't do the orientation thing anymore.

Can you show us some of the code so we can see what you are trying to do?

Cheers,
Ancient Lady
sovr
14
Years of Service
User Offline
Joined: 2nd Jan 2010
Location: USA
Posted: 19th Jun 2012 05:18 Edited at: 19th Jun 2012 05:52
well I made sure I had 1.076 and re-installed it. Here is the code for the app:




I am sorry for how long it is :-( , but there it is. Even after re-installing 1.076 it still asks me for the calibration question? While I re-installed the 1.076 I re-compiled my project and did the huge guide over again updating everything and my app still crashes. It has to be something in the tier 1 code.



edit: When I think about it, there might be an issue with directories/file creation for android? or maybe http issues... I do know the http server is up all the time and works just fine.

newer edit: wow I can not believe this! I did a hello world app and it worked just fine. hmmmm, This problem reminds me of a problem I would run into with dark basic pro. The problem might be because of the lack of initializing variables at the start of the program, maybe. I will keep on looking.

sov the game creator!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 19th Jun 2012 05:57
Have you run the app in Windows and verified that all the correct files get downloaded to your Documents/AGK/<yourapp>/media directory?

I just spotted your probable problem.

When you download the files from the site, they do not go in the media directory under the app. They go where ever the device specifies app data goes. On Windows it is in Documents/AGK/<yourapp>/media.

So, when you try to load the images after you call gethttpfiles(), they are not where the app expects them to be.

At least, that is my guess.

Cheers,
Ancient Lady
sovr
14
Years of Service
User Offline
Joined: 2nd Jan 2010
Location: USA
Posted: 19th Jun 2012 06:24
no it is not that, but I did some stub testing (I think that is the proper way of calling it), when you test the functions individually. Everything seems fine in till I get to the gethttpfiles() function, which made the app crash. Again I will be splitting it up and looking even further to see what is making this app crash, again thank you for your help.

sov the game creator!

Login to post a reply

Server time is: 2024-11-23 15:04:46
Your offset time is: 2024-11-23 15:04:46