Search Unity

Help needed on Google Play Pass Licence Check Integration

Discussion in 'Android' started by Rajmahal, Jun 4, 2020.

  1. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Hi,

    I'm trying to implement Google Play Pass licensing using their provided Unity guide. However, I'm running into some trouble. Has anyone implemented it successfully?

    thanks,
     
  2. Zed-321

    Zed-321

    Joined:
    Sep 14, 2013
    Posts:
    13
    What kind of problem have you encountered?
     
  3. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    I'm finding that the app crashes when the game calls the m_LicensingHelper.Call("checkLicense", new LicensingServiceCallback(this)); function.

    I tried just making a build with only the example scene and script provided by Google but even that crashes once I press the Check Licence button.
     
  4. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    I'm still a bit new to debugging on android. Is there a way to get a view of the reason for a crash? I made a build with Developer Build and Autoconnect Profiler enabled and ran the game. I see a lot of messages in the editor log from the device but not an error message that explains why it crashed.
     
  5. Zed-321

    Zed-321

    Joined:
    Sep 14, 2013
    Posts:
    13
    First of all I advise you to ask questions to the official e-mail which you communicate with PlayPassTeam.
    It can take a long time to answer, but they will help you anyway.
    I had a similar problem. It was resolved three weeks later. I do not know if I have the right to fully describe the essence of the problem, since there are some NDA, but this problem was not on my side.
     
    Last edited: Jun 4, 2020
  6. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    True ... okay, thanks for the tip. I'll email my contact.
     
  7. bjl1995

    bjl1995

    Joined:
    Feb 27, 2019
    Posts:
    1
    Have you successfully accessed PlayPass? I Need Some help can you help me
     
  8. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Not yet, I'm afraid.
     
  9. SidRed

    SidRed

    Joined:
    Sep 4, 2013
    Posts:
    4
    Hey,

    We have come across a good amount of errors while integrating the licensing plugin - However, we could draw a quick fix and be able to raise the build successfully. Now, we need to know if the fix is authentic considering the overall process of integration.
     
  10. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    I think the only real way is to do the build and send it to the play pass team for verification. They do a lot of testing on their end and will let you know if it works or not.
     
  11. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,142
    If your app crashes in development, it will also crash when verified by the Play Pass team.

    The crash you're encountering can be caused by calling Unity Engine API from a background thread. When a license check is performed, the app will make a network request to Google servers. When this network request finishes, the callback is executed on the background thread. You have to make sure you're not calling Unity Engine API from the background thread.

    There are a lot of problems with the official Google-Play-License-Check repo, so I decided to address them all in a paid Asset Store plugin once and for all. Sorry for the shameless plug :)