inline idea for Android

Previous topic - Next topic

spacefractal

I see on Android there is not possible to call java directly in inline yet? But I do see there is a SDLActivity.java. So I gonna think a idea its could add a INLINE idea to call ONE function, something like this:

USERFUNCTION$(FUNCTION$, ARG$)

In that userfunction its could call a java function directly and then creating a wrapper to call other functions. Yes there is something interpreting here, but those inlines is mostly to possible to hopefully integreate Admon, inapp purchase, more device info and such thing, which dosent require intepreting all time....

the java file could been "user.java" in the same dir where SDLActivity.java is.

All here could been inlines as well.

This is only a idea to been acccepted or not :-D. Its for more advanced topic I know.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kitty Hello

Very good idea. I hope I can find a way to do this. passing an string array byref would be the best.

spacefractal

Have this been implemented in v11, so we can call java rutines from glbasic (via inline), either via array or by a wrapper (array) string.

I known its not the best soluations, but still its a best method to limit around ndk and glbasic without been too compliced, and you would not often call that much elsewise.

Its could been even just called to a function in SDLActivity.java to start with, even own java file is better.

Personlly I would use this to get more info about device as well example pixel distiny and such thing. That would been possible for us that want it.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Falstaff

If this somehow leads to getting access to the android soft keyboard, that'd be awesome :)

Kitty Hello

keyboard should be supported by INKE$. No?


Can I make an external java file and call a function in it?
Or should I make a dummy function in the sdl-main.java file?

Moebius

I'm in favour of the external file - could we put that in the project directory and have GLB copy that across?  (like w/ icon.png?)
Endless Loop: n., see Loop, Endless.
Loop, Endless: n., see Endless Loop.
- Random Shack Data Processing Dictionary

Kitty Hello

Yes - but can I do this with a function that might not exist - or must I always make such a dummy function?

spacefractal

he means to open the software keyboard, here there is no sign of INKEY$, since you need do somewhere to call the keyboard first. Also not all physical buttons is correctly supported. Example the soft touch back button should been returned back to glbasic, and not just quit the app (ICS), unlike the hard back button (Except if circle is pressed on Sony's Playstation Device). Howover its a SDLActivity.java me think? So I look on that later.

The best would of course been direct support of java API calls directly from inline calls, but not sure its possible by using Android NDK and then calling Java API from there?

If that is not possible directly, but possisble indirectly, then the java USERFUNCTION$(FUNCTION$, ARGS$[]) mightbeen the next best thing in sdl-main.java. Its could still been invoked from inline using ?IFDEF ANDROID (Since is a Android thing), so its never touch the other OS builds.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/