Android Question Problem Receiving Install Referral from Google Play

echapeta

Member
Licensed User
Longtime User
Hello.
I'm trying to catch inside the app the string passed in the URL from Google Play.
The receiving Service_Start never has a valid Intent.
Looking at the Log without filtering I can see:

Permission Denial: receiving Intent { act=com.android.vending.INSTALL_REFERRER flg=0x10 } to ProcessRecord{2e354747 10869:com.Wardian/u0a113} (pid=10869, uid=10113) requires due to sender com.Wardian (uid 10113)

It seems that something is wrong with the permissions.

I have tried using the BradcastReceive library that doesn't need entries in the manifest https://www.b4x.com/android/forum/threads/broadcastreceiver.12493/) and the "standard" approach in (https://www.b4x.com/android/wiki/index.php/Intent)

Could anyone be that kind to post a working example ?

Thank You !!
 

echapeta

Member
Licensed User
Longtime User
Erel,

Using the ADB works properly.

But installing from the Google Play doesn't, the broadcast is not sent or not catch.

I'm using from

http://stevemiller.net/ReferrerTest/

the From#2, "The Freeform Text Way", in my case the url is:

https://play.google.com/store/apps/details?id=com.Wardian&referrer=INTERWAVE

The installation is ok, but the broadcast receiver is not fired.

I think the broadcast is not sent.

Any idea about how to debug the download and installation from Google Play ?

Thank You.

Eduardo.
 
Upvote 0

echapeta

Member
Licensed User
Longtime User
Upvote 0

echapeta

Member
Licensed User
Longtime User
Erel,

Changing to Static, works with the ADB test, but still doesn't installing from Google Play.

Even considering a delay of 60 seconds from Google Play to report to the installed app about the referrer.

Looking at the log, the only broadcast found is:
Received broadcast action=android.intent.action.PACKAGE_ADDED and uri=com.Wardian

What can I do next ?

Thank You.

Eduardo.
 
Upvote 0

u2005k

Member
Licensed User
Longtime User
Hi,
I am also trying to track App installs, can you please share some code snippets for doing it? Where do you post INSTALL_REFERRER from your App? How do you post it back to Google Analytics?
Another interesting question I have is about AppBrain promotion.
I am promoting one our app on AppBrain, currently I do not have any code in App that handles INSTALL_REFERRER however I see AppBrain campaign results on Google Play Developer console. See attached image.

I am curious to know how AppBrain manages this? If we know how it is done then I can use same technique in many campaigns like SMS, eMail, FB post.

Thanks & regards...
Uday
 
Upvote 0

echapeta

Member
Licensed User
Longtime User
Hello,

I'm just using the feature to pass referrer info to the app, that is who directed the user to install the app, every referrer has its own Q code URL.

The way to have it working is to use a Static Intent Catcher.

At the Manifest:
AddPermission(com.android.vending.INSTALL_REFERRER)
AddReceiverText(Starter,
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>)

And in the Starter Service:

Sub Service_Start (StartingIntent As Intent)
' check google play referrer
If StartingIntent.Action = "com.android.vending.INSTALL_REFERRER" Then
'https://play.google.com/store/apps/details?id=com.Wardian&referrer=referrer=123456789&sponsor=jose

' referrer
' validation & conforming
Dim Referrer As String = StartingIntent.GetExtra("referrer")


End If

Regards.
 
Upvote 0

u2005k

Member
Licensed User
Longtime User
Dear Echapeta,

Thank you so much for sharing it.

Regards...
Uday
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…