The only permission that i see in the manifest files that i have is :
android.permission.INTERNET
yet whenever i run the game on device, it asks for permission to read phone and contacts information, when i open the manifest inside Temp\StagingArea i do see the request to read phone state, here is the full manifest content :
I added minSdkVersion=“21” and target =“27” to all of my manifest files, also the manifest file in the stagineArea have that too, but the game is still asking for “phone state” permission …
After making sure all “exposed” AndroidManifest files are correct, i started digging into .aar files, and found that the the only one that is asking for the READ_PHONE_STATE permission is actually The official Unity Purchasing plugin
that screenshot is from : Assets\Plugins\UnityPurchasing\Bin\Android\CloudMoolah.aar\AndroidManifest.xml EDIT: this issue actually started happened after updating unity IAP ~2 weeks ago.
so i removed that and updated the .aar file, but the game is still asking for that permission.
This got me thinking about your minimum SDK suggestion, my final manifest file have the “wanted” minimum and target SDK :
However, you said that all manifest files must have the same min and target SDK, which i did for the exposed manifest files, but does this mean i have to change it for all the manifests inside the .aar files too ?? and is this mentionned anywhere in the documentation ? cause Unity IAP for example uses a minimum SDK of 9, which i don’t even have installed in my SDK manager, so i really don’t see a reason to follow that suggestion.
This might have been a misunderstanding as I did not say it like that. Different manifest files can have different min / target sdk versions. Manifest merger will take care of that.
When I’ve said
I was answering both of your questions in one sentence and that could’ve been not clear. So the answer to
is “yes, it’s ok to use min version set to 21 and target version set to 27”. And the answer to
is “for READ_PHONE_STATE permission issue the version numbers do not matter as long as they are higher than 3”. Sorry for confusing you.
Hi there,
i am having trouble in one case.there is no permission given for contacts and calls.though its asking for permission for those.really frustrating…