A
A
ArtemiyNeko2013-11-27 12:58:23
Android
ArtemiyNeko, 2013-11-27 12:58:23

App gets com.android.vending.INSTALL_REFERRER intent from adb shell but not from Google Play

During installation, I need to get referral parameters from a link in the Google Play market in the application, by and large similar to Google Analytics ("&referrer=some_parameters"). With ` am broadcast ` the intent is successfully sent, but when installed from Google Play, nothing happens.
Manifest piece:

<activity
  android:name="com.catgirl.testapp.MainActivity"
  android:label="@string/app_name" >
  <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
  </intent-filter>
</activity>
<receiver android:name="com.catgirl.testapp.Receiver" android:exported="true">
  <intent-filter>
    <action android:name="com.android.vending.INSTALL_REFERRER" />
  </intent-filter>
</receiver>

Command in adb shell:
am broadcast -a com.android.vending.INSTALL_REFERRER -n 
        com.catgirl.testapp/.Receiver --es "referrer" "my referrer"

I used the link (it's not in public, though):
https://play.google.com/store/apps/details?id=com.catgirl.testapp
        &referrer=utm_source%3Dargument1%26utm_medium%3Dargument2

The only error that repeats six times during installation:
W/ActivityManager(472): Permission denied:
        checkComponentPermission() owningUid=10053

But exported="true" is set, and to be honest, I get the same error when installing from Eclipse, despite the fact that the intent is sent. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question