Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Removing manifest lines added in the Google Play IAP plugin

Discussion in 'Unity IAP' started by Swah, Dec 22, 2020.

  1. Swah

    Swah

    Joined:
    May 13, 2015
    Posts:
    80
    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:
    android:allowBackup="true"

    <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="[USER=863766]@StyLe[/USER]/VrActivityTheme" >
    <intent-filter>
    <action android:name="com.google.vr.vrcore.ACTION_NONE" />

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

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    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.
     
  3. Swah

    Swah

    Joined:
    May 13, 2015
    Posts:
    80
    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".
     
    JeffDUnity3D likes this.
  4. Tx

    Tx

    Joined:
    Jul 4, 2012
    Posts:
    104
    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

    <uses-feature android:name="android.software.vr.mode" android:required="false" />
    <uses-feature android:name="android.software.vr.high_performance" android:required="false" />

    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).
     
  5. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please use Unity IAP 4.1.2 from Package Manager. You may need to upgrade Unity.
     
  6. Tx

    Tx

    Joined:
    Jul 4, 2012
    Posts:
    104
    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?
     
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    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.
     
  8. CalaveraX

    CalaveraX

    Joined:
    Jul 11, 2013
    Posts:
    143
    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

    <activity android:configChanges="fontScale|keyboard|keyboardHidden|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" android:enableVrMode="com.google.vr.vrcore/com.google.vr.vrcore.common.VrCoreListenerService" android:name="com.unity.purchasing.googleplay.VRPurchaseActivity" android:theme="@StyLe/VrActivityTheme">
    <intent-filter>
    <action android:name="com.google.vr.vrcore.ACTION_NONE"/>
    <category android:name="com.google.intent.category.DAYDREAM"/>
    </intent-filter>
    </activity>
     
  9. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    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.
     
  10. CalaveraX

    CalaveraX

    Joined:
    Jul 11, 2013
    Posts:
    143
    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.
     
  11. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Great! Yes, you'll want to be using IAP 4.1.3