16

Some of my users ared getting the following error while using InstallReferrerClient.startConnection()

i'm following android-developer's tutorial

Unable to start activity ComponentInfo{.MyActivity}: java.lang.SecurityException: Not allowed to bind to service Intent { act=com.google.android.finsky.BIND_GET_INSTALL_REFERRER_SERVICE cmp=com.android.vending/com.google.android.finsky.externalreferrer.GetInstallReferrerService }

Does anybody know the cause?

Saul_programa
  • 341
  • 1
  • 4
  • 13
  • This is unrelated to your issue(although I am facing this issue too !) but since you are using Install Referrer library, Can you have a look at this issue? https://stackoverflow.com/questions/48003283/google-play-install-referrer-api-not-providing-utmcampaign-info – binaryKarmic Jan 04 '18 at 12:06
  • This is probably obsolete, since there is the install-referrer library: https://stackoverflow.com/questions/57733287 – Martin Zeitler Feb 15 '20 at 11:05

3 Answers3

3

The permission com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE already existed in our code base but there was a property tools:node="remove" that was removing it from the merged manifest. After deleting tools:node="remove" the error didn't happen anymore and I was able to start a connection.

The documentation doesn't mention this permission, but I found a comment about it being a "requirement from Play Install Referrer API": https://issuetracker.google.com/issues/78380811#comment22

Marilia
  • 1,911
  • 1
  • 19
  • 28
  • But I saw my merged manifest file, it have that permission and that too without that tools:node="remove". But still i am getting the crash. – Shashank Kapsime May 18 '20 at 18:59
  • Unfortunately I don't know any other way to solve the issue besides what worked for me at the time. There is however an open issue reported here and people are waiting for a fix: https://issuetracker.google.com/issues/72926755 – Marilia May 19 '20 at 20:15
-1

I report this: https://issuetracker.google.com/issues/70193614

OEM issue?

This forum is for reporting android app development issues only. However the issue you have logged is related to Samsung specific devices which suggests that it could be related to OEM modifications of the build. Please reach out to OEM for such issue. We are closing this issue here.

Kenumir
  • 664
  • 8
  • 24
-4

You have to declare on manifest this permission below

<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />