Removing manifest lines added in the Google Play IAP plugin

Hello,

We are using Unity IAP 2.1.1 for our subscription app on Google Play. We noticed two problems with the app:

  • the app was using the android’s backup feature, which we actively do not want (we have our own cloud save system and want to rely exclusively on it). So we set android:allowBackup= false in OnPostGenerateGradleAndroidProject. We recently just found out that Unity IAP was setting it to true, and are concerned that we might have broken an important requirement for the plugin to work properly.

  • This post describes the other problem - Google Play is being told would prefer devices that support VR, which is not true at all. We’re considering removing that from the manifest as well, but are concerned that this could also break something important.

Could you let us know if removing either of these things from the manifest could cause problems?
Thanks!

The manifest parts we would like to remove or disable:


<uses-feature
android:name="android.software.vr.mode"
android:required="false" />
<uses-feature
android:name="android.software.vr.high_performance"
android:required="false" />
<activity
android:name="com.unity.purchasing.googleplay.VRPurchaseActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:enableVrMode="com.google.vr.vrcore/com.google.vr.vrcore.common.VrCoreListenerService"
android:theme=" @ /VrActivityTheme" >
<intent-filter>
<action android:name="com.google.vr.vrcore.ACTION_NONE" />

<category android:name="com.google.intent.category.DAYDREAM" />
</intent-filter>
</activity>```

Unity IAP does not use the Android backup feature nor requires VR. When you go through the IAP installer, are you prompted to "Update the API? You need to say “Yes, I have made a backup” if you receive this prompt.

Thanks for the quick answer Jeff!

So GooglePlay.aar was the file that was adding these settings to the manifest file. It doesn’t appear to exist after updating Unity IAP from 2.1.1 to 2.2.1, so that would fix both problems for us.

That being said, we’re on Unity 2019.4.13f1. The Package Manager has the “2019.4 verified” tag for 2.1.1, but not for future versions. Based on that I would be inclined to wait to push the update to our app until future versions are also “2019.4 verified”.

1 Like

Hello,
in my builds lately
vr.high_performance and vr.mode did make their way till the bundle. I tried to disable them in the manifest with

But they are still in the build that it’s uploaded to Google.
Reading about a possible aar problem I did copy all the aar in the project in a folder and did convert them to zip and decode them but no androidmanifest is requesting these features in that files.

I have a newer Inapp package.

  • In App Purchasing 3.2.3
  • Unity 2019.4.30f1

How can I find who’s asking these options? How can I fix?
My app is not VR related and this problem just appeared (when I updated to 2019 and to new iap).

Please use Unity IAP 4.1.2 from Package Manager. You may need to upgrade Unity.

Unfortunately we can’t upgrade to unity 2020.
Too many of our clients have iOs < 11 and can’t upgrade. They would be extremely unhappy to have to buy a new device to play our game. We think we’ll upgrade to 2020 next year.
If it’s a problem of IAP there are no planned updates for Unity 2019?
Or a hack I can do just to remove that “intent-filter” that seems to ask for VR capabilities?

I have never had the vr issue that you mention, even with Unity 2019. I don’t believe IAP is setting it, you can compare to a brand new project to confirm.

Hello, im having same issue with unity adding vr.core to my manifest and i dont have vr on my project its a plain simple 2d app. and now im having issues since im building to android 12, and i dont have any way to add the exported tag

This does not look related to IAP. As mentioned previously, compare to a brand new project. Some asset looks to be pulling in the VR reference.

i have maged to solve it.
The problem is indeed caused by a unitypurchasing plugin dependency (Maybe its fixed on a newer package)
But inside UnityPurchaasing/Bin/Android/GooglePlay.aar
if you open this aar with a zip compresor, you will find an AndroidManifest with those nodes.
I’ve deleted it from that androidmanifest, inserted it again on the aar and problem solved.

Great! Yes, you’ll want to be using IAP 4.1.3