Is there a way to get the username for the console account? I would desperately like do to this. If this is not currently a feature, it is much more important to me than anything else to be implemented.
I'm currently working on implementing a leaderboards system. I had been debating the whole profile creation aspect until I realized that every player should have their own Ouya username, gracefully avoiding the whole profile creation piece.
Of course, if I can't access the username, I'm stuck in the same problem. All I've found so far is a player UUID which doesn't seem to be the same thing.
I had assumed (correct me if I'm wrong) that that was Java code making direct calls to the Android SDK. But I'm developing in Unity using the Ouya Unity C# plugin. So, I didn't think Matt's code would help me. If I'm wrong and someone could give me some pointers on using custom Java code in a Unity game I'd be happy to listen.
You are correct that it is calls to the Android SDK, however,
As far as I know the Unity plugin is not maintained by Boxer8. But, you can basically do the same thing the Unity plugin does to call into Java (or modify the Unity plugin to do it) OUYASDK.cs is where the communication to Java happens and OuyaUnityPlugin.java is where you would stick the Java code.
Actually, at some point you *have to* modify the Java code to get IAP to work as far as I can tell. But, it's pretty hard to slog through the documentation to know for sure. (I'm talking about setting the APPLICATION_KEY in TestOuyaFacade.java for which apparently you have to copy around some stuff with a hex editor...)
We are planning on adding a method to the next ODK that will add accessing the username. I'll suggest wait for that which will be the preferred way. It will work similar to the fetchGamerUUID.
We are planning on adding a method to the next ODK that will add accessing the username. I'll suggest wait for that which will be the preferred way. It will work similar to the fetchGamerUUID.
Comments
Account[] accts = am.getAccountsByType(OuyaAuthenticationHelper.OUYA_ACCOUNT_TYPE);
and don't forget the permission:
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
2D MMORPG game/engine coming to OUYA!
http://forums.ouya.tv/discussion/896/mmo-hopefully
Take some time and learn Designer-Friendly Programming 101.
Take some time and learn Designer-Friendly Programming 101.
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].
Take some time and learn Designer-Friendly Programming 101.
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].