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?
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)
Related
I am trying to figure out if user has unlocked the device with the traditional PIN/Password method or with the biometrics like Face unlock or Fingerprint.
I tried some answers out there like https://stackoverflow.com/a/28694962/10357086 and https://stackoverflow.com/a/3451916/10357086.
I'm still unable to get the exact solution for this. Is it possible to do so? And if it is, then how would I get it?
All the answers I found are either about implementing the biometric authentication or about showing a fingerprint authentication dialog whenever needed.
But I don't want that. I want to check how the device was unlocked by the user?
TL;DR : I just want to know if the device is unlocked with the biometrics or PIN/Password method so that I can perform the next action based on it in my app.
I need to make an app that is able to read the Google Pay Pass event ticket through NFC. But I can't find any way how to deal with it. I saw some top apps in Google Play, as PassWallet and Passes, which works with such event tickets.
But they all could add a new ticket through scanning barcode only, not through NFC touch. I tried to open a ticket in Google Pay app and read it through another phone's NFC reader but didn't receive any information about the ticket, I always receive my default credit card info even when I open needed card.
So my question is that is it possible to read Google Pay Pass event ticket through another phone's NFC, as in the picture below?
If yes, could you share with me some example codes on how to do it?
Yes it is possible.
For a Google Pay issued pass the pass must be saved to google pay on the mobile device and that passes class must be set to enable smart tap and the pass itself must have the smartTapRedemptionValue field set as below:
{
...
"smartTapRedemptionValue": "Value to Transmit",
...
}
The device acting as the terminal (reads the pass) must implement the Smart Tap Protocol and present the collector id, and signed payload to the mobile device to authenticate the terminal and send passes that it can redeem.
The passes class also has the field redemptionIssuers can specify which terminal's collector id can redeem it.
In order to implement Smart Tap Protocol you can request access to the NDA protected docs via a form and that has the details on how to configure a device acting as a terminal to read passes.
There are also already certified supported terminal providers available.
I am currently trying to fix the following edge case in my app, without using the "Google Play Android Developer API" :
User buys Subscription(e.g. 1st of January)
Several Subscription renewals occur
User cancels his subscription(e.g. on the 15th of March)
User still has access to the subscription content, until the next billing period (e.g the 1st of March)
I am having difficulties doing so because whenever I call the queryPurchases() on my BillingClient object I always get the same data for orderId (Google states that the order ID should change based on the renewal recurrance number link ) and purchaseTime stay the same, no matter if queryPurchases(SkuType.SUBS) is called while the subscription is active or canceled (same behaviour occurs if I call the queryPurchaseHistoryAsync(). I would love to solve this issue without having to mess with the "Google Play Android Developer API".Using it seems a bit overkill for something as simple as getting the date of the last successful subscription renewal or just how many successful renewals there were.
i am developing an application that I need user phone number so I call the server from user's j2me application and I use platformRequest("tel:" + number); in my program for this purpose.
But the problem is that I don't know how I can abort the call because a minute ringing is sufficient for server to retrieving user number.
I want to know is there any API or instruction for canceling a call or some trick for it? for example is pushing the RED button programmatically possible in j2me?
No way to do this, best to get your server to terminate the call somehow.
I'm trying to have more control on the number we have next to our apps for the user, How can we just send the exact number to show instead of sending notification that increment that number each time.
Basically the current behavior is :
Friend ask for something or give me a gift it increase the number
If another friend send me something its increase the number.
When I log to the game all the counter is reset.
Wanted behavior :
When I log to the game and i go see only one friend on the counter for this friend is reset.
We are currently using facebook-java-api but we will probably merge to restfb soon.
But if you know how to do it in any language it will probably help.
The old dashboard api support the set_count method that can reset to 0 or put the value you want for your apps.
See http://developers.facebook.com/docs/reference/rest/dashboard.setCount/
However the facebook-java-api don't support setCount but the newer restFB does so we need to update our apps to the new api.
EDIT: Note that you and extend the BasicClient and create a custom IFacebook Method with facebook-java-api it`s not clean but it do the trick utils we upgrade to a new facebook api.