6

I'm currently implementing Google's App Invites and I'm wondering what the best way to test fresh installs.

I can broadcast an INSTALL_REFERRER event with the appropriate deep link like so:

adb shell am broadcast -a com.android.vending.INSTALL_REFERRER -n <your.package>/.<path.up.until.your.BroadcastReceiver> --es "referrer" "test_referrer=test"

But this would send a generic broadcast out with referral data. Is there currently a way to broadcast a INSTALL_REFERRAL which also contains the appropriate AppInviteReferral data?

Digging into the source reveals that there is a com.google.android.gms.appinvite.REFERRAL_BUNDLE included as a part of the intent, but I'm unsure how to construct that as a part of the broadcast.

edit I have created a separate, more general question regarding the use of bundle extras when testing broadcasts here

Community
  • 1
  • 1
loadedion
  • 2,217
  • 19
  • 41
  • what did you do in the end? – sivi Feb 09 '17 at 13:06
  • 1
    @sivi I ended up not going forward with the app invites, but a valid approach to test this was presented in another answer.. Basically, create a test app to send the broadcast event with the appropriate referral bundle. http://stackoverflow.com/a/31411910/2263561 – loadedion Feb 09 '17 at 17:27

1 Answers1

-2

I would use the demo app found here as a starting point. You can just grab the code there and test with other devices that have your app installed. NOTE: your app has to already have been published to the play store

dis.iz.peez
  • 89
  • 1
  • 9