Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Error - "Not allowed to bind service intent" when trying to run Android license check service.

Discussion in 'Android' started by Rajmahal, Jul 16, 2021.

  1. Rajmahal

    Rajmahal

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

    I'm running into a serious issue in my game. I need to integrate a google license check service and when I do, at runtime, I get the following error in locat:

    ***

    2021/07/16 10:47:11.017 11269 22217 Error Unity AndroidJavaException: java.lang.SecurityException: Not allowed to bind to service Intent { act=com.android.vending.licensing.ILicensingService pkg=com.android.vending }
    2021/07/16 10:47:11.017 11269 22217 Error Unity java.lang.SecurityException: Not allowed to bind to service Intent { act=com.android.vending.licensing.ILicensingService pkg=com.android.vending }
    2021/07/16 10:47:11.017 11269 22217 Error Unity at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1918)
    2021/07/16 10:47:11.017 11269 22217 Error Unity at android.app.ContextImpl.bindService(ContextImpl.java:1829)
    2021/07/16 10:47:11.017 11269 22217 Error Unity at android.content.ContextWrapper.bindService(ContextWrapper.java:774)
    2021/07/16 10:47:11.017 11269 22217 Error Unity at com.google.licensingservicehelper.LicensingServiceHelper.checkLicense(LicensingServiceHelper.java:87)
    2021/07/16 10:47:11.017 11269 22217 Error Unity at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    2021/07/16 10:47:11.017 11269 22217 Error Unity at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
    2021/07/16 10:47:11.017 11269 22217 Error Unity at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
    2021/07/16 10:47:11.017 11269 22217 Error Unity at android.os.Handler.dispatchMessage(Handler.java:102)
    2021/07/16 10:47:11.017 11269 22217 Error Unity at android.os.Looper.loop(Looper.java:246)
    2021/07/16 10:47:11.017 11269 22217 Error Unity at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
    2021/07/16 10:47:11.017 11269 22217 Error Unity at UnityEngine.AndroidJNISafe.Check

    ***

    has anyone run into this kind of error message before? I did not get it with the same code / library in Unity 2018. Is there something I'm supposed to change in build settings, proguard file or manifest to get the service intent thing working?
     
  2. pl_ayground

    pl_ayground

    Joined:
    Dec 17, 2015
    Posts:
    60
    can you check if addding
    <uses-permission android:name="com.android.vending.CHECK_LICENSE" />

    to your manifest (below the </application> line is where I did mine) will help?

    looks like it did for me.
     
    Rajmahal likes this.