GLBasic forum

Main forum => GLBasic - en => Topic started by: fivesprites on 2013-Apr-29

Title: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: fivesprites on 2013-Apr-29
Hi All,

I've been working away on a few extra Android utilities and I ended up realising it was a bit dumb to have multiple forum posts - especially when it meant getting people to make the same changes every time.  Eww.

So, I've wrapped everything up into one and I've even written some instructions! (see the ReadMe file)

Download and updates here (its now version 3.0 using sdk 22, Android 5.1):
http://www.glbasic.com/forum/index.php?topic=9644.0

Questions in this thread please (or create your own).



Current Version: AndroidExtras_v1.1
This ONLY supports the new beta v11.414

Changes in v1.1:

- Added new commands to TMusic:
   - getDuration()  - returns the length of the music track currently playing (in milliseconds)
   - getCurrentPosition()  - returns the current position in the playing track (in milliseconds)

- Added support to reload textures on some devices when OpenGL context is lost (please see the sample application for details)

If you want to try out Game Controller support for OUYA/Android then SpaceFractal has implemented the code and integrated it into AndroidExtras.  A beta release is available here:

Current Beta Version: 1.4beta3

https://dl.dropboxusercontent.com/u/3236515/GreedyMouse/AndroidExtras.zip


UPDATED 28th NOVEMBER 2013
http://www.dropbox.com/s/c1s7dxmf4r8806g/AndroidExtras_update.zip

I've not had time to try this out, but if it can be confirmed as working then I'll update this post accordingly.  Thanks again SpaceFractal! :)

Please see the ReadMe.txt file inside the zip for installation instructions.

If you have any questions then fire away.

//Andy
Title: Re: Android Extras (GPS/Keyboard/Audio)
Post by: erico on 2013-Apr-30
Ultra thanks Fivesprites, will check it out. :good:
Title: Re: Android Extras (GPS/Keyboard/Audio)
Post by: bigsofty on 2013-Apr-30
Many thanks Andy(and Spacefractal!)  :good:
Title: Re: Android Extras (GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Apr-30
Im checks this one later. Don't forget to fix the orientation issue when only landscape or portrait is required, because the current glbasic don't do that correctly. Hoeover it's allready in code snippet section in the "how to communicate java" thread.

Godus to you five sprites and finally some one did compiled extra features that use it :-). More of that!
Title: Re: Android Extras (GPS/Keyboard/Audio)
Post by: fivesprites on 2013-Apr-30
Thanks chaps.  Will try to keep adding more nifty features as/when I get time!

I'm working on the Camera at the moment, but it's, erm, a nightmare!  I have it working beautifully in a Java Android app - the camera streams the preview to a SurfaceTexture that I then render onto the face of a spinning cube - fun :)

Unfortunately, I've no idea how to do this in GLB yet.  I can set everything up to preview to a SurfaceTexture, but I can't see how I can make that texture available to the GLB app!  This functionality also requires Android API 11 or greater to work.  :giveup:

I think I've also fixed the pause/resume Android issue but won't include that here - I'm hoping to get that to Gernot to include in the next beta release.

I have a few other ideas I might try, but welcome any suggestions/improvements.

Spacefractal - I *think* I've put the orientation fix into the code.  I'd appreciate it if you could check.

//Andy

Title: Re: Android Extras (GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Apr-30
Im not home yet. But Will check out.

That another why for a sdk 4.x as a new platform :-).

edit: Yes you have included the orientation fix, but not in the gbas code (but in java). Im thinks using functions that way is very cool, unlike what im did (which used one function to call all java functions). This one is much more readable.

Im like that, so well done. You should add the other functions im made into the AndroidExtras.gbas when you have time.
Title: Re: Android Extras (GPS/Keyboard/Audio)
Post by: Albert on 2013-Apr-30
Nice!
Title: Re: Android Extras (GPS/Keyboard/Audio)
Post by: fivesprites on 2013-May-18
Minor update provided to support GLBasic Beta V11.414.  Also a couple of extra functions to TMusic.

//Andy
Title: Re: Android Extras (GPS/Keyboard/Audio)
Post by: spicypixel on 2013-Jun-22
Loving this library and I look forward to the Google Play services :-)
Title: Re: Android Extras (GPS/Keyboard/Audio)
Post by: fivesprites on 2013-Jun-24
Thanks!

Unfortunately, I've been pretty busy with work and another project lately.  I will return to this at some point as I think Google Play would be a great addition (I've almost got it working).

The problem is that the version of the Android SDK that ships with GLBasic is too old to support it.  Kitty would ideally need to update the SDK and also include the Google Play services before I can complete this.  It is possible to upgrade the SDK yourself, but the problem is describing the steps necessary for users that aren't familiar with this process.

So, for now I'm waiting for the next GLB beta.

//Andy
Title: Re: Android Extras (GPS/Keyboard/Audio)
Post by: spicypixel on 2013-Jun-24
I understand. Look forward to this with the new beta then :D
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: fivesprites on 2013-Jul-28
SpaceFractal has kindly sent through a beta of Android Extras that he's updated to add preliminary OUYA support and additional controllers.   

I've updated the first post to reflect this. 

//Andy
Title: Re: Android Extras (GPS/Keyboard/Audio)
Post by: bigsofty on 2013-Jul-29

The problem is that the version of the Android SDK that ships with GLBasic is too old to support it.  Kitty would ideally need to update the SDK and also include the Google Play services before I can complete this.  It is possible to upgrade the SDK yourself, but the problem is describing the steps necessary for users that aren't familiar with this process.


I have my own NDK installed any ways, it would be cool if we could just 'point' GLB towards those files instead of the default ones?
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Jul-29
im have updated both nDK and SDK in the bonus section, which im have updated the Android folder. Howover im did not update the tempateproj folder as im should. There is few updates required to that (mostly actuelly only the manifest file and the SDL files from this thread).
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: fivesprites on 2013-Jul-29
I think Kitty is looking at a way to remove the Android SDK/NDK entirely as it bulks up the GLBasic download. 

Instead, if you want to develop for Android/OUYA then you'll need to download them separately and then declare their location within the GLB options somewhere.

This is a much better approach as the SDK can be stupidly large.  No idea when he plans to make this change though.

//Andy
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Jul-29
he should not remove NDK, because its did have some issues, if you just replace any files, so he should include that. That is only 13mb in 7z file, so its will not clutter the file very much anyway.

But more important he should exclude sdk, which is much easier to replace any files. Another thing im dont like, is the templateproj folder, which you only have one of? (annoying to replace Samsung, Ouya and Google API thing, which should been as own templateproj folder). Im more want them have as own platform or possible to change them in Project Options....
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Jul-30
Its seen there is some confuction with the versions number. In the document, its was said v1.1, but in SDLActivity, its was v1.3, before im spotted the issue. Im have fixed that to say v1.1-v.1.3 in the readme file.

So now this is version v1.4 beta, not v.2 beta to avoid the confuction (can you fix that in your first thread too, FiveSprite?).

Im did some work on the lib today to fix some PS3 relative issues as well fixed a crash bug if iCade not found (so a major one). PS3 can also been auto remapped and use same layout as other two controller (except on the phycical one, digital and the analog stick is swapped, but analog stick is still used on LEFT, RIGHT codes of course).

So please, if you dont plan to use the dual controlles on those controllers, then use both analog and digital controls as movements.

PS. Same with triggers, if you dont have planes to use the double triggers. Then uses "b5" and "TriggerLeft" as same button for your game (as well "b6" and "TriggerRight"). Im thinks im add that to the document before final version.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Marmor on 2013-Aug-04
hmm where is no  sdl_main.cpp in the additional folder from Androidextras1.2 .
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Aug-04
Opps im have forget to include that, but thatfile has been updated since version 1.0, so just use that from the ealier version, until I'm do include that later today.

PS. to avoid version confuction v1.2 (latest version was 1.3, not 1.1, before im updated it) is actuelly v1.4 now  with the gamecontroller support and im have just fixed that now.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: bigsofty on 2013-Aug-05
Thanks Spacefractal!  :good:
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Aug-10
updated GameControllers.java to beta 3, which added TrackPad support. That was diddent working. Howover im do cant hide the mouse pointer, due a limint on Android (a stupid one actuelly).
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Aug-12
This day im trying to look for a alternative for SETSCREEN for Android Extras. Its is actuelly possible, but can not force it after a internal surface creation.

etc doing directly in java like this:

getHolder().setFixedSize(1280, 720); in SDLSurface(Context context) works, but not doing that in a java call....

This could been a great addiation for example working on OYA and want to use 720p rather than 1080p for better speed. Here im use 1080p screen and did 720p to work. Its much faster than doing the offscreen thing.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Aug-12
Here is the newest version (v1.4 Beta 3):
https://dl.dropboxusercontent.com/u/3236515/GreedyMouse/AndroidExtras.zip

Hope FiveSprite will update his link to this one.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: fivesprites on 2013-Aug-12
Sorry chaps - really busy with work at the moment and I'm off on holiday for a few days tomorrow.

Updated link to the latest beta in first post - great work spacefractal and thanks for helping out!  :)

//Andy
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Aug-12
its got confirmed compiled from the OUYA Compiling Help Thread, which was based on Beta 3, which im included in the full SDK in the Bonus section. This is just the separate file.

PS. Im uses more the wired Xbox controller than the OUYA Controller for testing. The issue with OUYA controller is, its  dont allways to reconnect when its have idle out (which happens often here, but in a real game session, that is not a issue).
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Sep-03
today im finally tested with Android 2.3 combatbile with the new old phone. The game is still running on that without issues, howover there is a little fun remap issue im need to look on. That one with any keypad should not been possible to use, when its only running on a touchscreen without keyboard.

that would hang the game. But rest works and the game only used 6mb internal memory (im delete assests file, when internal memory is too low).

Im look into that one to prevent it.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio) - Updated to 1.4.2
Post by: spacefractal on 2013-Sep-04
- im have now just fixed some bugs, so the game controller api not crashing when pressing on some hard buttons like SEARCH.

- Also remap could also accour with "Keypad" and "Touchscreen" as name. Those are not supported and then filtred off now.

- Menu button can still been used and checked with no game controllers wired.

Also the fixes here also run nice on Android 2.3 now (even USB controllers etc cant been used, but its does not crash anymore).

So SDLActivity.java its updated to 1.4.2 (but for some reason the readme was gone, so used the old one Fivesprites used). Download from same URL in the first post.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Jonás Perusquía on 2013-Sep-27
cool! nice work! you are the best!

P.S.
spacefractal, the OUYA IAP is inside the AndroidExtras? thanks in advance!

I'm ready to upload my game :3
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Sep-28
Yes, and look in the beta forum how to implemented that.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2013-Sep-28
I have an OUYA now (although I've not had a chance to even plug it in yet), so expect lots and lots of questions from me that require answers as though you are talking to an idiot... ;)
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: erico on 2013-Sep-28
Really great news Ian! By that I believe you now own 254 different console/handhelds? :nana: :booze:
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2013-Sep-28
No, it's only 253... And I'm not sure if they all work nowadays! :P
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Oct-04
inapp can been a bit complicered due various checking,but have tried to keep it simple in the end. For controllers, its just using command like that in a function:

Code: GLBasic [Select]
IF GameControllers("Up", 0) THEN RETURN TRUE // 0 = Player 1, 1 = Player 2
 

And doing this line, before or after your SCREENSHOW command:
Code: GLBasic [Select]
GameControllers("Update")
 

That asume of course you got the new SDK working, which can using the full SDK download from this link (this include a bit older ANDROIDEXTRAS throught):
Code: GLBasic [Select]
http://www.glbasic.com/forum/index.php?topic=9341.0
 

Howover if its a unknown controller, the game might want to remap it.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: MrTAToad on 2013-Oct-04
Have you tried 3D objects on the Ouya yet ?
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Oct-05
No, but howover game like shadowrun ran awesome which was nvidia optimized. So ouya seen very good to 3d graphics. I'm are to 2d coder throught.

I'm could test with some of the examples....
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: MrTAToad on 2013-Oct-07
Yes, give it a go!
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: erico on 2013-Oct-07
...
No, but howover game like shadowrun ran awesome which was nvidia optimized. So ouya seen very good to 3d graphics. I'm are to 2d coder throught.
...

So, if we have some not so 60fps performance going on 2d on Ouyeh at full HD, maybe doing the 2d game in a 3d world could help? In case its native 3d is super fast.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Oct-07
60fps is possible. My games is just have heavy fillrate based and did have multiply issues when 3d surface used. So Is depend on the game made. I'm in java did set the surface set to 720p automatic. Ouya up scaling it's surface nice, much faster than off buffer...

Some ouya games is 60 fps, include a nice lowres 2d retro game.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2013-Oct-15
I've moved some of the posts regarding problems. Let's keep this thread on track as it's incredibly valuable. :)

I'm also making this thread sticky.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Oct-15
Im have fixed some gamecontroller isues as well issues for v11.569, which should works nice. The newest version is in glbasic with Android API-14 and API-16 v4

Later im also include seperate, but my time is soon running out for this day, so im upload a seperated version tomorrow. Hopefilly fivesprite or Ian can update the first post to avoud eventuelly confuction.

PS. Im cant update the first post, this version was orinally by FiveSprite, even im also did some work too.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2013-Oct-15
If you add the new update here spacefractal, I'll put a link in the very first post and update it. :)
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Oct-16
I have fixed comply of bugs and got the sample project working again as well fixing some remap issues. The url for the new version (1.5.2) is the same dropbox as the previous.

Or here:
http://dl.dropboxusercontent.com/u/3236515/GreedyMouse/AndroidExtras.zip

Later today or tomorrow im include this in the sdk upgrade project (but will mention it trought)
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Oct-19
various issues updated in AndroidExtras.zip (crashes and avoid irrerevante remap invoking). Also there is a SDK to much, so please remove the Leadbolt SDK fom Android\libs, which im completly forget. Im got some 1 star review due that, even its was unused....  :(
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2013-Oct-25
inapp can been a bit complicered due various checking,but have tried to keep it simple in the end. For controllers, its just using command like that in a function:

Code: GLBasic [Select]
IF GameControllers("Up", 0) THEN RETURN TRUE // 0 = Player 1, 1 = Player 2
 

And doing this line, before or after your SCREENSHOW command:
Code: GLBasic [Select]
GameControllers("Update")
 

That asume of course you got the new SDK working, which can using the full SDK download from this link (this include a bit older ANDROIDEXTRAS throught):
Code: GLBasic [Select]
http://www.glbasic.com/forum/index.php?topic=9341.0
 

Howover if its a unknown controller, the game might want to remap it.

I've just introduced this to AquaVenture and the game crashes/returns to "PLAY" screen when you press the control stick or  D-Pad up. :(

Incidentally, what are the keycodes/names/values for the other non-direction keys/buttons?
[EDIT] Found in the Android Extras code.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Oct-26
Do you uses the newest version of GameControllers.java?  There was some crash issues I'm have fixed recentely for a week ago. So make sure its updated. Im forget to include a version number, but its was in public void setPlayerID(int currentPlayer, String name) last time, which might tried to access an -1 to a array (which is of course not possible).

when you have updated both GameControllers.java and SDLActivity.java, let me know again. If its still crash, im need the LogCat, so im have have change to checkout why it crash:

Compiler\platform\android\bin\_Logview.bat
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2013-Oct-26
Yep, looks like the last update fixed the problem (clicking the screen in BlueStacks no longer crashes - I can't test on my OUYA at the moment, although I'm sure it'll be fine)

:)
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Nov-28
its seen people is a bit upset/confuctions about version number and when im update it.

Im which im could edit the first thead when I or FiveSprite update the file. This would been much more clean when the AndroidExtas have been updated.....
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2013-Nov-28
Yeah, confusion reigns, but to be fair to you and FiveSprites there is an awful lot of processes to jump through and you've both done a lot of work getting GLB apps to work on unsupported platforms.

I can close the thread and you could start afresh, or you can PM me info and I can add it into the first post. It would be a shame for that thread to die, as there is some valuable info in there, but a new thread could help clear up a lot of confusion.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: mentalthink on 2013-Nov-28
Hey guys!!! Only a question I want buy the OUYA, but I don't follow too much the thread... For when this will be implemented into GLBasic... I preffer buy and all goes fine than make test and test, I have enough with 3 or 4 mobiles...

Thanks a lot. and thanks for this work, I think this have to be complex to done. :booze:
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Nov-28
My game is out for Ouya for some month ago, so its fully implemented, but its does require AndroidExtras and uses its api to get GameController support as well inapp purchases.

Im not known when Gernot implemented it as a native trought (even he can uses any api im have done if he want).

Ian or FiveSprites, please change the AndroidLinks to this one:
http://www.dropbox.com/s/c1s7dxmf4r8806g/AndroidExtras_update.zip

Im wont change the link after that at all to prevent any link breaks.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2013-Nov-28
Updated the first post with current version as per request :)

This thread has now been un-stickied.

Please continue to ask questions and report bugs here, rather than the other thread.

All updates will now be included in this (non-discussion) thread - http://www.glbasic.com/forum/index.php?topic=9644.new;topicseen#new

Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Nov-28
yep, there was no reason to have two sticky threads about AndroidExtras. Fell free to post any issues here or in your own thread. Links & News is only for info and tutorials.

Im might have missing something to that? Then im will update that.

Im hope that sticky thread tell anything about it, so you dont need to leap and find various threads.

Im have a very large dropbox (im have purchased version of it), and have created a folder to that, so eventuelly shareable can been easier (im thinking to FiveSprites eventuelly could been interesed).
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: fivesprites on 2013-Nov-29
Hi Chaps,

Apologies for the absence and lack of updates - I've been crazy busy with work lately :(

Enormous thanks to Spacefractal for keeping this little project alive and for all of the additions.

I'll get an update from Alan as to what has changed and I'll make sure that's reflected in the first post.

//Andy
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Dec-18
Please Note:

if your app crash after init, this is property a missing permission in your androidmanifest.xml.

Its can been fixed by adding this permission to it:
<uses-permission android:name="android.permission.BLUETOOTH" />

This is used for detect names for the bluetooth game/keyboard controllers. But due a bug in the GameControllers.Java, that permission is not checked and then gracefull continue running the app, but just withouth the gamecontroller support.

Im fix that in one of the next versions.
Title: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: MrPlow on 2013-Dec-18
Great thanks Spacefractal ! I will try tomorrow ...
Thanks for the help .... I wish could get my debugging working to give logcat output but my PC doesn't like my new phone

Until tomorrow
Cheers,
Gary
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Dec-19
Lg dosent have all sync software? It's property a driver issue and also you should enable USB debugger. It's just much easier to checkout what happens when I'm can see the log (like the permission issue).
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2013-Dec-22
AndroidExtras updated to v1.5.4:

- Added OnResume() and OnPause() back. Seen Works on OUYA, but not tested on other device. MultiTaskning might Works much better with newer sdk (which im rembmer they diddet Work very well).
- Fixed the BLUETOOTH permission crash if not set (which just happens keyboard based controller not supported, but OUYA is still supported without it).

Happy Christmas. See you after that.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: MrPlow on 2014-Jan-22
Guys,

on the Virtual Keyboard ... It looks and works a treat! Great stuff, however...

When used vertically on android phone (acer liquid Z3) the Dialog buttons "Done" etc are almost hidden by the keys...I was looking for a way to make the keys vanish but didnt figure it out...Is it me or my phone thats the issue?
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-22
SpaceFractal - silly, and simple question - how do you access the right analogue stick on OUYA?

"GameControllers("Left", 0)" etc is left analogue

"Lpad_Left" etc is for D-Pad

The source mentions a "Rpad_Left" etc., which I assumed to be for the right stick, but this doesn't seem to work and there are no controllers with a right D-pad that I'm aware of. I'm using v1.6 of Android Extras (I think).

So am I doing something wrong or is Android Extras not set up for dual sticks?
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spicypixel on 2014-Jan-23
I'm just implementing AndroidExtras into an existing game to be submitted on the Samsung App Store. I need to make use of this function EnableBackButton(FALSE), however the app has been rejected due to a "familiar" UI experience with customers of pressing the back button and it going to a previous screen (say a menu).

Is there a way to implement a BackButtonPressed() so I can determine if it's been pressed and account for the action taken myself? I'm guessing others would need this too if they play on using 100%Indie and the Samsung Initiative.

TIA Marcus.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jan-23
I'm can't remember the right stick name (mightbeen called it "RightLeft"? For right stick pressed left?), but it's should been supported and tags could been seen in game controllers function. I'm look when went home.

Also you can see the full returned string what it get when you update the game controller function. So look there.

Back button can been checked by game controller function too ("
GameControllers("Menu",0)" if I'm remember correct. I'm did that for greedy mouse.

Howover I'm on ski vaccation and is first home in few days.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-23
Cheers. And please have a safe vacation - no broken legs, arms or anything more serious. :)
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spicypixel on 2014-Jan-25
I have attempted to use the EnableBackButton flag and have set it to both FALSE and TRUE and on my device it seems to do nothing at all but exit the app when I press the back button. I also added the code for GameControllers too to try to change my App State and again all it did was exit the app, regardless of the EnableBackButton flag being set for either FALSE or TRUE. Please see the enclosed photo to show the button I'm pressing to make sure I'm not being an absolute gibbon here.

Code: GLBasic [Select]
EnableBackButton(FALSE)
//EnableBackButton(TRUE)

IF GameControllers("Menu",0)
        APPSTATE% = AS_GAME_DONE%
ENDIF
 

My test device here is a Star B6000 Chinese Android phone, and I was wondering if this was the issue or indeed I am a closer descendant to the gibbon than I realise :-)
Thanks in advance for any info here or pointers (especially regarding heritage).

//Spicy
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spicypixel on 2014-Jan-25
On my Star B6000 device I'm getting lots of issues when I quit/resume my game. I did begin to think it was my code as I implemented all the relevant commands needed into a full game and not implementing it from the ground up. However I have been experiencing similar issues resuming my the e sample application, and have been experiencing the same issues. I can only presume there are some stability issues on certain devices as such I might have to abandon AE which is a shame as it's awesome :-(

I am getting hangs (black screen), music playing (app not starting) and other such quirks when resuming on my device when testing with the sample application. Any ideas guys?
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jan-25
im was not home, "Menu", should have been "Pause", which was mapped to the back button. Sorry for the confuction.

In newest version, Back when menu is enabled will quit, while back when menu is disabled will pause the app. Its property confuction how its works, so im changes that in the next version (very soon, im was just been home from my vacation).

PS. Look like its a bug in the latest SDLActivity.java, im got its fixed as important one. Im forget a "Return False;" in one place. Sorry SpicyPixel.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-25
Still can't find a right control stick for OUYA. I looked in the Java file and throughout Androids Extras, I'm no expert, but couldn't see anything that might fit the bill. And I know nothing about Java, so adding it wouldn't be possible for me.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jan-25
name for the right stick was "PadR_Left", "PadR_Right", "PadR_Up", "PadR_Down". its was stated in the GameControllers function under SetButtonLayout case.

Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-25
It doesn't work though - that's what I was using. I did state that in my original post (I think).

[EDIT] Yep

Quote
The source mentions a "Rpad_Left" etc., which I assumed to be for the right stick, but this doesn't seem to work and there are no controllers with a right D-pad that I'm aware of. I'm using v1.6 of Android Extras (I think).

Ahh, noticed it's PadR nor RPad (D'oh). OK. Cheers. Will try that. Maybe I did already. Can't remember now though.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jan-25
you was named as "Rpad_Left", which is incorrect. howover im look what its happens and why. Then im will fix that as well the back button issue.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-25
Actually nope. I didn't do it wrong in my code at all. PadR_Left/Right etc. doesn;t work on OUYA. I just mistyped it in the forum.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jan-25
its not a bug in the GameControllers.java due the string in ANDROIDKEYS$ does contain the right stick as well (its a variable which hold all button states on all buttons/controllers pressed as a returned string. Its works fine here when im stdout ANDROIDKEYS$ to the logcat.

Howover that can been eventuelly been a process bug in GameControllers() function eventuelly (not checked). There is different between small and big letters as well (howover im should do have lcase them).
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-25
Yeah, I was  careful to check that (upper/lowercase). I checked through the AndroidExtras when it didn't work. That's why I wrote here - I always try to check everything twice before seeking help.

I'll check with Java and AndroidExtras to ensure that the case is the same. It's no big deal as I was hoping to offer the Right stick as and alternative control scheme.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jan-25
Im guess im know what it happens.

The right stick is a analog one. That stick  does FIRST works after the first digital button press. The reason im did that is because the remap functions did newer works correctly with analoge controls, before after its have detected the controller name (the remap function was too aggresive on normale Android devices).

So tryout "Press a button" and then the right stick should works.

So until now for your game, just do a "press a button" to activate the menu screen when the game starts. That will hide the issue....

edit:
its no reason doing that on OUYA, but on other android based console. So if you want to checks out, you can in GameControllers.java in around line 192 change this line:

if (motion==1) return false;

to

if (motion==1 && isOuya==false) return false;
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-25
No, I noticed that with the other (left) stick - not working until digital button pressed. It makes no difference with the right stick.

I'll try that code later and let you know how I get on.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jan-25
odd since its works nice here and just see it working nice in Greedy mouse.

here is the GameControllers$ function im uses (if its make different?):

Code: GLBasic [Select]
FUNCTION GameControllers: Command$, PlayerID=0
        STATIC ANDROIDKEYS$=""
        STATIC KEYTIMER

        KEYTIMER=KEYTIMER+1
        IF KEYTIMER<60
                RETURN
        ENDIF
        KEYTIMER=100

        // this require before invoking keys, example after a SHOWSCREEN or in your controller code.
        SELECT Command$

        CASE "Update"
                IF ANDROIDKEYS$="" THEN GameControllers("SetButtonLayout")
                ANDROIDKEYS$=CallJava$("JoyUpdateKeys")
                // this retrive all inputs from the first PlayerID connected. If you doing a multiplayer game
                // you need set a PlayeerID after invoking this (can been done on a "press button for player 1 screen").
                ButtonRemapMessage$=""
                IF LEFT$(ANDROIDKEYS$, 8)="Message=" THEN ButtonRemapMessage$=RIGHT$(ANDROIDKEYS$, LEN(ANDROIDKEYS$)-8)
                DEPRINT("got: "+ANDROIDKEYS$)
        CASE "SetButtonLayout"
                // Java controller codes supported for remap (MouseX and MouseX cant been remapped):
                // {"Left", "Right", "Up", "Down"
                // "PadL_Left", "PadL_Right", "PadL_Up", "PadL_Down"
                // "PadR_Left", "PadR_Right", "PadR_Up", "PadR_Down"
                // "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8"
                // "TriggerLeft", "TriggerRight"
                LOCAL layout$="Left=Move Left;Right=Move Right;Up=Move Up;Down=Move Down;b1=Look Map;b2=Pause/Menu";
                CallJava$("JoySetButtonLayout:"+layout$)
        ENDSELECT

        // any other command will detect the current button from the current ANDROIDKEYS$ list. All buttons value
        // do return value between 0 and 1. Some buttons can analog as well and will return a float.
        LOCAL start=INSTR(ANDROIDKEYS$, "Player="+PlayerID)
        start=INSTR(ANDROIDKEYS$, Command$+"=", start)
        start=start+LEN(Command$)+1
        LOCAL finish=INSTR(ANDROIDKEYS$," ", start-1)
        LOCAL value$=MID$(ANDROIDKEYS$, start, finish-start)
        RETURN value$
ENDFUNCTION
 

and here is the control code:
Code: GLBasic [Select]
        KD=0; KR=0; KL=0; KU=0;
        IF GameControllers("Down")>600 OR GameControllers("PadL_Down")>600 OR GameControllers("PadR_Down")>600 THEN KD=1
        IF GameControllers("Up")>600 OR GameControllers("PadL_Up")>600 OR GameControllers("PadR_Up")>600 THEN KU=1
        IF GameControllers("Left")>600 OR GameControllers("PadL_Left")>600 OR GameControllers("PadR_Left")>600  THEN KL=1
        IF GameControllers("Right")>600 OR GameControllers("PadL_Right")>600 OR GameControllers("PadR_Right")>600 THEN KR=1
 

That did works here.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-25
Code: GLBasic [Select]
IF (GameControllers("b5",0) OR GameControllers("PadR_Left", 0)>600 OR KEY(44)) THEN ...
 

- that's what I'm using (the KEY() bit is so that I can test on Windows and functions properly for other controls on OUYA).

Your Control code uses - CallJava$("JoySetButtonLayout:"+layout$)

Mine uses - JAVACALL$("JoySetButtonLayout:"+layout$)

But other than that they seem pretty much the same.



 


Am I missing something?
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jan-25
That due CallJava$ was used before FiveSprites renamed that to JAVACALL$ when he released the first version of AndroidExtras. Use JAVACALL$ of course, or you get a compile error instead.

But somewhere wierd, if you not using V1.0 Beta 5 if the GameController.java, due its did works correctly here. So im need the logcat eventuelly. Howover soon im will look on the back button issue again later today or tomorrow (im tired etc).
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-25
Perhaps that's the issue - not calling Java directly?

It's -

Quote
// 1.6      15-oct-2013   SpaceFractal     New: NewAssets System.

according to the log system in AndroidExtras. Maybe my java bit is different and not upto date.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jan-25
its about Check_Asset() function for loading assests. iIts have nothing to due with joy input at all.

Im just want to uses CallJava$ rather than correctly JAVACALL$ (both did do extractly the same). So dont worry about that.

Can you checkout and stdout ANDROIDKEYS$? in GameControllers()?

PS. Just updated AE to 1.6.2 to tryout and make sure its the version im have that working and also hopefully fixed back button (but require more checking).
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-25
How do I stdout  ANDROIDKEYS$ on the OUYA?

I'll check out the newer AE, but probably tomorrow now as I'm working on something completely different for someone else.

Cheers though :)
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jan-26
open _logview.bat. im created a DEPRINT function for that (which either output to the IDE status or to the log). Not sure its in AndroidSample trought. Its a great thing when you want to debug thing when something went wrong.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-26
open _logview.bat. im created a DEPRINT function for that (which either output to the IDE status or to the log). Not sure its in AndroidSample trought. Its a great thing when you want to debug thing when something went wrong.

That just went right over my head. :P

I can't access my OUYA on my laptop (driver errors ahoy! so I use Dropbox for downloading), so how can I view the log view?

I think I might create a small test that only uses the right stick and see if it's something else in my code that's preventing them from being used.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jan-26
its still somewhere odd, since is works in Greedy Mouse when im tested it, so im hope you got it working. You need the ADB driver to work (when seen more stable in 4.1 than 2.2, which im never really got that to work), when you stdout strings. That im intersed is content in ANDROIDKEYS$ variable. That hold all button presses.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-26
I couldn't get ADB to work, although tbf i didn't have a great deal of time to get it working and jumped quickly to Dropbox and I haven't given it a thought since.

Off to work soon (night shifts), so probably not going to have much time this week to sort things out. There's no rush as the game I'm working on needs a lot of graphics work doing - the bulk of the game code is already done.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-27
its no reason doing that on OUYA, but on other android based console. So if you want to checks out, you can in GameControllers.java in around line 192 change this line:

if (motion==1) return false;

to

if (motion==1 && isOuya==false) return false;

This worked well in the fact that I no longer have to press a digital button first before accessing the left analog stick.

I'll have a look at the right stick tomorrow and create a simple test check, as it's still not working.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: MrPlow on 2014-Jan-27
Hi Ian,

How do I go about recording a fire using controller code for android extras ?

Hope u can help. :-)
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-28
Quote
How do I go about recording a fire using controller code for android extras ?
Sorry?

Do you mean pressing a fire button with controllers?

I'm not at home at the moment, but you have to use something like -

Code: GLBasic [Select]
IF GameControllers("B1",0) THEN ...
 
B1 is button1, B2 is button 2 etc. the 0 indicates the first controller etc. I can't remember if the command above is accurate, but it's something like that. Look in the AndroidExtras section for B1 and you'll find the exact command.

If that doesn't answer your question, then please clarify.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spicypixel on 2014-Jan-28
im was not home, "Menu", should have been "Pause", which was mapped to the back button. Sorry for the confuction.

In newest version, Back when menu is enabled will quit, while back when menu is disabled will pause the app. Its property confuction how its works, so im changes that in the next version (very soon, im was just been home from my vacation).

PS. Look like its a bug in the latest SDLActivity.java, im got its fixed as important one. Im forget a "Return False;" in one place. Sorry SpicyPixel.

Awesome I shall implement the Pause instead of Menu and await the update fix ;) Much appreciated.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: MrPlow on 2014-Jan-28
Thanks Ian!
Much appreciated...is there a way to output what result is being generated by the function...
so if left the PRINT Control$,10,10 (and the result is shown?)

That way I could figure out all left / right etc...

Quote
How do I go about recording a fire using controller code for android extras ?
Sorry?

Do you mean pressing a fire button with controllers?

I'm not at home at the moment, but you have to use something like -

Code: GLBasic [Select]
IF GameControllers("B1",0) THEN ...
 
B1 is button1, B2 is button 2 etc. the 0 indicates the first controller etc. I can't remember if the command above is accurate, but it's something like that. Look in the AndroidExtras section for B1 and you'll find the exact command.

If that doesn't answer your question, then please clarify.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jan-28
Right I'm not at work now so I can display all controller commands here. All info is in the Android Extras file -

Code: GLBasic [Select]
// "Left", "Right", "Up", "Down" - This is the main left analog stick
// "PadL_Left", "PadL_Right", "PadL_Up", "PadL_Down" - This is the D-pad
// "PadR_Left", "PadR_Right", "PadR_Up", "PadR_Down" - This is right analog stick
// "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8" - These are four face buttons and L1 and R1 (bumpers) on OUYA
// "TriggerLeft", "TriggerRight" - These are the lower two bumpers/triggers (L2 and R2)
 

Some controllers may differ, but shouldn't be too difficult to work out.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jan-28
im want to auto support more controllers without remapping, but by now ouya, x-box and ps3 controllers is supported by now. Rest needs remapping.

That can been done setting the game layout in layout$ variable in the GameControllers function, and then show the ButtonRemapMessage$ variable string when it got any content. The remap is NOT saved yet, which require more work to the GameControllers.java.

Im have recently last month fighting with various issues where remapping start was too aggresive. Due that, the host joystick need to supports SOURCE_GAMEPAD, SOURCE_CLASS_JOYSTICK or SOURCE_JOYSTICK. Some controllers might just reports a KEYBOARD, those will NOT works.

this issue is with Android and iOS icons, where you have little control over and perfer adding them by my self in xcode really here.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Apr-19
a lots of information here is lost. Howover you might need to ask again, because im cant remember the new features that was added and fixed.

Howover the lasetst thing added was ads and premimum GameStick support. For GameStick, im could not integrate thier SDK to supports inapp and archivements, but the controller is fully supported.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Apr-20
Sorry to delete posts. im did that to avoid various confuction. Sorry about that.

Just now im have updated Android Extras with SDK v4.3 Upgrade by using a InnoSetup installation script, which is being to been uploaded, which should been much better than the manual work, which might fails and eventuelly get some Windows Deb issues etc with some files. So in the future im only upload the installation script (which is zipped down throught).

To get work, just install the file seen in the first post top on your glbasic installation. You only need to do section 3 in the installtion, if you uses ouya (ouyalibs.zip).

Im hope this is a easier way to get Android Extras installation without fiffle to much work.

Here is the download:
https://www.dropbox.com/s/xxy4ysqfj618f7u/setup-androidextras2-2-withsdk18-glbasic.zip

Please Note, only major SDK upgrades will uses Inno Setup. All minor updates after 2.2 might still just been updates in the regular (becaues they are much easier to get replaced), and here the download file will still not change.

Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: msx on 2014-Apr-20
Thanks for your work.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Apr-24
Here is a prerelease of the new help file, which im thinks its better. Im have not done the inapp purchase, which im thinks need mere indepth help, but can do go in that file as well:

https://www.dropbox.com/s/9tbujcikk01v04z/Android%20Extras%20-%20API%2018%20-%20help.zip

Included is both compiled help html file as well original HelpnDoc file.

Im do thinks this file do require checking for spelling as well grammer errors. I do hope this file is easier to find the extract help and better to understand and finding what you want to uses.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Kyo on 2014-May-02
Hi spacefractal,
is possibile to add a function to create a button to turn on/off the wifi?  :nw:
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Marmor on 2014-May-02
thx a lot for your hard work ! <3
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-03
about wifi: no, im wont add such of thing, if its ever possible.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-06
the subject got changed due database lose, and GameSticks controllers is supported by v2.2, but just with no inapp. but can nicely uses premium releases.

Also im have just released a bugfix version to v2.2 which Proguard disabled (by now, which was bugged out) and fixed icons again.

Here is the version (which can also seen in the Android News Thread):
https://www.dropbox.com/s/zilor611dlv62d8/setup-androidextras2-2fixed-withsdk18-glbasic.exe

Also the releases does support Admob ads as well, but could not get it to work on iOS, due im need to been a better C programmer here. But its works quite nice, and is also quite easy to been implemented with AE, more easier than inapp purchases.
Title: Re: Android Extras (GameStick/OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-07
my GameStick do freeze very much, but howover John from the support group say the game ran perfectly and even submitted apk for me. That means Genius Greedy Mouse is soon out for GameStick  :good:.

Im do have to say, if John have not recontatcted me after few weeks idle, im have just forget all about it. So its a great support anyway, dispite the freeze issues im have. Howover im did added all important thing before my stick did go crazy (which is just happens sometimes).

So AndroidExtras also works nicely for GameStick, even its only supports premium without using the GameStick sdk, which im cant uses that, due missing documents. Howover they do want premium releases anyway, so its a quite not a big issue at all.

Ian, did you even submit Aquaventure for GameStick. Just like me, go for the premium version and set the price the same as the Ouya version.
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-May-07
Quote
Ian, did you even submit Aquaventure for GameStick. Just like me, go for the premium version and set the price the same as the Ouya version.
Yep. I submitted it a few weeks ago (as premium). Got an email this pm from PlayJam stating that it'll be good to go soon on the GS. Glad to hear you submitted GGM - hopefully it'll give you enough financial incentive to release more for the GS. Your hard work won't be in vain :)
Title: Re: Android Extras (OUYA/Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-07
Karma Miwa would been submitted soon GGM is ready.

It's was john that submitted for QA, he said its ran perfectly and liked the graphics.

So without him contacted me again, that game would not been submitted. Thanks john. He a nice guy.

Ian, please add game stick to subject, it's got removed due db crash.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-08
you might beat me first this time to get release first, hehe. Today GGM just got Approved and also waiting a release day.

They only found one issue, which was easy to fix: they wanted start button to bring on the pause Menu, which im just did that, without removing back and B button for the same. So all buttons (except home button) is supported on GameStick.

Yes, im see GameStick have been added, since we have two approved games yet.

Now Im should get a hand on the Amazon TV Device. Only issue is property to just detect the controller. Here im even only require the controller its self and checks its input. Pretty easy to do that.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-May-08
GS is bizarre - they only release a couple of games a week. They're not going to build up much of a collection at that rate.

I don't know when AV will be released - I hoped two weeks ago. Maybe next week now. Dunno. GGM may still get there first.

How do you use the GS BACK button? Is that in a newer version of AE or existing? I'm using one from a couple of weeks back.

FireTV would probably be the next logical thing to support with AE. And it's backed by a large solid company too, unlike OUYA and PlayJam (GameStick).

I've not decided on my next game yet, or for which machine(s). I do have a few to choose from, but if sales aren't worth the hassle I'm going to jump ship to something else.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-08
im have not talked why about that, while they are slow to release game. On Ouya, they just review/reject a game and is quite community friendly. That is property why Ouya have been a good job. Here the console is even stable and does not crash very much (if all)... unlike the crappy Sarafi browser (on iPad 1, its useless).

For the back button, there have been quite few issues that got fixed.

Back is named "Menu", etc doing like this:
Code: GLBasic [Select]
        IF Android.GameControllers("Menu")>100
                END
        ENDIF
 

But you do need to do a Android.EnableBackButton(FALSE) first. Now you can control the back button. In games, back button should invoke to menu and then eventuelly quit from there. in Android Sample, im do used the code for doing a manual quit as you can see....
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-May-09
Cheers Alan :)

I was quite lucky with AquaVenture not requiring a Pause key, as it's turn based, so I didn't have to worry about START etc. I used their guidelines against them - they state "use B or BACK to return to menu." I did use the B button and they said "err... ummm... ok..."
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-09
Here they wanted the change, but im dedicated to add it instead, so all 3 buttons did the same (B, Back and Start does the same).... So its was only one line code to do that.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-May-09
I just found out that AquaVenture will be released on GameStick on... wait for it... the 19th. Of June. Feck me!! That's unbelievable. And they were hassling me constantly to see when it would be ready.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-09
Mine is around start of July. Im do wonder why it's take time? Promotion or that way shop using?
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-May-09
I contacted Carlton at PlayJam and AV's now been moved forward to 22nd May. :)
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-15
its seen PLATFORMINFO$("DOCUMENTS") have been desprected on KitKat, which means you cannot uses the public download folder to write files anymore, but you can only read.

With kitkat, you cannnot write on external SDCARD anymore, only on a special app folder. Here is what im in one of future update will change the PLATFORMINFO$("DOCUMENTS") dir to, if Phone have KitKat installed.

So until then, do NOT uses PLATFORMINFO$("DOCUMENTS") to save files, this is not safe at all, but instead uses PLATFORMINFO$("APPDATA") until then,
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-May-19
With the forum crash, we've lost the info on automatic scaling of our apps on OUYA and GS.

Would you remind us what we need to change (not the GLB code, but the Android stuffage) to scale to full-screen resolution?

Cheers. :)
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-19
I'm thinks I'm did that in the help file now, which should been much easier to find around.

It's was about how to change the surface in a XML file, default set to 720p (it's don't crash anymore if the strings is missing now, that was fixed I a recent version).
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-May-19
Quote
It's was about how to change the surface in a XML file, default set to 720p (it's don't crash anymore if the strings is missing now, that was fixed I a recent version).
Yep that was it. I can't find it in my last AE (perhaps it's too old), so I'll have a look in the new one. Cheers :)


[EDIT] Yep, looks like it's in the new ReadMe.  :booze:
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-19
because im forget to remove readme.txt. its is today in Android Extras for glbasic.chm. Did im include that?

Howover here its is:
https://www.dropbox.com/s/sp92vdwvrms87bp/readmeAE.zip
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-May-19
You didn't include the .CHM in the last update (2.1). Looks very good :)
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-19
im will update that soon. howover im might forget it so its could been checked for spelling etc. Im will add a link in the AE news thread (and purchase the app used for creating it).
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-May-21
Does AE (or Android itself) have problems with .JPG images? I've not been able to display them in my latest project. I've checked the name and path, but all seems OK. Are they non-compatible?
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-21
im uses jpg in both Greedy Mouse (The background Floor) and Karma Miwa (Loading Picture) without issue. Remember big and small letters have differents values. That is a comon error when working with unix/linux based thing. So if you uses .jpg as filename, but try to load as .JPG, Android (and iOS) wont find it. So checkout the spelling again.

PS. Also which size is they in? Im also seen issues with too small images as well too big.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-May-21
Case sensitivity (and spelling) was the first thing I checked - I've been bitten by that before, never since. OK. Will investigate further.

If it had been just one file I would have suspected an error on my part, but as the .PNGs loaded fine and the .JPGs didn't I wondered.

The images arre 960x640 and others at 280x256; perhaps that's the issue - they are not square?
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-May-22
You could checks with DOESFILEEXIST to make sure its not a case or spelling issue.

Square is best,  but should not case any issues, other than you might waste some memory (often they just got allocated to nearest power of 2 as im have read of).

Like pngs, jpg's can been encoded in two ways: standard encodning as well progressive encodning. Im do allways uses standard encodning here and have not have trouble on that. Could that been a issue?

And which device was it on?

when using AE, also dont forget to do Android.Check_Asset() of course.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jun-14
There is a another new console, which got support from Ouya:
http://arstechnica.com/gaming/2014/03/ouya-everywhere-initiative-promises-more-indie-games-on-more-devices/

Both Maz Catz controller is allready supported in a recent AE update (before im was known about the console, but lucky they used same controller layout for the other Mad Catz controller they released and im only did searched part of the device name), so your game would run "out of the box" on that console. Howover there is not possible to choice a surface on it, but its a quite faster console on both GameStick and Ouya, so im dont think its a issue this time.

So except to see your Ouya game in thier store for M.O.J.A

EDIT:
Its seen there is a little bug, which seen missing detecting the Moja console its self, even the controller was allready supported. Im are now going to upload a Karma Miwa with Mojo fixes. If that one got passed, im will update AE.

For your code, only input controller images might need to been changed, and mojo can been detected throught the extended android info.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jun-17
oh damnet, there is some issues, that why im detect ouya and mojo is incorrect. that is due a stupid limit in Ouya SDK, which means im cant uses the official hardware dectection function, which is required to been done in OnCreate(), but keys is first init after that function.

But hopefully im have fixed that and will resubmit soon as possible.

If that one got passed, im will release Android Extras 2.3 with Android Mojo support. Im also added a little extra function in AndroidExtras.gbas, so you can checkout which console its run it (gamestick, ouya or mojo).
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Jun-17
Stupid OUYA.


Good luck with the update/re-submission :)
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jun-17
its my own fault, hehe, not testing on Ouya correctly before submitting :zzz:. Im do now checks the consoles again directly with android.os.Build.MODEL string again.

Its now works again as its should on Ouya and hopefuly on Mojo too. Im do like the idea Ouya team is doing by expainding coop with other companies, which of course should been used.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jun-18
now its need some test, because im have now just implemented Ouya Everywhere in a more official mode. That also means im needs to remove the remapping feature for those consoles (but keeps it on a Normal device of course). This is not possible to do that anymore on Ouya (but xbox, ps3 and other unknown controllers is still supported). But this is no big deal really.

Also the OUYA DEV KEY is now also needs to been inserted to Strings.xml file, because this was the only way to get workaround a annoying limit, because im needs to detect hardware in OnCreate(), which needs the key allready there. The shop system is first invoked after that.

Also im will in Android Extras possible to checkout the button string for the connected controller (this is need to been implemeted in gbas too).

Im do thinks Ouya Everywhere is a great idea really to expands to other systems that is Ouya Combatible and automatic can run on those.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jun-19
Finally im have just uploaded v2.3. By now the update version is finshed and the full install version is being uploaded.

This versions adds Ouya Everywhere support and fixed screen dimmer issue.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Kitty Hello on 2014-Jun-28
About the
Code: GLBasic [Select]
PLATFORMINFO $ ( "DOCUMENTS" )
: You cannot access this until you require WRITE_EXTERNAL_STORAGE. You can simulate this behaviour in 4.3 and below developer options.
So you should use "APPDATA" wherever possible.
Is that OK?

Gesendet von meinem GT-N7100 mit Tapatalk
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jun-28
im known.

im found that when im got issues with Greedy Mouse about half year ago/year ago after a system update on Ouya (which breaked the savegames on that). Now PLATFORMINFO$("DOCUMENTS") diddent works anymore for savegames (that even the WRITE_EXTERNAL_STORAGE was set). Instead im of course uses PLATFORMINFO$( "APPDATA") for Android. Its was a issue long time ago.

Also with Kitkat and some Android devices (like Ouya), even with WRITE_EXTERNAL_STORAGE is set, you have only read rights on the sdcard now, even in the Download folder. Write permission is only granted on the application own folder on the sdcard in a very contain folder. Here its is what PLATFORMINFO$("DOCUMENTS") should do on Kitkat, while on other systems, its should still point to the Download folder. This is a change many people dosent like.

This is property require upgrade to API-19, so im have not did that yet. Its a pretty minor issue anyway. Im do not have a KITKAT device yet.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Minion on 2014-Jul-12
Just updated the AE using the "Android Extras Update 2.2.x -> 2.3", ran my prog and now I get this :(

Code: GLBasic [Select]
running glb_build.bat
Using ANDROID_TARGET="android-18"
You can use "C:\Users\Windows User\Documents\GLBasic\Cassette50\distribute\Android\glb_android_build.bat" to change the API level and SDK path.
Checking Icons....
BUILD STAGE 2: Start compiler (android.bat)
C:\Program Files (x86)\GLBasic_v12\Compiler\platform\android\android-sdk-windows
Error: Target id 'android-18' is not valid. Use 'android.bat list targets' to get the target ids.
.
BUILD STAGE 3: Build a debug build
Buildfile: build.xml does not exist!
Build failed
.
BUILD STAGE 4: Build a release build
Buildfile: build.xml does not exist!
Build failed
Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m
 

Everything seemed to be working fine, and I only updated it so I can get to use BACK/MENU buttons. Anyone have any idea whats gone wrong or how to fix this ?
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jul-13
look like the installation update file is failed. Im will look on that tomorrow, so im will soon remove that file. Instead download the full install of v2.3.

Sorry about that.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Minion on 2014-Jul-13
Can I just confirm that the "Back" button code actually works ? Ive tried various combinations in my code and nothing seems to change. I even tried the AndroidSample version as well, changeing the "END" statement to this.

Code: GLBasic [Select]
                IF Android.GameControllers("Menu")>100
                        sound3.play(FALSE)
                ENDIF
 


But it just exits the app (ive tried bothe the back and menu buttons on my phone). Ive also tried changing the EnabaleBackButton from True to False and still no change. In all cases it just exits the app.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jul-14
do you uses v2.3? Im remember there was some eailer versions. in v2.3 the back button is disabled by default.

have you tried tot add those commands top of your app?

      ALLOWESCAPE FALSE
      AUTOPAUSE TRUE

Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Minion on 2014-Jul-14
Yup. ive tried all combinations (I think). it either does nothing or returns to the desktop (of the phone).

Any chance of a simple piece of code showing how to do it ? Not to END but do something like play a sound etc when Back is hit ?

And yes, it is v2.3 (i used the full install just yesterday as the partial instal was not working)
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jul-14
if you not adding the gamecontroller code. What does it now? Its should do nothing. Then the basic thing works.

You need to add a Android.GameControllers("Update") after a SHOWSCREEN to update polling of the buttons (that include pause, menu etc). That even you not using gamecontroller input for other things than the back button.

You also need to do a Android.GameControllersSetLayout$() in the init area.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jul-21
finally im got KitKat fullscreen working. But its a odd way Google have want it to implement it. Im wonder why they diddent added a fullscreen icon to the task bar, which would allow all apps to been fullscreen, rather you need to doing that your self?

Also its a odd method im need to do that, because its seen its required to been done in OnResume() when working with SDL. This also means its would do that automatic after the update. Im will update soon when im have time to do that. Api-19 is NOT required, because im only used a constant, so im just used the value its want (APi-18 is still required).

Also its is NOT possible to call it from glbasic code, due this will just crash JVM instead. So its the only way  to do that, which is in OnResume(). Odd.

Its also possible to do fullscreen in Jelly Bean, but choice not to do that, because its was only desinged for media players, not games.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: S.O.P.M. on 2014-Jul-21
Since when does an GLBasic app doesn't have fullscreen under Android? I really don't get it. I still have the AE version which had to set up manually. I hestitate to get the latest update because I'm happy everything works now :S
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jul-21
in Jelly Bean, fullscreen is impossible. That due the annoying navigations bar, which is sometimes on the bottoms, sometimes it can been placed on the right. If its on the right side, its can been highly impact in the game control, and is quite annoying (im even got feedback for that).

in KitKat, its finally possible again, but a strange way, but its works fine. Its due Google should have done that automatic from a fullscreen button, instead code that manually (its really just a flag im set to the view, when the window is resumed).

Also the next update is just a minor update, property call it 2.3.2.

Also im will property add this KitKat only feature to been added to the strings.xml, if you wont have the KitKat fullscreen. Its easy to that, due not all apps require it eventuelly.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: erico on 2014-Jul-21
So, If I understand correctly, you can send a 320x240 game to kitkat and it will fullscreen automatically?
Gosh, I just wished all androids were like that, what a mess of ramified system versions.

Great work on that update Space, I just updated Karma Miwa, but I don´t have kitkat yet and they will probably never release it for note II, only cyanogen mod way of course.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jul-22
Yes android is Quite fragmented when you compare to ios, which you only have a handfull resolutions to support, all full screen.

Full screen is automatic set for Kitkat, when the intent is resumed. Howover I'm might add a option to that one. Not all needs this one.

You can do that for jelly bean too, but not useable for games sadly.

Ps. As you gussed it, I'm recentely brought a Kitkat tablet, but just a cheap one.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: S.O.P.M. on 2014-Jul-22
I've Jelly Bean and there's no menu bar because my phone has hardware menu buttons. So my app is displayed full screen but I can confirm, on the phone from a friend there's the annoying soft menu bar. However, it's fantastic, that you care about all this matter here. AE is a worthy addition to GLBasic.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jul-22
Im have those navigation on all my Android Tables (im have 3). So you need to make sure the game dosent intefere with those navgiation bars (hence there exists about 117 resolutions for the surface used. They are not returned to the game. Im cannot set fullscreen in Jelly Bean, even its possible, so its a KitKat exclusive feature. Soon you touch on the screen, its revert back again.....
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spicypixel on 2014-Jul-22
I'm just implementing IAP in Google Play and in code.

In my code loop I have these commands.
Code: GLBasic [Select]
InAppPurchase_Update()
LOCAL purchasecode1 = InAppPurchase_isAvailable("internal.premium")
LOCAL purchasecode2 = InAppPurchase_isAvailable("com.spicypixel.fishyfingers")
PV_CPRINT ("int: " + purchasecode1, 1100, 1)
PV_CPRINT ("ext: " + purchasecode2, 1150, 1)
 

My config for AE is like this
Code: GLBasic [Select]
GLOBAL INAPP_NR_OF_ITEMS = 11       // 11 IAP items although I have only submitted one managed product so far in Google Console.
GLOBAL INAPP_DEVKEY = randomnumberhere!!!

FUNCTION InAppConfig_SkuNames$: iID$, store$

        // check name for "The Premium Key"

        IF iID$="0" OR iID$="internal.premium"                                                                  // this might not been required for your game with multiply names. numbers ID is requireed too.
                IF store$="general" THEN RETURN "internal.premium"                                      // This is the shared name for all platforms, can been used as ingame item
                IF store$="apple.appstore.ios" THEN RETURN ""                                           // SKU name for Apple iOS, that one you set in the plist and in Itunes Connect.
                IF store$="com.ouya.shop"      THEN RETURN ""                                           // the SKU name for the OUYA Store.
                IF store$="com.google.play"    THEN RETURN "com.spicypixel.fishyfingers"        // the SKU name for Google Play.
                IF store$="microsoft.windows"  THEN RETURN ""                                           // SKU name for windows (internal, you should save it locally, not done here).
                IF store$="com.samsung.apps"   THEN RETURN ""                                   // The Inapp Item Number
        ENDIF

        RETURN iID$

ENDFUNCTION
 

I must admit I have no idea how to check whether each item has been purchased within my code. The GLBStore project only has some DEFINES and no example IAP usage????

Having completed the GooglePlay bit and although unpublished, the draft has the correct com.spicypixel.fishyfingers in there and a single added managed product. However when I run the code on my android device the 2 CVPRINT statements in my shop loop show 0 for both ext and int. Which is exactly what they showed when I hadn't setup my IAP on GooglePlay.

I'm confused!
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jul-22
First perform a InAppPurchase_Update() soon as possible in your init(). This is to init the shop and checking out items and keys. Its take a little time to init that, since its asyncron, so your code is countinue to run and dosent wait that shop init to been fininsed.

you also should change INAPP_DEVKEY variable to a include any random number if your own choice. If the number is 0, then the activate function allways returns 0. Also InAppPurchase_isAvailable() should returns a hashed varlues other than 0, one for a purchased item, one when its is not purchased, but that first happens after you change INAPP_DEVKEY.

You also needs in the InAppConfig_PublicKeys$() adds your Google Play Public Key (in the line com.google.play). Its a quite very very long string. For the other shops not used, put something random on it. Its should not been empty.

Am also guess your app name is com.spicypixel.fishyfingers? if yes, you should change the sku to something like com.spicypixel.fishyfingers.premium. Otherwice its might confuction the Storekit.

Also after the above change, its should show up in the Logcat. So please output that.

PS. Dont set INAPP_NR_OF_ITEMS on more curent items at all. Its might confuction the setup as well, so better change it to the current number of items.

Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spicypixel on 2014-Jul-22
Everything you suggested I have now done and the EXT and INT print statements both show 0. I tried running the _logview.bat file and it said no connected devices. However I don't use ADB I use USB and transfer my APK each time. I'm not sure what it should be printing or how I determine which IAP item has been purchased but I'm presuming the values shouldn't continually be zero.

Still confused, and don't know what to do?
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jul-22
You should clearly get adb working, so you can uses logcat. Then its would output what that is wrong, so its much easier to find issues. Its would tell if something was missing and what that is wrong.

Something is sill not setup correct in inapp_config.gbas, since the returned value for internal.premium should been something hashed value on a not purchased item (its can been a any value, other than 0). You can eventuelly PM your config file.

Checkout if you added the <uses-permission android:name="com.android.vending.BILLING" /> permission. If you not do that, then init will fails and no shops would been detected, and hence its might allways returns 0. You can check if the init have been corrected inited by checking INAPP_STORE$ variable. Its should contain the shop name after the first InAppPurchase_Update()
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spicypixel on 2014-Jul-23
Got ADB sorted and ran log_view.bat whilst my app started until it closed. Only managed to capture a portion of the text, is this what you need.

Code: GLBasic [Select]
 
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Jul-23
look like something is wrong in InAppConfig_SkuNames$() and/or SKU is not correctly config in Google Play console, so names cant been found.

Its seen its have not found any sku at all from the Google Play, so its have no items found, then you will allways get a 0.

When sku is correctly setup (which is the hard part to setup), then IAPHELPER in the logcat will spitout price and details of it, just after Querying SKU details.

dont uses sku name like com.spicypixel.fishyfingers, which is your package name, but instead uses something like com.spicypixel.fishyfingers.premium and make sure its active in Google Play (even you have not released your app).

Also you cant purchase from your own account, but you should still see price and details of a sku in the app.

Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Aug-06
im forget to update 2.3 to 2.3.2, but im will do in this week, with fullscreen support (EDIT: for KitKat only). Im will howover look on the battery permission thing first (so its can been removed if not used).
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Aug-06
:)
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Aug-07
im are being upload 2.3.1 now to dropbox (only full with full sdk this time). this fixes icon issues, eventuelly create missing androidextras icons (if icon.png exists), BATTERY permission should also could safe to been removed if not used, and also KITKAT fullscreen support.

This is not a big release, but more a minor.

PS. Im really hope a day im could integrate most of the Android Extras to the stuck glbasic for v13 (which mean game controllers, fixing orientation, fullscreen and eventuelly the alternative sound thing). Rest will remain external (such like ads and Storekit).
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: veketor on 2014-Aug-07
Thanks for this great piece of code spacefractal.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Aug-07
Your dedication to this is great Alan. Keep up the excellent work  :good:   :nw:
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spicypixel on 2014-Aug-11
look like something is wrong in InAppConfig_SkuNames$() and/or SKU is not correctly config in Google Play console, so names cant been found.

Its seen its have not found any sku at all from the Google Play, so its have no items found, then you will allways get a 0.

When sku is correctly setup (which is the hard part to setup), then IAPHELPER in the logcat will spitout price and details of it, just after Querying SKU details.

dont uses sku name like com.spicypixel.fishyfingers, which is your package name, but instead uses something like com.spicypixel.fishyfingers.premium and make sure its active in Google Play (even you have not released your app).

Also you cant purchase from your own account, but you should still see price and details of a sku in the app.

I've done the changes with SKU name and these are reflected in the InApp name too (com.spicypixel.fishyfingers.premium) but I still get a 0 too for InAppPurchase_isOnline() ???? If I had an example I'm sure I could sort it but there isn't one.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Aug-11
InAppPurchase_isOnline() is only works on iOS, not on Android. This functions actuelly does not need on Android by now. This is a limit im should look on too. All the function will does, is if the device on the internet (online) or not (offline), and does not checking any purchases at all. But its currently only works on iOS.

instead checkout InAppPurchase_Price$() as well InAppPurchase_isAvailable$(). Please Note its might take a little while, so best do that in a SHOWSCREEN loop.

Also you can PM me your sample project, and then im will look on that, if you eventuelly have found a bug somewhere (which happens when im helped Ian)....
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spicypixel on 2014-Aug-11
I'm out now until later this evening but I'll zip the project for you to look at. Cheers SF.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Aug-11
howover you can do still check if its online by checking the price instead, which might return "unknown". Howover im looking on the project, when im got it and see if you have found a bug etc.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Oct-09
Im have updated AE to 2.4b1, here is the news:

Android StoreKit is updated to uses openiab-0.9.7.2.jar rather than the source Java files in the old version. Due this, make sure to delete libs and scr foldes to avoid dublicate of classes and hence fails to compile. Im have now moved it to Android Extras and is being integreated instead being separate. iOS version for StoreKit is STILL supported in inapp_functions.gbas. Im will later update the seperate version of the project for xCode. The files here is not changed since Beta 5 (even with the updated files).

inapp_functions.gbas is also got updated its helper files, due the OpenIAB used now supports bounch of new shops.

Sound/music (if SoundPoll is used) is now supported when pause the app or pressing the hold button.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Oct-15
im might forget to tell the newest version might require targetSdk 19 now (to support the new icon sizes for the extreme retina displays).

etc in your manifest.xml, do this:

    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Nov-30
From 2.5, im will begin to uses the glbasic Source Code for fixing various issues, but im do keep compatible with v2.4 throught.

- Java can now been called as a Extern function in sdl_main.cpp
- The Asset File Installation is now removed. Its was quite unstable on new installations or when its fails (etc user interupts the installation, then the app wont working anymore).
- SETORIENTATION(-1) does now perform the default orientation on Android (which also do that automatic on setup).
- DOESFILEEXIST copy/replace the relevant asset from APK if not exists (replacement for Android.Check_Asset() from AndroidExtras.gbas), before checking the file exists.
- DOESDIREXIST now copy/replace the whole folder from APK if not exists.
- KEY() function now uses Java based scancodes directly, without converted by SDL Input (from 0-512). Some devices can have scancoded >256 used.
- ALLOWESCAPE can now finally disable/enable back button.
- OUYA, Mojo and GameStick is now returned as "CONSOLE" for PLATFORMINFO$("device").
- Fixes to the Intersititial.gbas, so more than one ads can been shown (which also require update to two files in the Java part as well).

License in the source code have not been touched at all and im newer will do tha.

EDIT:
 im are just going to reupload it now (im was forget to include few files and should not have removed SDL_MIXER. That would only been those that have access to Source Code).
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Dec-01
2.5.1 is now online.

Im was forget to include the two a files required to fixing the commands. OOPS.

Also 2.5.1 is also fixed the AUTOPLAY TRUE issue. This was just a pure Java issue.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: S.O.P.M. on 2014-Dec-01
What exactly does this mean if I want to use the new AE for my existing project? How do I now load sprites and other resources - by using the internal DOESFILEEXIST command before calling LOADSPRITE? Or can I, after installing the new AE, load my media like the default way? If not, does this mean DOESFILEEXIST cannot be used in the way as it was designated? I ask because I need the command for the usual operation to check files that are data files for my game, not media resources! Please clarify that.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Dec-01
From the help file:

Code: GLBasic [Select]
The glbasic using a pretty long wait screen, with a animated ..... screen. How-over that screen take very long time, and its can fails sometimes too, so this screen have been removed at all.

This require you need to checks if the file exists before loading it on Android on all files and you should not do a SETCURRENTDIR("Media") to load your files, but using subfolderes directly. This due Android does NOT support SETCURRENTDIR() currectly when Java is called, which is still on the Root folder. This issue is still not fixed.

        IF DOESFILEEXIST("Media/yourmedia.png") THEN LOADSPRITE 1, "Media/yourmedia.png"

Sometimes you need to create the full diretory, because you want to scan them first. Here you can checks if a DIR exists, like this:

        LOCAL files$[]

        DOESDIREXIST("Media/levels")

        LOCAL cur$ = GETCURRENTDIR$()
        LOCAL num = GETFILELIST("*.*", files$[])
        SETCURRENTDIR(cur$+"levels")
        num = GETFILELIST("*.txt", files$[])
        FOR i=0 TO BOUNDS(files$[], 0)-1
                ......
        NEXT
        SETCURRENTDIR(cur$)

You might want to save memory for the Android Internal harddrive by doing this command:

        Android.Check_AndroidMem(File$)
 

you just need to uses DOESFILEEXIST before any file access (or DOESDIREXIST if you want to scan a dir before reading). That command will copy the assest file from apk to the memory (and eventuely update it) and then recheck if the file still exists. If that file cant been found in the apk nor in the folder, its will returns FALSE. If its is from APPDATA folder, its would been checked directly as normal.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Dec-01
in the next version im look on those commands:

PLATFORMINFO$("APPDATA")
PLATFORMINFO$("DOCUMENTS")

Unlike the help document write, you cannot write to PLATFORMINFO$("DOCUMENTS") on some Android systems. That folder point to the DOWNLOAD folder. But that folder is now write protected, so that cant been used at all for save games and should newer use that. on iOS its the other way. Here im could not write to the APPDATA. but works in DOCUMENTS. Quite confuction. That why im allways uses a variable to point to the path when using save games.

Im gonna thinks im should swap them, or give a option to swap that? This is also something that should been updated on the HELP file. Its incomplete here.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2014-Dec-01
Having just one option would be less confusing (say, APPDATA) - let GLB save stuff to the only possible save location based on the device.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: S.O.P.M. on 2014-Dec-01
@spacefractal Awesome, thanks. That seems to be very clever. Important is that my app can still use the standard operation of file and directory handling. The user data of my game is currently saved in the appdata folder that can be retrieved with PLATFORMINFO$(). Because DOESFILEEXIST will copy every requested file to the memory I'll have copies of all user data files in memory unnecessarily??
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Dec-01
its no issue on Windows, both commands can have its uses. So here its no problemo to uses the both.

To make more seance on Android "DOCUMENT" should changee to uses sdcard external data dir (if that exists), not on the download folder. If that data dir doesnt exists, its might returns same as the "APPDATA". This is all Java thing.

DOESFILEEXIST act nearly as before and also still act normall with "APPDATA". From Media folder, its also copy the requested file from APK to the internal memory on the fly, before its checks the file exists.

That is required on Android, because glbasic cannot read directly from the APK file. So before all Media files was installed to the internal memory, that was done by the "..." waiting screen. That screen is now skipped (as its was done in nearly from AE beginning), but its need to copy the files from APK somewhere.

Here DOESFILEEXISTS and DOESDIREXIST do that job best. Its actuelly what its does practically for you. Later that should also been integrate and doing that automatic for all commands, but im diddent do that for now.

You can eventuelly delete the file when the file have been used from the internal memory again (if low in memory).

Mightbeen that help should been explained better? what should im change?
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: S.O.P.M. on 2014-Dec-02
Yes, that helps. If this is necessary for stable Android operation, there is no reason to change anything for now. You did a great job for the Android part - without your work, compiling for Android would be a pain. So all is fine if my app will run well after the update which I'll check later on. Have a good day!
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Dec-02
The assest thing was something im changed in one of the very first version of Android Extras so the installation could been much more stable, without any various stuck reasons under install/update (which also was quite lengtly in some of my games).

Its was a part of AE, and now those  2 commands now can performs that directly.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Dec-08
today a little bug fix release with a null pointer issue in Java, and fixed NETWEBEND for Android, so ALLOWESCAPE no longer have effect (which seen was required on Android to prevent a crash).

Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Moru on 2014-Dec-09
Where can I download this? The links in the first page seems to all be dead. Would really like to test this if I can anything working on my phone :-)
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Dec-09
There is a sticky thread in Glbasic en forum:
http://www.glbasic.com/forum/index.php?topic=9644.msg83746#msg83746

I'm property should link to this in the first thread. All updates is there, but it's not a thread to get help to. It's here.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Moru on 2014-Dec-09
Very good idea, inserted a link in the first post. Can I remove the stuff under the line mabe?
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2014-Dec-09
Its not my post and hence I'm can't do anything about it. Ask five sprites. I'm so still post news etc in this thread and update the annoys post when that happens now I'm also here and then uses the source code and hope git is soon up.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Moru on 2014-Dec-09
Sorry, wasn't paying attention. But now there is a link to the working downloads at least. If I only could stop sneezing long enough to write a full sentence... :-)
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Jan-29
Ouya Inapp Shop seens all working again.. phew. There was a lots of small changes in the Java part.

Soon im upload Android Extras v2.7 with those changes:

- NETWEBEND is fixed again.
- KEY() can also uses with most analoge unknown controllers (but only threated them as digital).
- Fixes to the Ouya shop issues (which should have been done a LONG time ago, sorry about that. Im only did seen that few days agao).
- Im have NOT changed to the GameController Api.

But on normal Android Devices im recommered to uses KEY() as well, and also dont forget to let user remap the keys (they can been different from controller to controller). The GameController Api was more designed to run on Ouya, Mojo, GameStick and such console with known controllers.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2015-Jan-29
 :nw:  :good:  :booze:
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Feb-03
Today im dedicated to update the Android SDK to uses API-19, which took some time and also Ant was also need to been updated to.

Im do actuelly uses one API-19 feature, which was just a constant (which is config to tell the game to been uses the fullscreen mode) and used the number instead of the variable, so its could compile under API-18 SDK.

The update version can still uses API-18.

API-19 is KitKat. Im waiting checking out Lollipop (which im heard its not the most stable version anyway).

PS. IM will property no longer checking out to work on Android 2.x. There is less of 10% of those devices on Google Play (which is some sort compare to iOS4, which im also no longer support). Im do not own any Android 2.x anymore as well. So im wont fix issues that happens on Android 2.x at all in the future.

Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Feb-03
Also today im have done a stripped down version of the Platform/Android which can been included in a glbasic install, so the android dosent to been that big. Its contain some of the SDK files. The stripped down version is here:
https://www.dropbox.com/s/6e7ghj40pygjqv7/android.zip

In that version this is required to been download to get Android working, but soon those is download, its should works "out of the box":

1. Start SDK Manager.exe
2. Download those files seen in attacements.
3. Then Android should compile.

Property when the user is compile Android first time, then SDK Manager.exe could been open and tell the user what to download. By now both api-18 and api-19 is tested. Have not tested with newer version.

PS. Im will with Android Extras still include the full sdk for the update and no sdk for the minor updates for easier installs. This was just a idea for the official update to bring the download file down with a good compromise.

PPS. For the help file, see Compiling for Android. Im thinks that text needs to been updated. Also in the future im might not support any 2.x devices.
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Marmor on 2015-Feb-03
 :good: thx a lot
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: Ian Price on 2015-Feb-03
 :good:
Title: Re: Android Extras (OUYA, GAMESTICK, Controllers/GPS/Keyboard/Audio)
Post by: mentalthink on 2015-Feb-04
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:
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Mar-16
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)?
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Mar-18
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.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: kanonet on 2015-Mar-18
Whats about that android TV sticks? Those may have a keyboard/mouse and they usually dont have a touchscreen.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Mar-18
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).
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Mar-22
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.

Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Mar-27
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.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Jun-01
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.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Jun-23
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.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Sep-08
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.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Sep-08
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.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: Kitty Hello on 2015-Sep-09
I have no problem skipping to Android 4.2 as the minimum supported version. Anyone?
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: bigsofty on 2015-Sep-09
Fine by me.  ;)
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Sep-09
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.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Sep-09
look like the GameStick controller did have the same issue when connected to the Android TV, so im must confirm the standard controller diddent work. That is just fixed in AE.

onGenericMotionEvent() was newer called. Now im uses dispatchGenericMotionEvent() instead, which is more recommered in the Activity (but still using onGenericMotionEvent(), if Ouya is detected).
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Sep-13
Because Android Extras is now a integreated part of Glbasic since v14, then im dont thinks this thread should been in code snippet, but changing it to been a news and help thread instead in the general forum. Im will still link to this thread from the sticky news thread (that one im have locked, but im still update it of course).

Anyway.

Android Extras v3.0.0 is released (im are going to reupload now).

- Since its now v3.0.0 is simply because its the first release after glbasic v14, but im do still do full folder zip, because its based on v12, but is usable for v14. The reason im still waiting to the latest fixes from Gernot (there is a SVN, im have uploaded all my fixes). So PRESCALER is not included in this release. Sorry for that.

- This version do now support Android TV devices (Greedy Mouse got finally approved), which in workload is pretty much same as with Ouya, but its does using a another icon (icon_TV_AndroidExtras.png).

- If Ouya is not a target, the icon is now automatic deleted. This is checked if its can fine the icon_ouya_AndroidExtras.png file or not.

- There is some optimizing and fixes to the GameInput.API, which is required for gamepad support (since im wont using the old Android.GameController$() anymore, its was too compliced.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Sep-15
Now im taking a look into Razer TV (succesor for Ouya), which should been straigt away after got it working on Android TV. Its the same system, except its also can uses ouya storefront and games its have.

So glbasic is expanding for Android TV as well the new Apple TV. Greedy Mouse got approvede for Amazon Fire TV as well.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: Ian Price on 2015-Sep-15
 :good:
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: Kitty Hello on 2015-Sep-16
I updated source and platform packages now.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: UBERmonkeybot on 2015-Sep-16
Excellent News.
Will Camera access make it onto AE at some point?
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Sep-16
Currently this month would been getting Apple TV support. This is treated as a new platform. Hopefully I'm get it work before official release (I'm are one of the lucky winner of a Apple TV Dev Kit, and is currently waiting for the postage).

For Android wise, the focus was set also on TV too, here Android TV, Forge TV and Fire TV. All those is quite similar.

I'm will update my source too as well. Then eventually send you eventually changes I'm have done.

Please note: I'm want DEBUG command deprecated for IOS and tvOS. It's impossible to use that command due compiler conflict. STDOUT should been used instead..
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: Kitty Hello on 2015-Sep-17
I'll see about that debug command. Can you zip me an xcode project?
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Sep-17
I'm doing that later today or this week, when I'm have updated it. I'm do means I'm earlier have send one.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: spacefractal on 2015-Sep-22
Im can still not update Android Extras, because that what the source code files have been uploade is impossible to download, because they was not zipped down. Im dont want to click 10000 files one after one. Its would been nice if its was  using the FTP protocol instead of HTTP, then its would been much easier.

Hence im can also not send the xCode and the iOS project based on the newer source code as well.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: msx on 2016-Apr-19
Thank you for your job.

It is possible to know the GPS precision?. I need to know when the GPS is prepared for working.
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: fivesprites on 2016-Apr-19
I don't think the GPS code has been updated since I wrote it a long time ago.  However, it should still work correctly, but it does not report the accuracy of the GPS link.

You have access to lat, lon, speed, bearing and altitude.  It's not hard to update AndroidExtras to include the Accuracy.  Unfortunately, I don't have time to do that these days, but Spacefractal may be able to.

Simply add a new function to AndroidGPS.java called getAccuracy and return location.getAccuracy();  Then update SDLActivity.java and add a new entry for "getGPSAccuracy" and return andreoidGPS.getAccuracy().  The final thing to do is add a new function in AndroidExtras.gbas - call it getGPSAccuracy and fire off a JAVACALL as per the other getGPS functions to "("getGPSAccuracy:");

Again, Spacefractal may be able to help more here as I've not looked at the more recent code in a long time.

Note: You won't start getting valid values back from any getGPS... call until a satellite fix has been made. 

//Andy
Title: Re: Android Extras (Micro Game Consoles/GPS/Keyboard/Audio)
Post by: msx on 2016-Apr-19
Ok, fivesprites. I will try.

Thx