Google App Invite - Recieving INSTALL_REFERRER while app is running

272 views Asked by At

I cannot figure out how to receive broadcasts from Google Play under the following scenario:

I am in my application, I click home to minimize the app, then I go to my email (or sms) and click on the App Invite link. Google Play does its thing silently in the background and then brings my app to the foreground with no notification.

From what I understand from the documentation and trouble shooting:

  1. Intent will contain an app invite on application launch
  2. com.android.vending.INSTALL_REFERRER will be broadcast after application install.

Nothing in the documentation shows how/what google play broadcasts to the application when it is currently running. Every other scenario makes sense and works like a charm in my code.

At the end of the day, I want to capture the referring information from the original App Invitation and really don't see how you can do this.

https://developers.google.com/app-invites/android/guides/app

1

There are 1 answers

1
loadedion On BEST ANSWER

If the application is already running, the INSTALL_REFERRER broadcast will not be called. That only happens once, the first time you open the app after installing.

Since you already have the app, you will be directly deep-linked into your app. From your link:

If the user has already installed your app, the app will receive an Intent containing the optional deep link data. Implement the following code to respond to the invitation: ...