Editing Android source code after GLBasic is done with "compiling"

Previous topic - Next topic

r0ber7

Hi.

I've recently been focusing on app development for mobile phones. Since not all features of these devices work on GLBasic (like the camera, or voice recording), I was wondering if I could edit the files GLBasic produces. For Android I think I should be able to find some java files. I want to find the source files so I can modify the code directly, if possible.

So yeah, if I wanted to do this, where would I look? For Android, I have no idea where I can find the source code. There is a src directory but it seems to only be a test thing? I have no idea. Has anyone done this who could maybe give me some pointers? And I was also thinking, would this be a way to get ads into my apps? I suspect that the code to do advertising will be in java, so I figured I could paste it into the source somewhere. Any tips would be very helpful, thanks.  :good:

And for those of you who are wondering, yes I am still working on Red Wizard Island. It's a big project though, and multiplayer is definitely an ambitious goal. *grin*

spacefractal

I tried that in a early port about ads, but no success due activity issues and in fact they require sdk v2.3, while glbasic only uses sdk v2.2 and then got too many activity issues, due they uses unsupported api. So it's was sadly no success.

Also if you set sdk target to high, then glbasic thread just quit when another activity was created (ads uses another activity, etc intent). Howover it's might have fixed in recent beta, but not sure.

That why I have not putted anything like that since that.

Sdlactivity.java is the source code that is possible to edit, but they require calls from c++. I have code for that in code snippets.

I hope gernot fixes that a day, and the recommend doing that in manifest doesn't change sdk version.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

r0ber7

Hmm, ok.  :doubt:
Thanks for your reply, now I feel like it's impossible though.
So is there anyone who has managed to get ads working on Android?

spacefractal

That was around a half year ago, so I a day try again (but not my first priority througt).

It's was version glbasic v11.1xx I tried on last time. there have been few betas more with more android bugs fixed since (the famous x/y rotation swap fixed).

I'm are just more concern about activity issues glbasic have, that diddent like new activity very much (which handled incorrect). It's might have fixed some of the issues since, so it's should been rechecked again.

Howover, You should look on the java communication thread I came with in code snippets and get that working first. You will need that anyway, so you can call java directly from glbasic. I used that for device detection, better assets control (main reason and still uses that) as well using google license service (which was pretty easy to get working and saved a lots of internal memory).

Ps. Ads service, that only uses jpg and gif should been much easier to do, since there is code for loading gif animations.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/