It's been a long time coming: the
install_referrer broadcast intent is being shut down on March 1, 2020.
Its replacement is the Play Install Referrer library. It's easy to get setup but you might notice something odd when you add it to your app: the install referrer library starts adding unnecessary permissions to your app (like
The reason this is happening is because version 1.1 of the library stopped including
<uses-sdk> in its manifest. When there is no target SDK set, the build tools assume the target SDK is 1. And because of that, the tools automatically request the
READ_PHONE_STATE permission (since that used to be default pre-SDK 4).
This bug is an oops on Google's part and hopefully they fix the issue soon.
While waiting for a fix, there are a couple workarounds you can use:
You can use version 1.0 of the library, which included
You can explicitly remove the
READ_PHONE_STATEpermission by adding this to your
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />
This snafu serves as a good lesson to never forget to include
<uses-sdk> in your libraries.