简体   繁体   中英

install_referrer intent deprecation

I have received email from google:

We recently announced that we'll be deprecating the install_referrer intent broadcast mechanism. Because one or more of your apps uses this intent to track referrals, we wanted to ensure you make the switch before March 1, 2020. After this date, new versions of the Play Store app will no longer broadcast the install_referrer intent after app installs.

I am not using install_referrer directly, but while browsing merged manifest i discovered that some firebase service named with package name com.google.firebase.measurement use it.

My firebase dependencies updated to latest version.

Should I care about it?

From Firebase support:

This is a great catch. Thanks for bringing this to our attention. There's no need [to take] action from your end as of now, I've created an internal request so we could provide an alternative for the install_referrer intent broadcast before its deprecation. As of now, we are yet to find out any details or timelines as to when it will be implemented. You can check our release notes from time to time for any updates about Firebase features and its services.

Strange that Google's products are not synchronized.

However if you are not using Firebase and your app contains third party libraries that use install_referrer kindly check directly with them.

To find in which library install_referrer included, open merged manifest and search for install_referrer , check the package name of the service in which the install_referrer included.

com.google.firebase:firebase-core:17.2.1 and com.google.firebase:firebase-analytics:17.2.1 add INSTALL_REFERRER to AndroidManifest . Probably need to wait till Firebase team updates these packages to use the new API.

Various SDKs can register a receiver for the install referrer.

For developers who are unsure about which SDK added a receiver to your manifest it's useful to look at the manifest merge blame file. Typically, in build/ there's a file intermediates/manifest_merge_blame_file/release/manifest-merger-blame-release-report.txt

In that file you'll need to find receivers that have

<action android:name="com.android.vending.INSTALL_REFERRER" />

in it's intent-filter, and the line before it will indicate what the source of that line is in your manifest.

For instance, the relevant lines for one of my apps looks like this:

44        <receiver
44-->[com.appbrain:appbrain-sdk:15.10] .../jetified-appbrain-sdk-15.10/AndroidManifest.xml:29:9-35:20
45            android:name="com.appbrain.ReferrerReceiver"
45-->[com.appbrain:appbrain-sdk:15.10] .../jetified-appbrain-sdk-15.10/AndroidManifest.xml:30:13-57
46            android:exported="true" >
46-->[com.appbrain:appbrain-sdk:15.10] .../jetified-appbrain-sdk-15.10/AndroidManifest.xml:31:13-36
47            <intent-filter>
47-->[com.appbrain:appbrain-sdk:15.10] .../jetified-appbrain-sdk-15.10/AndroidManifest.xml:32:13-34:29
48                <action android:name="com.android.vending.INSTALL_REFERRER" />
48-->[com.appbrain:appbrain-sdk:15.10] .../jetified-appbrain-sdk-15.10/AndroidManifest.xml:33:17-79
48-->[com.appbrain:appbrain-sdk:15.10] .../jetified-appbrain-sdk-15.10/AndroidManifest.xml:33:25-76
49            </intent-filter>
50        </receiver>

This shows that the AppBrain SDK (of which I'm one of the developers) adds a receiver for the install referrer. The following image from our blogpost explaining what exactly changes ( https://medium.com/appbrain/the-google-play-referrer-api-and-the-appbrain-sdk-38cfbaa350dc ) is clarifying what Google is changing: Google Play 引用 API 的更改

After checking the manifest file on my builded apk, i found the install refeer broadcast used by the firebase-measurement-connector module on Firebase Core Analytics so i exclude them :

 implementation ('com.google.firebase:firebase-ads:17.2.0')
{
    exclude group: 'com.google.firebase', module: 'firebase-core'
    exclude group: 'com.google.firebase', module: 'firebase-analytics'
    exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
}

And then recheck again my manifest mereged file by Analyzing APk and the Install refeer broadcast is disappeared.

On other side, if you use track analytics, Google ask to switch to the Install Referrer API https://developer.android.com/google/play/installreferrer/library.html before March 2020

I checked Firebase support agent for this issue. Firebase libraries are using install_referrer, and I got below response from Firebase support agent:

This is a great catch. Thanks for bringing this to our attention. I'm currently in discussion with our Analytics experts and will get back within 48 hours, or as soon as I have more information. For now, no need for any action from your end, wait for the next update from the Firebase team.

I believe we need to wait Firebase's next release. And Firebase team updates these packages to use the new API.

If you have used this API in your code by yourself, then you need to change it immediately as you are not depending on firebase or any other third party library provider.

There is one article on Android developer blog about this

https://android-developers.googleblog.com/2019/11/still-using-installbroadcast-switch-to.html

Also in this article they mention old implementation of install_referrer intent broadcast mechanism and provide complete information. So we can find this in our existing code.

https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#google-play-campaigns

INSTALL_REFERRER comes not only with Firebase but also with ADMOB . I can confirm that Admob v3.18.3 has this permission but it is no longer coming in Admob v4.2.1 . I have not tested other versions but i have heard that some previous versions like 4.2.0 & 4.1.0 also not carrying this permission.

But the question here is whether we need to remove the permission or we need to make sure that if our app is using Play Install Referrer Library then the INSTALL_REFERRER must be included. Because action required is not to remove it but migrate to it.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM