question

Lennie Araki avatar image
Lennie Araki asked

Can't login with generic android device

I'm trying to login on a generic (non Kindle Fire) android device into a Game Circle example app. It initializes properly but always comes up as logged in as "Guest". When I try to login from the Game Circle "overlay" it shows the Amazon Game Circle login page in the web browser but hangs when I log in (both the web browser and game). It works on the Kindle Fire 2 (emulator) but not on a Nexus 7 FHD or an emulated x86 ICS or JB android device. Is this supposed to work? Lennie
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Lennie, I have sent you the sample application where GC login flow works correctly in non Amazon devices with the latest SDK to your registered mail address. Please check.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Lennie Araki avatar image
Lennie Araki answered
I built the GameCircleClient you sent me with Eclipse and android-18. It doesn't login properly (here is the log): 11-27 07:51:05.583: E/GameCircleClient(1674): Unable to read api key. GameCircle requires an api key to be included in 'assets/api_key.txt'. GameCircle will not initialize. 11-27 07:51:05.583: E/GameCircleClient(1674): java.lang.IllegalArgumentException: Invalid API Key 11-27 07:51:05.583: E/GameCircleClient(1674): at com.amazon.identity.auth.device.authorization.api.AmazonAuthorizationManager. (AmazonAuthorizationManager.java:126) 11-27 07:51:05.583: E/GameCircleClient(1674): at com.amazon.ags.api.AmazonGamesClient.initialize(AmazonGamesClient.java:131) 11-27 07:51:05.583: E/GameCircleClient(1674): at com.amazon.example.gamecircle2.MyActivity.onCreate(MyActivity.java:119) 11-27 07:51:05.583: E/GameCircleClient(1674): at android.app.Activity.performCreate(Activity.java:5008) 11-27 07:51:05.583: E/GameCircleClient(1674): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) 11-27 07:51:05.583: E/GameCircleClient(1674): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023) 11-27 07:51:05.583: E/GameCircleClient(1674): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) 11-27 07:51:05.583: E/GameCircleClient(1674): at android.app.ActivityThread.access$600(ActivityThread.java:130) 11-27 07:51:05.583: E/GameCircleClient(1674): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) 11-27 07:51:05.583: E/GameCircleClient(1674): at android.os.Handler.dispatchMessage(Handler.java:99) 11-27 07:51:05.583: E/GameCircleClient(1674): at android.os.Looper.loop(Looper.java:137) 11-27 07:51:05.583: E/GameCircleClient(1674): at android.app.ActivityThread.main(ActivityThread.java:4745) 11-27 07:51:05.583: E/GameCircleClient(1674): at java.lang.reflect.Method.invokeNative(Native Method) 11-27 07:51:05.583: E/GameCircleClient(1674): at java.lang.reflect.Method.invoke(Method.java:511) 11-27 07:51:05.583: E/GameCircleClient(1674): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 11-27 07:51:05.583: E/GameCircleClient(1674): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 11-27 07:51:05.583: E/GameCircleClient(1674): at dalvik.system.NativeStart.main(Native Method) 11-27 07:51:05.583: I/System.out(1674): com.amazon.example.gamecircle2.MyActivity.onServiceNotReady When I look at the api_key.txt in the assets folder it is 1042 bytes instead of 1034 bytes in my example app which DOES initialize properly but won't login on a generic android device like the x86 emulator and/or a Nexus 7 FHD. Lennie
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Lennie, Thank you for writing back. Can you create your own API key and place it in assets/api_key.txt file and try? Below is the link of documentation that should be followed in order get api key out of your package name and md5 fingerprint of the certificate you are signing with the app? https://developer.amazon.com/sdk/gamecircle/documentation/gamecircle-config.html
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Lennie Araki avatar image
Lennie Araki answered
It now logs in (although I had to remove the agsClient.Initialize() and agsClient.release() methods in my application onPause() and onResume() which is recommended in SDK. Another problem I'm having is the GameCircle overlay does not work with joystick buttons on the OUYA (navigation works but you can't press any buttons without using the "touchpad"). I also tried this with a released application (PinBall Deluxe free) and it has the same problems. This is very frustrating - I'm tempted to move to another SDK like ScoreLoop or maybe even try to switch between Amazon and Google Play Services dynamically depending on the device. Please help.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dhiren avatar image
Dhiren answered
Hi, I am also facing same issue. My Amazon build is working fine with Game Circle but when I am trying with generic Android devices, facing same issue. Game Circle message of welcome pops up properly, asking for sign in. when I click on sign in, it asking for age, after that it open browser with message "page not available". I have created API key from package publish key MD5. then exporting APK & putting it in Android device (Sony Xperia S). Please help, our game is live on both Amazon & Google Play & need to release new update as soon as possible. We have delay only because of Game Circle problem. Thanks You.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Lennie, The joystick issue is brought into the notice of concerned team. I will notify here if there is any update from them. Hi Milenine, We need little more information to debug the issue you are facing in your app. 1. Are you able to complete the flow while pressing "Sign in to Amazon" button? 2. I have tested the "Create new account" flow in non amazon devices and it's working as expected. Can you please recheck now. Might be "page not available" was encountered due to network failure. 3. Have you tried running your app in Kindle devices? Is that working there? This way we can make sure there is no integration error. If the problem persists, I would request you to raise a ContactUs ( https://developer.amazon.com/help/contactus.html) with the app details and apk (you can put your apk in any web storage and share the path or you can upload the apk in the distribution portal). Thanks.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Lennie, Currently Joystick is not supported in GameCircle UI. However, I'm going to forward this feedback/suggestion to the concern team. Please stay tuned on Mobile App Distribution Portal or Blogs ( https://developer.amazon.com/blog/index.html) for any updates related to this. Thanks.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.