Search Unity

Google Play Developer API version used in Unity IAP?

Discussion in 'Unity IAP' started by Kogamma, Jun 18, 2019.

  1. Kogamma

    Kogamma

    Joined:
    Feb 19, 2018
    Posts:
    10
    Hi, we've recently received a warning on our Google Play Dev Console about us having a version of Google Play Developer API older than 3.

    So I was just wondering, does anyone know if Unity uses the Google Play Developer API to access products and subscriptions?

    If not, does anyone know how to find where the Google Play Developer API in a project since I don't really have a clue ¯\_(ツ)_/¯

    Thanks
     
    paulomuggler likes this.
  2. martin_unity660

    martin_unity660

    Joined:
    Feb 15, 2019
    Posts:
    21
    We have the same issue:
    "We’ve detected that your app is using an old version of the Google Play Developer API. From December 1 2019, versions 1 and 2 of this API will no longer be available. Update to version 3 before this date. Learn more"

    When can we expect an update for UnityIAP to Google Play Developer API version 3?
     
    paulomuggler likes this.
  3. etherny1234

    etherny1234

    Joined:
    Mar 10, 2015
    Posts:
    3
    Any unity support team member could give a feedback to this issue.
    Same issue for me.

    Using unity 2019.1.7f1 version
     
  4. etherny1234

    etherny1234

    Joined:
    Mar 10, 2015
    Posts:
    3
    Valeriya1129 likes this.
  5. martin_unity660

    martin_unity660

    Joined:
    Feb 15, 2019
    Posts:
    21
  6. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    119
    Also receiving the same message for my game made with Unity 5.4.4p1.

    @JeffDUnity3D What does Unity use the Google Play Developer API for... in-app purchases? Also, will there be anything I can do to comply with their requirement if I am using Unity 5.4.4p1?
     
  7. Kogamma

    Kogamma

    Joined:
    Feb 19, 2018
    Posts:
    10
  8. mleesago

    mleesago

    Joined:
    Jan 18, 2017
    Posts:
    10
    @JeffDUnity3D Hi Jeff, would you happen to have a workaround for this as a temporary fix? We are using Unity's IAP plugin and trying to see if we can do a patch ourselves in case that update from you guys doesn't make it in time before we do an update for our app.
     
  9. empika

    empika

    Joined:
    Jul 12, 2012
    Posts:
    19
    @JeffDUnity3D any idea how far back this will get backported? We're on 2017, but I think we need to upgrade to 2018 at least in order to get the play stores new adaptive icons working too.
     
  10. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    119
    @JeffDUnity3D Yes, I am using IAP.

    Mainly worried because I am using Unity 5.4.4p1. Will I be able to update an IAP package or something?
     
  11. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    119
    @JeffDUnity3D Uggh... I have an established game and a solo developer. I tried to upgrade to the latest Unity 2017, 2018 and 2019 but framerate dropped so that's not an option for me.

    @JeffDUnity3D Is there a way to talk to someone at Unity to see if there is an option (even paid) to get the fix in for the December deadline?
     
  12. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    119
    @JeffDUnity3D I didn't realize that IAP was a package in the Asset Store with compatibility back to 5.3. Looking forward to the fix. Thanks for the info!
     
  13. TuomasValtonen

    TuomasValtonen

    Joined:
    Oct 3, 2017
    Posts:
    1
    Any updates on the release date of the PlayStore fix? Would be nice to able to test it before it becomes mandatory.

    Thanks in advance!
    -Tuomas
     
  14. Kogamma

    Kogamma

    Joined:
    Feb 19, 2018
    Posts:
    10
    @JeffDUnity3D Yes, we are using Appsflyer for receipt validation
     
  15. DarekRusin

    DarekRusin

    Joined:
    Nov 15, 2013
    Posts:
    27
    Yes, we're verifying IAP on the server side too (for iOS, Google and Amazon).
     
  16. LandonC

    LandonC

    Joined:
    Dec 20, 2012
    Posts:
    45
    Had me worried. I thought I was the only one. Please update here when it's available. I'm glad Unity is still supporting old versions, I can't risk to update to the latest.
     
  17. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    119
    No server validation here. Also want to second LandonC that backporting to old versions is very important for me (I'm using 5.4.4p1).
     
  18. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    119
    @JeffDUnity3D Ah yes, I worded that incorrectly.

    Sorry for the confusion!
     
  19. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,467
    I have been informed by engineering that Unity IAP does not use the Google Play Developer API. We believe that affected developers may be using server-to-server calls for receipt validation or similar.
     
    Last edited: Sep 12, 2019
  20. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    119
    I am using the example code for validating purchase receipts, but I believe it's a local Tangle way from https://docs.unity3d.com/Manual/UnityIAPValidatingReceipts.html

    Here is a snippet of my code:

    Code (CSharp):
    1.             var validator = new UnityEngine.Purchasing.Security.CrossPlatformValidator(GooglePlayTangle.Data(),
    2.                 AppleTangle.Data(), Application.bundleIdentifier);
    3.  
    4.             try {
    5.                 // On Google Play, result will have a single product Id.
    6.                 // On Apple stores receipts contain multiple products.
    7.                 var result = validator.Validate(args.purchasedProduct.receipt);
    8.                 bool purchased = false;
    9.  
    10.                 foreach (IPurchaseReceipt productReceipt in result) {
    11.                     if (String.Equals(productReceipt.productID, kProductIDConsumable_Common_Orbs_1, StringComparison.Ordinal))
    12.                     {
     
  21. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,467
  22. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    119
    I just uploaded my app and released it to the "internal test" track and didn't receive the warning like I did before. Is everyone else still receiving the warning? Maybe this was a 1-time warning from Google? Or do I actually have to publish it to Production to get the warning?

    @JeffDUnity3D Do you know if there is a way to figure out if a particular asset store plugin uses this API? I definitely do not use any publishing API in my game, but it's possible that one of my purchases from the asset store could have added it.

    The first bullet point in the link states that the Google Play Developer API is used for IAP.

    "The Google Play Developer API allows you to perform a number of publishing and app-management tasks. It includes two components:
     
  23. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,467
    We don't use that API, that is a publisher REST API used to check product status. For example https://developers.google.com/android-publisher/api-ref/purchases/subscriptions/refund describes the POST REST API https://www.googleapis.com/androidp...scriptions/subscriptionId/tokens/token:refund Also there is this: https://stackoverflow.com/a/57334409/915990
     

    Attached Files:

    Last edited: Sep 18, 2019
  24. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    165
    Yeah this is a weird one, I only use Unity Ads, Unity IAP and Google Play Games Services Plugin (https://github.com/playgameservices/play-games-plugin-for-unity)

    I had this API warning showing a few times, and then in the last month it disappeared.

    I'm concluding that it was a bugged warning by google, I'll just ignore it for now and only worry about it if it appears again.

    Google constantly sends me bugged warnings about things that I do not use or have in my game. It's incredibly annoying.
     
  25. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    165
    Nevermind, the warning just showed up today again.

    I have no idea what could be possibly using the Google Play Developer API.

    Does anything a Unity uses it?
     
  26. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,467
    No, we have checked several times by several people here. We are fairly certain at this point that it looks like a possible false positive from Google.
     
  27. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    165
    Yeah I'm getting to the same conclusion. Thanks.
     
  28. Kogamma

    Kogamma

    Joined:
    Feb 19, 2018
    Posts:
    10
    In our case it seems to be the "play-services-drive" library that Play Games Plugin for Unity used for cloud saves before. This has changed to just use a REST API now. So our solution seems to be to not include the Drive library in our builds anymore.

    @JustAnotherDude
     
    JustAnotherDude likes this.