Android compiling / Included graphics

Previous topic - Next topic

S.O.P.M.

Hello,

there are 2 things I worry about. First I wanted to compile for an Android phone and another is somewhat special.

1. The Android compiling problem: As I've understand GLB does not only compile for it, it also installs the App on the Android device after that. Step 2 was not working for me so I copied the apk file to the device manually and installed it. I was able to get it to run but there were no sprite and font files loaded. What's the reason, aren't they included in the apk file?

2. I want to create an executable with graphic files for sprites and fonts included. I remember there was a demo that showed the trick but I can't find it anymore. Can someone please tell me how to do that?

Thanks in advance!
Notebook PC Samsung E372 Core i5 @ 2,6 GHz; 4 GB RAM; Win 7 Home Premium

MrTAToad

QuoteWhat's the reason, aren't they included in the apk file?
They should be - check to see if they are in assets/media

QuoteI want to create an executable with graphic files for sprites and fonts included
I presume you are talking about my routine for creating sprites (and only sprites) from DATA statements - the idea is posted here : http://www.glbasic.com/forum/index.php?topic=4821.msg36656#msg36656

S.O.P.M.

QuoteThey should be - check to see if they are in assets/media
GLB creates all these folders while compiling but there were nothing inside assets/media. Do I have to copy the sources there and then compile again?

QuoteI presume you are talking about my routine for creating sprites (and only sprites) from DATA statements - the idea is posted here : http://www.glbasic.com/forum/index.php?topic=4821.msg36656#msg36656

Unfortunately no. I just found the right topic: http://www.glbasic.com/forum/index.php?topic=3408 but I still miss the example. I'm sure there was one.
Notebook PC Samsung E372 Core i5 @ 2,6 GHz; 4 GB RAM; Win 7 Home Premium

MrTAToad

QuoteDo I have to copy the sources there and then compile again?
The latest versions of GLBasic will copy the stuff for you, so you shouldn't need to.

Gurumeditation

Yes it obvious, but it doesn't work. The mediafiles are not included in the apk

MrTAToad

And you are either moving to the Media directory before loading them or using the subdirectory name in with the filename ?

S.O.P.M.

Ok, second question is now cleared up.

http://www.dream-d-sign.de/forum/index.php?topic=9.0

This is what I was looking for.
Notebook PC Samsung E372 Core i5 @ 2,6 GHz; 4 GB RAM; Win 7 Home Premium

S.O.P.M.

QuoteAnd you are either moving to the Media directory before loading them or using the subdirectory name in with the filename ?
As far as I remember, no. The problem is still unsolved.

Please, can anyone here verify to have successfully compiled for Android?

In my case, GLBasic does not copy the media files automatically and it shows an error while installing the App on the phone. By modifying the final apk file to have the media files in the res folder, the App cannot be installed manually too. All this is really annoying.
Notebook PC Samsung E372 Core i5 @ 2,6 GHz; 4 GB RAM; Win 7 Home Premium

spacefractal

you cannot modify a compiled package, since there is a hash check included. That mean the default signature file would fail and you cannot install. That happens on iOS too. Which file structor do you have for your project?

Also are you sure the media folder is spelled Media and not media?
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrTAToad

#9
My assets are certainly in Media - just testing on the Android emulator to make sure everything is displayed properly.

And yes it does...

This is with the latest version of GLBasic

If you want to make the project available we'll compile for Android and see what happens...

Or TeamView...