question

bisqray avatar image
bisqray asked

closing gamecircle overlay closes the app (kindle app)

When our app starts, it opens to the main menu. It checks to see if Amazon GameCircle is initialized, and calls the initialize function if it isn't. When GameCircle is first started, it pops up a small notification at the bottom of the screen that says "Welcome, …" and whatever your user name is. If the user taps on that message, it opens a GameCircle overlay window, where one can view and edit their profile and game information. Here's the issue we're seeing: when the user closes that GameCircle overlay window, it is closing our Main Menu activity, as well, which effectively closes the app. This is happening on all version of kindle hardware. Anyone have ideas?
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 Bisqray, I have sent you a sample app integrated with GameCircle 2.2 to your registered email address. It works on all Kindle devices. Can you please check is there any difference with your project? Also, While your main activity is closed, do you see any error or exception stack trace in logcat? Please confirm.
10 |5000

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

Abhimir avatar image
Abhimir answered
Were you able to solve this problem? I am having the same problem in my app.
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 Abhimir, Can you please help us to understand the issue? I would like to understand the circumstances when the issue appears. I am sending the sample example to your mail id. Please run it on the same device and see whether the issue could be reproduced or not. If the issue does not appear, can you please spend some time to see the difference of GameCircle integration between the sample and your app? Also, While your main activity is closed, do you see any error or exception stack trace in logcat. @bisqray did not get back with the information I asked in the last post. Please note that the issue you have been facing is reproduced only in specific circumstance.
10 |5000

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

Abhimir avatar image
Abhimir answered
There seems to be no difference in the code of the sample app and my code. I dont get any error or exception in the logcat. When I close the overlay, the game closes the app and put me in the home screen, almost as if I have pressed the 'home' button. I do see background dimmed statements in the logcat. Does that have anything to do with this?
10 |5000

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

Abhimir avatar image
Abhimir answered
Also this happens only in the MainActivity, not in the SceneActivity or any other Activity
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 Abhinab, I have sent you an email to your registered mail id. Can your please reply that? 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 Abhinav, Found the problem. You are making android:noHistory = true to your MainActivity. Below is the doc for noHistory manifest attribute. android:noHistory Whether or not the activity should be removed from the activity stack and finished (its finish() method called) when the user navigates away from it and it's no longer visible on screen — "true" if it should be finished, and "false" if not. The default value is "false". A value of "true" means that the activity will not leave a historical trace. It will not remain in the activity stack for the task, so the user will not be able to return to it. This attribute was introduced in API Level 3. You are forcing the MainActivity instance to be removed from the memory stack.
10 |5000

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