Reputation: 381
I played around with the INSTALL_REFERRER and everything works perfectly fine using adb, but not when my app is in the Google Play-Store.
My scenario is:
1) One library containing my BroadcastReceiver (package com.sm.android) 2) My app using the library (package de.sm.android)
In the AndroidManifest.xml-file of the app, the receiver-part looks like:
<receiver
android:name="com.sm.android.helper.ReferralReceiver"
android:exported="true" >
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
As said before, using adb I get the install-event, but when downloading the app from the store, I don't get the event. I build my url using https://developers.google.com/analytics/devguides/collection/android/v2/campaigns, it looks like https://play.google.com/store/apps/details?id=de.sm.riskulator&referrer=utm_source%3Dgoogle%26utm_medium%3Dbanner%26utm_content%3D234124%26utm_campaign%3Dpromo and forwards correctly to my app.
Thanks in advance, Sascha
Upvotes: 1
Views: 4035
Reputation: 35651
I could be wrong but I thought this was now disabled as it was a security hole. i.e It allows code to run on a phone before the user initiates it.
Update: Links for reference.
http://developer.android.com/about/versions/android-3.1.html (See Launch controls on stopped applications)
Intercept INSTALL_REFERRER and then forward on to Google AnalyticsReceiver
Upvotes: 1