Unity is collecting installed app list when start up on Android, how can we disable it?

Recently we encountered an issue:

Unity is collecting installed app list when start up on Android. This will cause privacy issue that before user agree with privacy policy, it’s collecting installed app list data.

How can we disable it?

We also checked stack trace, it’s been called from the UnityPlayer. You can see the screenshot below. How can we prevent Unity collecting installed app list? Any idea?

This java file is not part of default Unity build for Android.
Is it from one of our packages?

The specific code in question is checking to see if the Oculus VR intent handler is present. On non-Oculus devices, it actually returns an empty list since no other application should be exposing this specific intent. Looking into it, it looks like some stores are implementing security policies around this call. And in Android 11+, the scope of returned information is limited even further: Package visibility in Android 11. On Android 10 and earlier, apps could… | by Yacine Rezgui | Android Developers | Medium

I’m going to be looking into whether there is a better way to handle this. It would be helpful to know what specific situations are causing this to be an issue. Android version, API versions, specific store fronts?

Does adding the intent queries entry to the manifest as mentioned in the above Android 11 blog post resolve the issue for you? That would be helpful to know as we investigate this issue.

Thanks!

I just tried with an empty Unity project and it still reports that we have the issue. This time I didn’t include Oculus VR. And I’ll show you the stack trace they had. It’s from the store review check. The device is Android 9, Mi Note 3

8133887–1055315–PrivacyPolicyCheck.txt (5.69 KB)

We are making games in China, since the privacy policy updated. We are not allowed to collect any information before user agree with the privacy policy. But Unity is collecting this data when app start, so we got rejection from the Chinese platforms. Is there any way we can disable or prevent Unity from collecting data like this?

Which queries you mean, we already added the queries we’ll interact with. But it still have the issue there.

Hello is there any update about issue?

I also tried to remove the build-in packages for VR and XR, but it still doesn’t help.

8136902--1056032--upload_2022-5-18_17-57-30.jpg

Can you confirm using Charles Proxy that this information is being sent over the wire?

What was the specific rejection reason?

It doesn’t relate to send anything. The rejection reason I already post in the first commit with the screenshot. Because when Unity starts on Android, it is calling queryIntenActivitiesAsUser through the nativeRender from Unity Engine code. This is not allowed to be called on start up in China. Because user didn’t agree with privacy policy yet.

And the Charles Proxy will not show anything relate to this. You can also see the stack trace I posted above with the txt file.

I understand that but if you can share the rejection reason/description it will be of great help.
From Android 11 it’s more explicit for the apps to specify what it queries for further security. And it’s quite obvious to have this kind of call for checking any pre conditions.

So, share the complete rejection reason so that others can have more details to look into.

This txt file I referenced here(also above replies) is the reason, you can check the stack trace, Unity is calling queryIntentActivitiesAsUser method which is not allowed when start up through the nativeRender method.

8133887–1055315–PrivacyPolicyCheck.txt (5.69 KB)

我在腾讯应用宝平台遇上与你同样的问题,持续关注解决方案!

I also encountered the same problem, hope the Unity Technologies can help solve.

8139746--1056584--截屏2022-05-19 04.56.30.jpg

Can you share the rejection reason text from the store?

1. unity 3d

读取设备应用安装列表

{
"stackTrace": [{
"className": "libcore.util.Janus",
"level": 0,
"fileName": "Janus.java",
"methodName": "getData",
"lineNumber": 742
},
{
"className": "android.app.ApplicationPackageManager",
"level": 0,
"fileName": "ApplicationPackageManager.java",
"methodName": "queryIntentActivitiesAsUser",
"lineNumber": 1007
},
{
"className": "android.app.ApplicationPackageManager",
"level": 0,
"fileName": "ApplicationPackageManager.java",
"methodName": "queryIntentActivities",
"lineNumber": 991
},
{
"className": "com.unity3d.player.UnityPlayer",
"level": 0,
"methodName": "nativeRender",
"lineNumber": -2
},
{
"className": "com.unity3d.player.UnityPlayer",
"level": 0,
"methodName": "access$300",
"lineNumber": 0
},
{
"className": "com.unity3d.player.UnityPlayer$e$1",
"level": 0,
"methodName": "handleMessage",
"lineNumber": 95
},
{
"className": "android.os.Handler",
"level": 0,
"fileName": "Handler.java",
"methodName": "dispatchMessage",
"lineNumber": 102
},
{
"className": "android.os.Looper",
"level": 0,
"fileName": "Looper.java",
"methodName": "loop",
"lineNumber": 193
},
{
"className": "com.unity3d.player.UnityPlayer$e",
"level": 0,
"methodName": "run",
"lineNumber": 20
},
{
"className": "java.lang.Thread",
"fileName": "Thread.java",
"methodName": "start",
"parent": 1,
"lineNumber": 729
},
{
"className": "com.unity3d.player.UnityPlayer",
"methodName": "<init>",
"parent": 2,
"lineNumber": 341
},
{
"className": "com.unity3d.player.UnityPlayerActivity",
"fileName": "UnityPlayerActivity.java",
"methodName": "onCreate",
"parent": 3,
"lineNumber": 41
},
{
"className": "com.drpanda.DPUnityPlayerActivity",
"fileName": "DPUnityPlayerActivity.java",
"methodName": "onCreate",
"parent": 4,
"lineNumber": 21
},
{
"className": "android.app.Activity",
"fileName": "Activity.java",
"methodName": "performCreate",
"parent": 5,
"lineNumber": 7287
},
{
"className": "android.app.Activity",
"fileName": "Activity.java",
"methodName": "performCreate",
"parent": 6,
"lineNumber": 7278
},
{
"className": "android.app.Instrumentation",
"fileName": "Instrumentation.java",
"methodName": "callActivityOnCreate",
"parent": 7,
"lineNumber": 1272
},
{
"className": "android.app.ActivityThread",
"fileName": "ActivityThread.java",
"methodName": "performLaunchActivity",
"parent": 8,
"lineNumber": 2932
},
{
"className": "android.app.ActivityThread",
"fileName": "ActivityThread.java",
"methodName": "handleLaunchActivity",
"parent": 9,
"lineNumber": 3087
},
{
"className": "android.app.servertransaction.LaunchActivityItem",
"fileName": "LaunchActivityItem.java",
"methodName": "execute",
"parent": 10,
"lineNumber": 78
},
{
"className": "android.app.servertransaction.TransactionExecutor",
"fileName": "TransactionExecutor.java",
"methodName": "executeCallbacks",
"parent": 11,
"lineNumber": 108
},
{
"className": "android.app.servertransaction.TransactionExecutor",
"fileName": "TransactionExecutor.java",
"methodName": "execute",
"parent": 12,
"lineNumber": 68
},
{
"className": "android.app.ActivityThread$H",
"fileName": "ActivityThread.java",
"methodName": "handleMessage",
"parent": 13,
"lineNumber": 1817
},
{
"className": "android.os.Handler",
"fileName": "Handler.java",
"methodName": "dispatchMessage",
"parent": 14,
"lineNumber": 106
},
{
"className": "android.os.Looper",
"fileName": "Looper.java",
"methodName": "loop",
"parent": 15,
"lineNumber": 193
},
{
"className": "android.app.ActivityThread",
"fileName": "ActivityThread.java",
"methodName": "main",
"parent": 16,
"lineNumber": 6719
},
{
"className": "java.lang.reflect.Method",
"fileName": "Method.java",
"methodName": "invoke",
"parent": 17,
"lineNumber": -2
},
{
"className": "com.android.internal.os.RuntimeInit$MethodAndArgsCaller",
"fileName": "RuntimeInit.java",
"methodName": "run",
"parent": 18,
"lineNumber": 506
},
{
"className": "com.android.internal.os.ZygoteInit",
"fileName": "ZygoteInit.java",
"methodName": "main",
"parent": 19,
"lineNumber": 863
}],
"permisson_group": "",
"permisson": "",
"params": {
"intent": "Intent { act=android.intent.action.MAIN cat=[com.oculus.intent.category.VR] flg=0x20 pkg=*** }",
"flags": 32,
"userId": 0
},
"result": {
"List<ResolveInfo>": "[ ]"
},
"permisson_level": ""
}

This is from the government not the store

I believe you forgot to share the rejection text.