Search Unity

Google Bans App due Alipay SDK

Discussion in 'Unity IAP' started by dsanteugini, May 31, 2019.

  1. gamer2300

    gamer2300

    Joined:
    Jan 16, 2013
    Posts:
    31
    leave this word, talk for the rest of period..where is the solution?
     
  2. Vagrod

    Vagrod

    Joined:
    Aug 4, 2017
    Posts:
    82
    Check if you have some older versions in testing or alpha ring. That was my case. I forgot to update my internal testing ring. In the end, in Artifacts Library section in Google Play Console you should have only one -- last -- active build record. If you have some older artifacts there, that means that it is active somewhere at the moment.
     
  3. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    So far, it seems limited to users who have included the Xiaomi Game Center on the Build dialog. The solution is it to ensure that this is not checked, it takes up to 30 seconds for the status to appear once you load the Build dialog. Also, as someone previously stated on this thread, ensure none of your Alpha/Beta releases contain the reference, and also check your Artifact library
     

    Attached Files:

    Last edited: Jun 18, 2019
  4. gamer2300

    gamer2300

    Joined:
    Jan 16, 2013
    Posts:
    31
    thanks i will try this
     
  5. FunRobDev

    FunRobDev

    Joined:
    Jun 3, 2017
    Posts:
    11
    Thanks, Vagrod, you were right. I had a release in the Internal Test Track which referred to alipay, that was the problem. Production track, Alpha track, Beta track, Internal Test Track mustn't contain active releases which refer to alipay.
     
  6. Deathfate

    Deathfate

    Joined:
    Sep 10, 2012
    Posts:
    46
    For some reason it seems that UnityChannel folder gets deleted when you press remove in the xiaomi mi game center in build settings, making it impossible to build without adding it. If you have this problem, just import the IAP in a new project without touching the build settings xiaomi button and then copy the UnityChannel folder in your project.
     
  7. Noxalus

    Noxalus

    Joined:
    Jan 9, 2018
    Posts:
    80
    I have the same issue, my internal Android build have been removed by Google because of this AliPay SDK.

    But in the build settings, I've never added the "Xiaomi Mi Game Center".



    However, when I perform a local APK build, the AndroidManifest.xml contains references to Xiaomi and their AliPay SDK.

    Code (CSharp):
    1. <activity
    2.     android:theme="@ref/0x01030010"
    3.     android:name="com.xiaomi.gamecenter.sdk.ui.MiActivity"
    4.     android:screenOrientation="3"
    5.     android:configChanges="0x480" />
    6.  
    7. <activity
    8.     android:theme="@ref/0x01030010"
    9.     android:name="com.xiaomi.gamecenter.sdk.ui.PayListActivity"
    10.     android:exported="true"
    11.     android:configChanges="0x480" />
    12.  
    13. <activity
    14.     android:theme="@ref/0x01030010"
    15.     android:name="com.xiaomi.gamecenter.alipay.HyAlipayActivity"
    16.     android:exported="true"
    17.     android:configChanges="0x480" />
    18.  
    19. <activity
    20.     android:theme="@ref/0x01030010"
    21.     android:name="com.xiaomi.account.openauth.AuthorizeActivity"
    22.     android:exported="true"
    23.     android:configChanges="0x480" />
    24.  
    25. <activity
    26.     android:theme="@ref/0x01030010"
    27.     android:name="com.xiaomi.gamecenter.wxwap.HyWxWappayActivity"
    28.     android:exported="true"
    29.     android:configChanges="0x480" />
    30.  
    31. <activity
    32.     android:name="com.alipay.sdk.app.H5PayActivity"
    33.     android:exported="false"
    34.     android:screenOrientation="3"
    35.     android:configChanges="0x4e0"
    36.     android:windowSoftInputMode="0x12" />
    I use Unity 2018.310f1 with Unity IAP package version 1.22.0.
     
    Last edited: Aug 6, 2019
  8. Sam-McAlpine

    Sam-McAlpine

    Joined:
    Jul 29, 2013
    Posts:
    36
    Is there any updates on this?

    I just had the same thing happen:
    Project details:
    Building from Unity, Windows 7

    Unity 2019.1.5f1
    IAP version: 2.0.6
    Ads Version: 3.2.0

    .Net 4.x Equivalent
    IL2CPP

    Never added the Xiaomi Game Center to the game but there seems to be some Xiaomi related files in the project and manifest.

    Added Unity IAP and Ads to my project and got this from Google:

    Here’s how you can submit your app for another review:

    1. Read through the Personal and Sensitive Information article and make the necessary changes to your app. We’ve identified that your app is using the AliPay SDK or library, which facilitates the transmission of phone number information without meeting the prominent disclosure guidelines. If necessary, you can consult your SDK provider(s) for further information or please upgrade AliPay SDK version to 15.5.5 or higher.
    2. Make sure your app is compliant with the User Data policy and all other policies listed in the Developer Program Policies. Remember that additional enforcement could occur if there are further policy issues with your apps.
    3. Sign in to your Play Console and upload the modified, policy compliant APK. Make sure to increment the version number of the APK.
    4. Submit your app.

    After analyzing the APK I found this:

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.gamecenter.sdk.ui.MiActivity"
    android:screenOrientation="3"
    android:configChanges="0x480" />

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.gamecenter.sdk.ui.PayListActivity"
    android:exported="true"
    android:configChanges="0x480" />

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.gamecenter.alipay.HyAlipayActivity"
    android:exported="true"
    android:configChanges="0x480" />

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.account.openauth.AuthorizeActivity"
    android:exported="true"
    android:configChanges="0x480" />

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.gamecenter.wxwap.HyWxWappayActivity"
    android:exported="true"
    android:configChanges="0x480" />

    <activity
    android:name="com.alipay.sdk.app.H5PayActivity"
    android:exported="false"
    android:screenOrientation="3"
    android:configChanges="0x4e0"
    android:windowSoftInputMode="0x12" />

    Thanks
     
  9. alexsander890

    alexsander890

    Joined:
    Apr 15, 2013
    Posts:
    61
    I have the same issue, my internal Android build have been removed by Google because of this AliPay SDK.

    But in the build settings, I've never added the "Xiaomi Mi Game Center".

    Is there any updates on this?

    I just had the same thing happen:
    Project details:
    Building from Unity, Windows 7

    Unity 2017.30.f1

    Never added the Xiaomi Game Center to the game but there seems to be some Xiaomi related files in the project and manifest.

    Added Unity IAP and Ads to my project and got this from Google:

    Here’s how you can submit your app for another review:

    1. Read through the Personal and Sensitive Information article and make the necessary changes to your app. We’ve identified that your app is using the AliPay SDK or library, which facilitates the transmission of phone number information without meeting the prominent disclosure guidelines. If necessary, you can consult your SDK provider(s) for further information or please upgrade AliPay SDK version to 15.5.5 or higher.
    2. Make sure your app is compliant with the User Data policy and all other policies listed in the Developer Program Policies. Remember that additional enforcement could occur if there are further policy issues with your apps.
    3. Sign in to your Play Console and upload the modified, policy compliant APK. Make sure to increment the version number of the APK.
    4. Submit your app.

    After analyzing the APK I found this:

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.gamecenter.sdk.ui.MiActivity"
    android:screenOrientation="3"
    android:configChanges="0x480" />

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.gamecenter.sdk.ui.PayListActivity"
    android:exported="true"
    android:configChanges="0x480" />

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.gamecenter.alipay.HyAlipayActivity"
    android:exported="true"
    android:configChanges="0x480" />

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.account.openauth.AuthorizeActivity"
    android:exported="true"
    android:configChanges="0x480" />

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.gamecenter.wxwap.HyWxWappayActivity"
    android:exported="true"
    android:configChanges="0x480" />

    <activity
    android:name="com.alipay.sdk.app.H5PayActivity"
    android:exported="false"
    android:screenOrientation="3"
    android:configChanges="0x4e0"
    android:windowSoftInputMode="0x12" />

    Thanks
     
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We are removing Xiaomi support moving forward. However, we have not been able to reproduce the issue that you are seeing without explicitly enabling the Xiaomi Game Center on the Build dialog, or possibly having enabled it on a previous build and files may have been left behind even if you subsequently uncheck it. Notice the GameCenter mention in your manifest. Are you able to reproduce on a new/empty project, perhaps using the Sample IAP project here https://forum.unity.com/threads/sample-iap-project.529555/
     
  11. dominii_k

    dominii_k

    Joined:
    Jun 9, 2017
    Posts:
    2
    I have the same problem as the users above.. and I've never seen any option to include or exclude Xiaomi Game Center. Maybe you could tell me again how I can exclude this from my apk if it was eventually ever activated?
     
  12. Noxalus

    Noxalus

    Joined:
    Jan 9, 2018
    Posts:
    80
    For more information in my case, the issue could come from the fact I created a package from the one downloaded on the asset store to use it easily from the UPM. And I know that all .aar files located in packages' Plugins/Android folder are directly included in the produced APK.

    Maybe it's the case of other people here?
     
  13. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    It would be good to know how it got included in the first place, are you able to reproduce on a brand new project?
     
  14. dominii_k

    dominii_k

    Joined:
    Jun 9, 2017
    Posts:
    2
    Alright, so I just set up a new project with IAP and I wasn't able to find any references to AliPay SDK. So I just copied my Game into this new project and it seem to work fine now because google has accepted the update.
    So maybe this SDK came from some assets I imported earlier but didn't use them anymore.
     
  15. lanangyudis

    lanangyudis

    Joined:
    Apr 1, 2019
    Posts:
    2
    still confused. i still my game got rejected. i do not use IAP. how can i fix this? pls help!?!?!?!?
     
  16. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Did you check the manifest first? Please share the contents of your AndroidManifest.xml using Android Studio and Analyze APK. We have not been able to reproduce when you target Google Play as the IAP target build, only when the Xiaomi GameCenter SDK is checked on the Build dialog. Please confirm with a new project with only IAP enabled, and build to an APK and analyze similiarly.
     
  17. xsasoftware

    xsasoftware

    Joined:
    Sep 6, 2017
    Posts:
    24
    I set false to export xiomi dependences in UnityChannel.aar -> Manifest

    This is how my AndroidManifest look now. Am I safe to push the update?
    <uses-sdk
    android:minSdkVersion="16"
    android:targetSdkVersion="28" />

    <supports-screens
    android:anyDensity="true"
    android:smallScreens="true"
    android:normalScreens="true"
    android:largeScreens="true"
    android:xlargeScreens="true" />

    <uses-feature
    android:glEsVersion="0x20000" />

    <uses-permission
    android:name="android.permission.INTERNET" />

    <uses-feature
    android:name="android.hardware.sensor.accelerometer"
    android:required="false" />

    <uses-feature
    android:name="android.hardware.touchscreen"
    android:required="false" />

    <uses-feature
    android:name="android.hardware.touchscreen.multitouch"
    android:required="false" />

    <uses-feature
    android:name="android.hardware.touchscreen.multitouch.distinct"
    android:required="false" />

    <uses-permission
    android:name="com.android.vending.BILLING" />

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

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

    <uses-permission
    android:name="android.permission.ACCESS_NETWORK_STATE" />

    <uses-permission
    android:name="android.permission.GET_TASKS" />

    <uses-permission
    android:name="android.permission.ACCESS_WIFI_STATE" />

    <uses-permission
    android:name="com.xiaomi.sdk.permission.PAYMENT" />

    <uses-permission
    android:name="android.permission.READ_PHONE_STATE" />

    <uses-permission
    android:name="android.permission.GET_ACCOUNTS" />

    <uses-permission
    android:name="com.xiaomi.permission.AUTH_SERVICE" />

    <uses-permission
    android:name="android.permission.WAKE_LOCK" />

    <uses-permission
    android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />

    <application
    android:theme="@REF/0x7f0a0007"
    android:label="@REF/0x7f090000"
    android:icon="@REF/0x7f080000"
    android:allowBackup="true"
    android:isGame="true"
    android:appComponentFactory="androidx.core.app.CoreComponentFactory">

    <activity
    android:label="@REF/0x7f090000"
    android:name="com.unity3d.player.UnityPlayerActivity"
    android:launchMode="2"
    android:screenOrientation="0"
    android:configChanges="0x40003fff"
    android:hardwareAccelerated="false">

    <intent-filter>

    <action
    android:name="android.intent.action.MAIN" />

    <category
    android:name="android.intent.category.LAUNCHER" />

    <category
    android:name="android.intent.category.LEANBACK_LAUNCHER" />
    </intent-filter>

    <meta-data
    android:name="unityplayer.UnityActivity"
    android:value="true" />
    </activity>

    <meta-data
    android:name="unity.build-id"
    android:value="45decd68-f082-4a32-ab18-952b2761665a" />

    <meta-data
    android:name="unity.splash-mode"
    android:value="0" />

    <meta-data
    android:name="unity.splash-enable"
    android:value="true" />

    <activity
    android:theme="@REF/0x01030011"
    android:name="com.unity.purchasing.googleplay.PurchaseActivity"
    android:configChanges="0x40000fff" />

    <activity
    android:theme="@REF/0x7f0a0009"
    android:name="com.unity.purchasing.googleplay.VRPurchaseActivity"
    android:configChanges="0x40000fff"
    android:enableVrMode="com.google.vr.vrcore/com.google.vr.vrcore.common.VrCoreListenerService">

    <intent-filter>

    <action
    android:name="com.google.vr.vrcore.ACTION_NONE" />

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

    <activity
    android:theme="@REF/0x01030007"
    android:name="com.unity3d.services.ads.adunit.AdUnitActivity"
    android:configChanges="0x40000fff"
    android:hardwareAccelerated="true" />

    <activity
    android:theme="@REF/0x01030011"
    android:name="com.unity3d.services.ads.adunit.AdUnitTransparentActivity"
    android:configChanges="0x40000fff"
    android:hardwareAccelerated="true" />

    <activity
    android:theme="@REF/0x01030011"
    android:name="com.unity3d.services.ads.adunit.AdUnitTransparentSoftwareActivity"
    android:configChanges="0x40000fff"
    android:hardwareAccelerated="false" />

    <activity
    android:theme="@REF/0x01030007"
    android:name="com.unity3d.services.ads.adunit.AdUnitSoftwareActivity"
    android:configChanges="0x40000fff"
    android:hardwareAccelerated="false" />

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.gamecenter.sdk.ui.MiActivity"
    android:screenOrientation="3"
    android:configChanges="0x480" />

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.gamecenter.sdk.ui.PayListActivity"
    android:exported="false"
    android:configChanges="0x480" />

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.gamecenter.alipay.HyAlipayActivity"
    android:exported="false"
    android:configChanges="0x480" />

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.account.openauth.AuthorizeActivity"
    android:exported="false"
    android:configChanges="0x480" />

    <activity
    android:theme="@REF/0x01030010"
    android:name="com.xiaomi.gamecenter.wxwap.HyWxWappayActivity"
    android:exported="false"
    android:configChanges="0x480" />

    <activity
    android:name="com.alipay.sdk.app.H5PayActivity"
    android:exported="false"
    android:screenOrientation="3"
    android:configChanges="0x4e0"
    android:windowSoftInputMode="0x12" />

    <activity
    android:theme="@REF/0x0103000f"
    android:name="com.google.android.gms.ads.AdActivity"
    android:exported="false"
    android:configChanges="0xfb0" />

    <provider
    android:name="com.google.android.gms.ads.MobileAdsInitProvider"
    android:exported="false"
    android:authorities="com.bittax.teslamodelxdrivingandparking2019.mobileadsinitprovider"
    android:initOrder="100" />

    <meta-data
    android:name="com.google.android.gms.version"
    android:value="@REF/0x7f060000" />

    <receiver
    android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
    android:permission="android.permission.INSTALL_PACKAGES"
    android:enabled="true"
    android:exported="true">

    <intent-filter>

    <action
    android:name="com.android.vending.INSTALL_REFERRER" />
    </intent-filter>
    </receiver>

    <uses-library
    android:name="org.apache.http.legacy"
    android:required="false" />
     
  18. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    No, as you can see, there are still references to AliPay and Xiaomi. You'll want to remove UnityChannel from the project, if you are not using it. Compare to a new/empty project.
     
  19. xsasoftware

    xsasoftware

    Joined:
    Sep 6, 2017
    Posts:
    24
    Thank you. I solved the problem removing unity channel
     
  20. Marek_Bakalarczuk

    Marek_Bakalarczuk

    Joined:
    Dec 28, 2012
    Posts:
    114
    I don't have UnityChannel, but added Xiaomi SDK wich I can't remove now from my game... I'm using Unity 2019.2.1f. There is no remove button...
     
  21. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Make a backup and attempt to manually remove the folders.
     
    Marek_Bakalarczuk likes this.
  22. Marek_Bakalarczuk

    Marek_Bakalarczuk

    Joined:
    Dec 28, 2012
    Posts:
    114
    Did it. It works.
     
  23. schwertfisch

    schwertfisch

    Joined:
    Sep 7, 2010
    Posts:
    126
    I had the same problem in Unity 2019.2.12f1 and I solved it doing what this guy does (fast forward to 1'20'').
     
    LindsayParmenter likes this.
  24. LindsayParmenter

    LindsayParmenter

    Joined:
    Sep 10, 2014
    Posts:
    21
    Can confirm that removing xiaomi, ads and iap from package manager fixed this issue in 2019.3.5 for us.
     
  25. Patrick_Machado_

    Patrick_Machado_

    Joined:
    Feb 1, 2018
    Posts:
    67
    This worked for me! Thanks!
     
  26. retrodrivestudio

    retrodrivestudio

    Joined:
    Jul 21, 2020
    Posts:
    1
    Please actually solve this, we have had this problem for 2 months now....
     
  27. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please describe your issue, this is an older thread. The latest IAP version is 1.23.4
     
  28. Rockstar32

    Rockstar32

    Joined:
    Jun 12, 2019
    Posts:
    1
    I found the solution finally:
    1- first i modified the AndroidManifest in UnityChannel.aar and set all those lunatic libs 'exported' to false
    but it didnt work!
    2- next i removed all activities in AndroidManifest UnityChannel.aar and AndroidManifest in aapt in UnityChannel.aar
    but it didnt work too!
    3- i also excluded all those S***ty libs in Gradle but it didnt work too!!!!!!!

    finally i did this which worked for me:
    if you have used IAP in your game and really need UnityChannel.aar do this:
    i used unity iap version 1.23.4 on Unity 2018.2.21f1

    0- navigate to: yourproject/Plugins/UnityChannel/Android
    1- rename UnityChannel.aar to UnityChannel.zip
    2- Open it with Winrar or something like this
    3- Open AndroidManifest.xml in UnityChannel.aar and remove from <!-- Xiaomi SDK Need --> til <!-- Xiaomi SDK Need End --> also remove all Permissions that has satanic verse 'Xiaomi', do the same thing to AndroidManifest in aapt folder
    4- navigate to libs folder
    5- rename: MIO_SDK_UNITY_1.3.9_10156.jar to MIO_SDK_UNITY_1.3.9_10156.zip
    6- Open MIO_SDK_UNITY_1.3.9_10156.zip with Winrar again
    7- remove 'cn' folder completely
    - go to folder 'com', and remove below folders:
    1- alipay
    2- wali
    3- xiaomi
    8- rename MIO_SDK_UNITY_1.3.9_10156.zip to MIO_SDK_UNITY_1.3.9_10156.jar
    9- rename UnityChannel.zip to UnityChannel.aar

    * note that if winrar asked you to update modified files in zip, click Yes

    then build your project, it builds without error, IAP works, and Google accepts your APK!!!

    Xiaomi ruined my whole weekend!!!
     
  29. Davideogames

    Davideogames

    Joined:
    Sep 5, 2017
    Posts:
    7
    I tried the method of Rockstar32 but it didn't work for me. Modifying the AndroidManifest.xml wasn't enough : I could see in the AAB archive that all the authorizations refering to Xiaomi or AliPay were removed, yet Google would reject the build because somewhere in the AAB there was still AliPay refs... I tried to comment the refs in AndroidManifest.xml, failed, then I completely removed them, failed...

    When I migrated my project from 2018.4 to 2020.3, I had erased all the directories refering to iAP as they advise in the Package manager desc. But for some reason, when Unity migrated the project, it also added a directory :
    Unity\Assets\Plugins\UnityChannel

    So, I tried something else : I uninstalled completely the IAP package, DELETED the directory Plugins\UnityChannel, and reinstalled IAP package 3.0.2 and it DIDN'T reinstall the directory Plugins\UnityChannel... It seems that this directory was useless, unless you use Xiaomi SDK, which was installed for a mysterious reason by Unity during the migration from 2018 to 2020 (I never used or installed Xiomi SDK in my 2018 project).
    So, there was no more need to tweak the AndroidManifest.xml file, as all the directory was not installed and not needed actually.
    I rebuilt the Android version as it is, and finaly it was approved by Google.
    Hope it can help someone else (I wasted a week and 6 submissions to Google... I even had my in-apps banned by Google at one point, but they restored them once the build was approved)
     
    Jmonroe likes this.
  30. GameTrackStudio

    GameTrackStudio

    Joined:
    Mar 31, 2020
    Posts:
    3
    How You Modified Untychannel.aar
     
  31. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You just need to install the recent version of IAP, and remove Assets/Plugins/UnityPurchasing as mentioned in the release notes. Make a project back up first.