Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Play Game Services - Custom Notification / Welcome Back

I have been looking all over the internet, but can't find my answer.

Is there a way to show the user that they are signed in to the GPGS. The first time you sign in you'll get a notification, what will say "Welcome < name >" But when you open the app the next time nothing is shown.

Is there a way to show a Welcome Back notification?
For iOS it is possible: noted just above Step 9: https://developers.google.com/games/services/ios/quickstart?hl=en#step_9_add_a_sign-out_button

Any ideas?

like image 706
Dytanoth Avatar asked Sep 20 '13 18:09

Dytanoth


People also ask

Can I change my Google Play Games email?

We cannot change an email associated with your Google Play account or your purchase credentials.

How do I remove my Gmail account from Google Play Games?

Removing a Google Account from an Android Device Tap on the Accounts setting (it may have a slightly different name depending on the device). Tap on the Google account to delete. There may be multiple accounts listed here, so choose the email address associated with the account that you wish to remove.

Are adult apps allowed on Google Play?

We don't allow apps that contain or promote sexual content or profanity, including pornography, or any content or services intended to be sexually gratifying. We don't allow apps or app content that appear to promote a sexual act in exchange for compensation.


1 Answers

If you want the official Welcome Back Notification (the one that shows when a user is authenticated for the first time, or after having been signed out... not just disconnected), there are a few approaches that I use. (this is based on using the GameHelper Class as supplied by Google)

1) When a user quits the game by actually using a control that tells me they have left because they wanted to quit (i.e. not because of a phone call interrupt, or user hits the home button) I have had my apps just sign out of Play Services. This causes the user to have to sign in the next time around (which you can either do for them programmatically, or use the Google Sign in button), which causes the "Welcome Back" to flash. (make sure you use a way to track that they were logged in, as I believe Google wants users to use a button to sign in, if they signed out on their own volition)

2) I have forced the current sign in session to logout upon app startup, which means the same thing, user has to login (whether by app design or Google Button)

3) On app startup, wait for the onSignInSucceeded (which is triggered, but no auto Welcome Back) and show your own "You are Still Signed In" Toast message.

The part you mention above for iOS:

If you run your application again, you should now see a "Welcome back!" notification when you start the game. This is being powered by the GPGManager. At this point, your application and Game services are authorized and ready to go! You're now ready to earn achievements, load save games from the cloud, display social leaderboards, and so on.

Is actually implemented the same way for us... if your user hasn't been connected for a while, and their session has expired... the Welcome Back popup will be displayed when GameHelper re-initiates the connection (Something like 24 hours... I haven't done enough tests to find out exactly when Google tosses the current session credentials)

like image 117
user2346305 Avatar answered Oct 06 '22 00:10

user2346305