How to set Google Play Turn Based Multiplayer expire time - android

Currently Turn Based Multiplayer games expire in 2 weeks. Is there an option to set it to another value?

No, you can't set the expire time. The official documentation states:
A match expires when a user does not respond to an invitation or turn notification for two weeks. A match also expires in one day if there is an empty auto-match slot available but Google Play games services cannot find a user to auto-match.
There is a feature request to make it adjustable on Github, but sadly no recent activity.

Related

Google subscriptions - number of active subscriptions on backend vs Play Console

We are verifying Google subscriptions on backend using requests to:
https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptions?hl=en
we have also integrated with server notifications, so that we have updated data on all subscriptions.
I started to compare numbers displayed on play.google.com/console to what we have in our app and those are nowhere close. On our backend we see 30% more subscriptions that are marked as active then on Play Console.
On Play console I have restricted Subscription data chart to only single day and got number of subscriptions that were active at least for one day within given time window (so 1 day).
On our backend I got all subscriptions that had startTimeMillis before (or equal) given day and expiryTimeMillis after (or equal)
The difference was around 30% (Play console shows lower numbers). For all subscriptions I got updated data from purchase.subscriptions api (linked at the top) and confirmed that all of them should be active:
paymentState=1
checked date is between start/end date for subscription
According to other stackoverflow answers like:
How to verify purchase for android app in server side (google play in app billing v3)
checking expire date should be enough to verify if subscription should be active or not. But Maybe I'm missing something? Or maybe Play Console is not showing what I think I see?

When will my google play update appear to users?

I sent an update to the application I developed 1 month ago on Google Play. Accepted
The update date on the Google Play Store link has also changed.
But there is no button for users to install the new update-style application.
Is the only solution to wait? guess how long to wait
Google says the review process could take up to 7 days or even longer. But usually it takes up to 2 days. also please try to check Any notification or email on your account for any restriction or violation against Google play.

How to detect plan change for android's in-app purchase using GoogglePlay developer API?

thansk for reading
Context
We provide on-demand video streaming that user can purchase via monthly or yearly subscription on android, ios & web
Thus whenever purchases was made on Android, the app send our server a (purchaseToken, subscriptionID) pair, and we use this google developer API to persists the subscription info in our db
Problem
Recently, we added support for user to change their plan on Android. On Google side, the money is prorated and the new subscription is created. However, the old subscription's start and end time is still the same on the developer API.
We can't say for sure that the old subscription was cancelled and replaced with a new one because the payload (defined here) only tell you above auto-renew status. Plus the cancel reason of 1 is a blanket for anything that's not user-initiated, not just plan change.
I am making a work around, but it requires knowing a few things, like:
When you switch from a more expensive, longer plan (yearly) to a shorter one (monthly), will all the remaining money be prorated, effectively making your new subscription last longer than its normal duration?
which seems likely, based on this:
Google Play cancels the old SKUs and credits the user with the unused value of their subscription time on a pro-rated basis. Google Play applies this credit to the new subscription, and does not begin billing the user for the new subscription until after the credit is used up.
When you cancel the newer subscription, will it happen the same way as cancelling a normal subscription? (i.e, the subscription is not auto renewed, but should stay in effect till the end of its duration), or some credit will be stored with Google to be used later?
However, the old subscription's start and end time is still the same on the developer API.
This seems unexpected and could be a bug.
When you switch from a more expensive, longer plan (yearly) to a shorter one (monthly), will all the remaining money be prorated, effectively making your new subscription last longer than its normal duration?
Yes, the remaining balance of the original subscription is applied to the new subscription. The new billing period will start once that balance is used up. This is best explained in the docs here.
When you cancel the newer subscription, will it happen the same way as cancelling a normal subscription? (i.e, the subscription is not auto renewed, but should stay in effect till the end of its duration), or some credit will be stored with Google to be used later?
I believe what will happen is the subscription will not be auto renewed (as you said), but the subscription will remain active until the balance from the prior subscription is used up.

Getting date from google play services

I'm developing a game for android. I use the google play services for the multiplayer functionality.
I want to integrate an ingame currency, which is reset to a fixed amount every day. Every game round the user plays will cost him 1 coin of this currency. Additionally i want to integrate in-app purchases to buy packages of coins, which are indepentant from that daily amount of coins.
My question concerns the date request when starting the app, which decides wether the user gets coins for that day, or if he already got them. If i just fetch the local date, the user could just change the phones date and get the coins even if he already got them for this day. So my question is, whats the best way to get the current date? I already use the google play services, so is there a way to fetch the date from there ? Otherwise, that needs the user to be connected to the internet. Any suggestion on this ?
Another question is, where to save the coins. Locally would be the easiest option. But is it safer to use the google play services cloud stuff for this too ? That would have the advantage to work cross device.
If you can't trust the user's device you may want to get time from an external server that you control.
For storing the coins remotely, please check out the Google Play Saved Games Service. You can store arbitrary data there and use it to sync coins and other information across a user's devices.

Implement a Google play time validity of an app

I want to upload an app on google play. I want to implement time validity of app subscription is one year.
Once user pay for one year then user can use that app for an year. After one year automatically the app stop working and user need to buy it again from google play.
How can i achieve this.
You need to take a look at Google Play Billing API.
Since version 3 they support subscription billing which is what you are looking for.
http://developer.android.com/google/play/billing/billing_subscriptions.html

Categories

Resources