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

unity call queryIntentActivitiesAsUser on start up violate privacy policy

Discussion in 'Android' started by wang_jia_fa, Dec 9, 2021.

  1. wang_jia_fa

    wang_jia_fa

    Joined:
    Jul 2, 2020
    Posts:
    2
    unity version:2020.2.7f1
    ndk r19c
    android sdk api level 28


    unity call queryIntentActivitiesAsUser on start,but it is forbidden because of privacy policy.when we simmit apk to xiaomi appstore,it was refused. We find not way to turn it off,we have tried remove vr and xr module in package manager,but take no effect.

    the call stack is:
    2021-12-07 13:37:01 md5=F0BB64ACC7D98E6FC5EE1B85456A226F,pkg=com.xx.xx.mi,action=android.permission.MY_READ_INSTALLED_PACKAGES,
    (Intent { act=android.intent.action.MAIN cat=[com.oculus.intent.category.VR] flg=0x20 pkg=com.xx.xx.mi }),
    callstack:android.app.ApplicationPackageManager.queryIntentActivitiesAsUser:1110;
    android.app.ApplicationPackageManager.queryIntentActivities:1058;
    com.unity3d.player.UnityPlayer.nativeRender:-2;
    com.unity3d.player.UnityPlayer.access$300:0;
    com.unity3d.player.UnityPlayer$e$1.handleMessage:95;
    android.os.Handler.dispatchMessage:102;
    android.os.Looper.loop:193;
    com.unity3d.player.UnityPlayer$e.run:20;
     
    Last edited: Dec 9, 2021
    GiverDP likes this.
  2. wang_jia_fa

    wang_jia_fa

    Joined:
    Jul 2, 2020
    Posts:
    2
    we create an empty 3d project, and remove all build in package ,it still happens. help
     
    GiverDP likes this.
  3. GiverDP

    GiverDP

    Joined:
    Jan 16, 2019
    Posts:
    34
    We have the same issue and been reported by the platform. Can anyone from Unity help with this issue?
     
  4. Spring1004

    Spring1004

    Joined:
    Jun 22, 2022
    Posts:
    1
    We had the same issue. Has anyone solved it ?
     
  5. jj-unity

    jj-unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    69
    First, I want to say that the code in question is not gathering a list of installed apps as stated. It queries for a very specific system activity that Unity uses on some devices, and returns an empty list in all other cases. That said, to avoid false positives as was happening here, we've changed the code in question to no longer use the intent filter querying technique. One other note is that the code that was causing issues with certification has actually been in place for almost 2 years, so it seems as if the certification rules likely changed at some point to be more stringent.

    The refactored code should be landing in these Unity versions once they become available:

    2020.3.37f1
    2021.3.6f1
    2022.1.8f1
    2022.2.0a19
     
    Last edited: Jun 29, 2022
  6. unity-bobo

    unity-bobo

    Joined:
    Aug 17, 2022
    Posts:
    4
    I have tried the version 2020.3.41f1, and it no longer calls `queryIntentActivitiesAsUser`.

    But we have encountered another warning. The unity will call `getObbDirs` when android app starts. It also violate privacy policy in some app store in China.

    In previous version, we just modify the method name in libunity.so in order to skip this method call. But in newest version, it crashes if we do the same thing (It's ok in version 2020.3.28f1).

    How can I solve this problem?
     
    Last edited: Oct 28, 2022
  7. unity-bobo

    unity-bobo

    Joined:
    Aug 17, 2022
    Posts:
    4
    I have create a new thread for this question. https://forum.unity.com/threads/unity-call-getobbdirs-on-start-up-violate-privacy-policy.1354250/