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 / [Tier 1]Trying To Get APK File Working

Author
Message
FakeBlood
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 27th Jul 2012 18:53 Edited at: 27th Jul 2012 19:03
Well, I see TGC hasn't changed much in the over 10 years I've been away...(can't keep anything up to date or bugs to a minimum)

anyway...

Just recently purchased AppGameKit since I have some hope in it, and the programming side is really easy...

I've compiled my APK file in eclipse..apparently it worked or it wouldn't be there.
When I put it on an Android device there is simply a blank screen.
I read a lot of posts (update docs please!) about placing media and bytecode file in a media folder.
I did that (inside of assets folder)...
Question is does this media folder have to be created while you are creating your project in AppGameKit and then in your AppGameKit BASIC code load images etc from this media folder, or do you simply move the files into this media folder once you create an Eclipse project?

Once again I don't think I have any errors or anything so I assume it's got to be something simple.
I did not create a media folder while programming the simple application in AGK.

[EDIT] I'm using the newest version of AppGameKit btw.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jul 2012 19:18
Did you update the settings on your Android device to allow USB debugging mode?

And, did your Windows acknowledge that the device was connected?

Cheers,
Ancient Lady
AGK Community Tester
FakeBlood
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 27th Jul 2012 19:52
I'm using BlueStacks (a virtual Android device) and installing the APK file directly on to the device.

I'm not broadcasting.

The device allows debugging.
FakeBlood
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 27th Jul 2012 19:59
When i make my app in agk do i need to use a media folder and load images with /media/aaa.png etc... Or do i just move the files once im in eclipse?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jul 2012 20:14
In your android directory on your Windows machine, the one you use eclipse to build the package, there is or should be a directory named assets. If it doesn't exist, create it and then add a subdirectory named media under it.

You should end up <yourproj>/assets/media in your Windows android setup.

You copy your <yourapp>.byc file and all your media and other input files from your AGK/Projects/Basic/<yourapp>/media directory to the assets/media directory.

You do need the AGK/Projects/Basic/<yourapp>/media directory. Since 1074, all Tier 1 apps and platforms require the media directory. It is where the AppGameKit IDE will put the <yourapp>.byc byte code file that the interpreters for each platform use (including Windows).

That is all you need to do. Then do the cygwin build, just to make sure and then open the project in eclipse and generate the apk. The generated apk file will have everything needed to execute on your Android device.

Cheers,
Ancient Lady
AGK Community Tester
FakeBlood
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 27th Jul 2012 20:28
K pretty sure thats what i did..may just start over..the apk runs but shows only a blank screen after loading files etc..
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jul 2012 20:43
Do you know if anything is actually loading? Do you get a splash screen (AGKSplash.png or your own with code to load)?

Since you are using Eclipse to create the apk, why don't you try running directly from Eclipse? Left click on the project and select run as android app. The guides should walk you through the steps to connect to your Android device, if it is seen by Eclipse.

If it runs from Eclipse, but not from your directly installed apk, that gives us a clue.

Cheers,
Ancient Lady
AGK Community Tester
FakeBlood
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 27th Jul 2012 20:58 Edited at: 27th Jul 2012 21:01
No splash screen and it also only shows a blank screen in eclipse.

[EDIT] actually I dont have a splashscreen file in my project anywhere that I see..where should it be?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jul 2012 21:08
I think the AGKsplash.png file goes in the assets directory directly. But it can't hurt to put a copy in the assets/media directory as well.

As long as the file is named exactly AGKsplash.png (my previous posting had it misspelled, the first 's' should be lower case), it should display almost immediately when the app starts to run.

Cheers,
Ancient Lady
AGK Community Tester
FakeBlood
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 27th Jul 2012 21:19 Edited at: 27th Jul 2012 21:27
Put the splash file in...same result..black screen

[edit] the only changes i made in files were the uncommenting of the one line in the interpreter file...was there anything else (not in the docs) that needs to be edited?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jul 2012 21:39
As long as you uncommented the correct line, no. It is the one after "#ifdef IDE_ANDROID".

If you put the splash file in assets and assets/media and it is named AGKsplash.png and you cleaned and rebuilt in cygwin (just to be safe) and then either restarted eclipse or refreshed your project in eclipse (left click on project, select 'refresh') and then ran it as an android app, you should see the splash screen.

If you don't, there is something wrong in your code or setup or something else.

Does the app run properly in Windows? You can put the same splash screen in your windows <yourproj>/media directory and it should show up when the app starts for a second or two.

Cheers,
Ancient Lady
AGK Community Tester
FakeBlood
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 27th Jul 2012 21:40
Yeah runs fine on windows, and the splash screen shows too on windows..it's definitely an issue with the eclipse side of things...just gotta find it! lol
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jul 2012 21:48
Did the log from the cygwin build show anything at all?

Cheers,
Ancient Lady
AGK Community Tester
FakeBlood
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 27th Jul 2012 21:53
log.txt is completely empty lol
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jul 2012 22:10
Ok. I just ordered a new Android device (two actually, one Gingerbread and one Jelly Bean). Once they arrive and I get my Android test bed setup, I'm willing to see if I can get your project to run.

If I use just your media files and the AppGameKit IDE generated byte code, then the coding behind the game will be transparent, but I should be able to see if it should work on an Android.

That assumes you are willing to send me those files.

Cheers,
Ancient Lady
AGK Community Tester
FakeBlood
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 27th Jul 2012 22:23 Edited at: 27th Jul 2012 22:26
Thanks that is fine with me..it's not even a game yet, just a simple project I started that I wanted to see if I could get it to run before I moved on...no luck so far.

I also just tried using Cliff's AppGameKit Droid Xml project in the WIP board. I get the same results so it could be the virtual device I'm using....but regardless all the big major apps (Draw Something) etc run in this virtual device..so this should too.
FakeBlood
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 27th Jul 2012 22:35 Edited at: 27th Jul 2012 22:45
Here is the APK file if someone is able to test it and see if it works for them.

[EDIT] Hmmm just installed Snake-U classic from the Showcase board and it does the same thing..so I'm pretty sure now it's an issue with the virtual device.

Attachments

Login to view attachments
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jul 2012 23:30
Quote: "so it could be the virtual device"

When you run from from Eclipse, I assumed that you were connecting to your Android device?

It is a well known issue that the virtual device (Android simulator) in Eclipse that shows up on your Windows display does not work with AGK. Not even the AppGameKit folks have gotten it to work.

When I say to run from Eclipse, I mean to actually connect directly to your Android device using its USB connector and then selecting that from the list (hopefully) that pops up when you ask Eclipse to run the project.

Cheers,
Ancient Lady
AGK Community Tester
FakeBlood
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 28th Jul 2012 00:03
The one I'm using isn't the regular emulator that runs through Eclipse. BlueStacks is a much better Android emulator that runs most (all that I've tried actually) apps. It gets detected as an Actual android device and even shows up when you visit google play as having a device connected.

Had no issues using it with Game Maker, or other APKs made elsewhere..

Don't have an actual Android to test on right now..
Have an iPhone but that doesn't do me any good right now! lol
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 28th Jul 2012 00:13
Quote: " Here is the APK file if someone is able to test it and see if it works for them."


Just installed the apk file you attached and its working fine for me. I get a liitle purple box which I can move around with the virtual joystick... I have a Samsung S3...
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th Jul 2012 01:47
FakeBlood, I strongly suspect that your issue may be with the emulator and not AGK.

If the apk you posted works for other people (and I will test once my new device gets in), than I think the issue is your emulator and not AppGameKit or the apk built by Eclipse.

Cheers,
Ancient Lady
AGK Community Tester
FakeBlood
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 28th Jul 2012 01:51
Thanks Funnell7 and Ancient Lady,

Issue = Confirmed simulator problem!

Maybe that Nexus 7 will come my way soon lol
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 28th Jul 2012 11:24
The Nexus 7 looks like a games non-starter to me. Limited memory, no SD card, and you have to root it to use a USB pen drive. My brother lives in Florida - he bought one and took it back to the store 24 hours later because he couldn't play his music from his USB sticks.

-- Jim
leo877
16
Years of Service
User Offline
Joined: 6th Mar 2008
Location: san antonio, tx
Posted: 1st Aug 2012 06:05
@Fakeblood

i just download your abk file on to my tablet with android. it works, the blacks screen happen but then your program start. a joystick in the right corner, with a brown border and blue floor with a purple square.


FakeBlood
22
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 3rd Aug 2012 19:08
Thanks leo..it was the android simulator (bluestacks) that wasn't working.
Hoping to get an actual android device soon to test on!
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 3rd Aug 2012 19:14
i also had a similar problem with T2 1076. Wasted a lot of time testing on the emulator and only getting a black screen.

Test on a real device!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Aug 2012 20:42
FakeBlood, I can highly recommend the Toshiba Thrive 7". It has a separate dock/charging port from the mini-usb, which is nice. It does have a micro-sd card slot and the mini-usb. And it comes with a file manager!

When you connect the Thrive to your PC it comes up as an external drive. You navigate to the Downloads folder and copy your apks there.

Then on the Thrive open the File manager and navigate to Downloads and click on the apk to install.

You don't have to disconnect anything.

If you update the apk, or add another, and the Thrive File Manager is open, use the 'Go Up' button on the bottom right to navigate up and then go back down to refresh the contents.

It makes for easy testing.

It is an Android 3.2.1 device with 32GB. It is not cheap, $350 US. But it is a very good tablet.

The Nexus 7 doesn't have an sd card of any sort or come with a file manager. But you can download a free one and it works just as well (I just installed the Rhythm Software File Manager).

It is hard to get the 16GB version, but the 8GB one is fine for basic testing and only runs $200 US.

Cheers,
Ancient Lady
AGK Community Tester
ChasDGreen
12
Years of Service
User Offline
Joined: 25th Sep 2012
Location: Rotherham, UK.
Posted: 1st Oct 2012 10:58
Just a correction here on the Nexus 7. You DON'T have to root it to read from a USB drive. There are free apps in Playstore to do it easily, and the adaptor cable is only 98 pence (UK)from ebay.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 1st Oct 2012 17:26
I didn't root it. I don't know how and haven't looked into it.

I got one of the free apps that lets me see just about everything (and more than I can see when connected to a Windows PC). I can put it at the root directory (/) that lets me at least see the /etc, /sbin, /sys, /dev, /mnt, and more directories (even if it reports some of them as empty).

Cheers,
Ancient Lady
AGK Community Tester

Login to post a reply

Server time is: 2024-11-23 14:47:40
Your offset time is: 2024-11-23 14:47:40