Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)

Previous topic - Next topic

Ian Price

I came. I saw. I played.

mentalthink

I don't see this post, (or I don't remind it), but thanks Spacefractal I think you work a lot in all this things of Android... Thanks really..  :good: :good: :good:

spacefractal

im have just looked and then implemented Amazon Fire TV (both Fire TV Remote and its GameController) for android.GameControllers() support.

Im also dedicated to deprecating the auto remapping system with android.GameControllers(), so only known controllers would been supported directly. Orignally the api was with Android Game Consoles in mind with the controllers that game with.

Im do a single player support for MotionEvent and KeyEvent routed to KEY() instead. Scancodes from 256-300 is a remapped MotionEvent event.

But you can do override it by using android.ScanCode(KEY) instead of KEY(), which returns a float between 0-1.

PS. Im want to support Nvidia Sheild as well, but im cannot find any document about that at all (im need controller device input name and inputs its uses)?
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

PLATFORMINFO$("device") that report "KEYBOARD" does not make sense at all anymore, since all devices uses touchscreen. But I'm do instead thinks it's could been reported that well when running on those micro android game consoles when detected. They often don't have a touchscreen.

So I'm property do that change in next version.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

kanonet

Whats about that android TV sticks? Those may have a keyboard/mouse and they usually dont have a touchscreen.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

spacefractal

#185
Im have not looked into those Android TV Sticks yet.

But in stock glbasic, KEY() was pretty much useless (fixed in a recent AE release), which means "KEYBOARD" was quite useless too. That KEY() issues was fixed in recent AE version, so its uses Java scancodes directly as they are. Its was much better in that way.

PLATFORMINFO$("device"):
Im have changed how "KEYBOARD" have been used, so is have much more useable and is still in compatible in the original way. Its can now dynamic changed in runtime between "TOUCHSCREEN" and "KEYBOARD", and not just in startup.

"KEYBOARD" is used if the last input was from Keyboard or Joystick.
"KEYBOARD" is also now by default on the supported Android Micro Game Consoles (Ouya, Mojo, GameSticks and FireTV).
"TOUCHSCREEN" is used if the last input was from a Touchscreen (and is init by default on regular devices).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

#186
Im are going the last remaining fix. Here is the changes for AE 12.10 (im might edit this until released):

- PLATFORMINFO$("device") now dynamic changes between "KEYBOARD" and "TOUCHSCREEN".
- Remapped most known Motion Controls to Key(256) to Key(300).
- Added Android.GetConsoleDevice$(), which returns one of those: "", "Ouya", "Mojo", "GameStick" and "FireTV".
- Added Android.ScanCode(KeyScan), which also can return a float above 255.
- Added Android.GetButtonName$(Button, PlayerID).
- Added Android.GetConsoleDevice$(). If empty, then uses KEY() for button/motion control mapping.
- Various path and gamecontroller bug fixes.

Please note:
- some controllers can return a doubble input. A "Back" button press can also been returned as second input (Key(4)).
- Im removed checking for controller name for Android 2.3, which means game controller support might got removed for those devices.

Removed:
- Im have depreacted and removed all remapping code for Game Controller API. This is now for known Android Game Controls only.
- Various remapping variables is removed (such like ButtonRemapMessage$ and GameControllersSetLayout$). Just remove those lines in your code.

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

#187
v12.10.2 will contains a least those fixes:

- Hibernate is finally fixed the crash. This one have been very long and while, but finally moved the pausemode away than invoked that in a thread.
- iCade can now been mapped throught KEY() or Android.Scancode() (as 100% regular keypresses).

So in the final:

- If you want to add gamepad support to a regular android device, uses Android.Scancode() and/or KEY() and make sure they are remappable (from 1-300). They would work with most controller out there.
- If you want to support micro consoles, use Android.GameControllers(), which auto remap correctly for the supported consoles.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

v12.11 released:
- Cleaned up game controller support very much, so GameInput API is required to been used now.
- iCade not working, but will refix that in later version.
- This version supports many generic gamepads for android now and also have player ID support.

The same GameInput API also will works with Windows (only xbox controller is supported as test device), Pandora and iOS.

So that why im remove Android.Gamecontrollers$() support.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

#189
2.11.2 is released:
- Android remapping support.

That one to download is just a zipped android folder with no installer.

Other news:
Also its seen Gernot will in Glbasic 14 just use the folder im have zipped down and use that as the GlBasic 14 release (that one im have). He is free to do that.

This is mainly me that have maintime this Android port with those features im have added in. So its make completly seance really. The download you see is a no installer version this time.

So a least Android Extras 2.11.2 would been included as Glbasic 14 (and yes, those assest checking part is NO more required at all, howover loading can been a bit slower for some games). Here glbasic 14 will include a Api-22 compiler and removing Android 2.2 support (and later also Android 2.3 mightbeen removed). Im do no plans to remove any 4.x yet at all. So no worry about that.

Im cant remove Ouya support etc for those using the GameInput API.

Same will do with the iPhone port. Howover Gernot have found a "compiler" that can merge the cpp files into one file, which would been easier to get up a xcode project working with a bit fewer steps.



PLEASE NOTE:
v12 was actuelly v2 in some previous thread. sorry about that. ops.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

#190
Long time im posted in this thread.

Im have just got a Google Nexus Player. This device seens to been faster than Ouya in perforcements and could get 60fps in 720p in Greedy Mouse (1080p also ran 60fps with only few none annoying frameskips), while on Ouya its was set to 30fps in 720p.

Soon im got cerficated and approvede the game in Google Play for Android TV, then im will update Android Extras.

With Android TV in mind, SDK is need to been compiled using SDK Android 5.1.1, etc targetSdkVersion=22). The mininum required to run glbasic run is still Android 2.3.3.

Im do might require minimum 4.0.3 (api-15) in a later update. There is quite few devices left that run the old system anyway, so im wont support those at all either.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

Im got it approvede, but there is still issue, but is still not working with a standard android game controller (im which is that Acer one or a another one, they does not wrote which one its is), but is working completly fine with the 5way DPAD controller.

Im thinks for some reasons onGenericMotionEvent() is not called. But im need to get that controller first why.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kitty Hello

I have no problem skipping to Android 4.2 as the minimum supported version. Anyone?

bigsofty

Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

spacefractal

#194
There is no big real difference with from 4.0 to 5.x, only small difference thing in Java, such as full screen support from Kitkat, and TV support in Android 5.1

Many people do still uses android 4.1 (Ouya example), so it's cant been skipped at all, and no reasons to drop it at all. Ouya is still a great console.

I'm will still support all android 4.x devices and up and now even uses some features from Android 5 (to get TV support).

it's about android 2.x I'm might no longer can check and supporting.

Also be will not add joystick support for the Joy command, due that way android controllers work, but can uses KEY() (INT), Android.scancode() (FLOAT, now with no external java call), or by GameInput API.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/