+1 vote
by (300 points)
recategorized by

Hi all, hope someone can help.

I'm currently testing on Neo 3 Pro, PUI V4.3.23, and developing on Unity.

My app requires it to re-install itself and install other app. However, when I invoke the installation, the Android Permission UI shows up in 2D mode and right in front of the eye. I couldn't interact with it or point my controller at it.

Would there be any solution or work around for this so that the Permission UI appears in 3D mode so I can interact with it?

The permission prompt appears in 2D mode

1 Answer

+1 vote
by (30.5k points)
selected by
Best answer

You can try to use the following code.

fun installApp(path: String?) {
    val version = Build.VERSION.SDK_INT
    val file = File(path)
    val apkUri: Uri = FileProvider.getUriForFile(this, "com.pvr.filemanager.fileprovider", file)
    val extraIntent = Intent(Intent.ACTION_VIEW)
    extraIntent.setDataAndType(apkUri, "application/vnd.android.package-archive")
    if (version < Build.VERSION_CODES.P) {
    } else {
        val intent = Intent("pvr.intent.action.VRSHELL")
        intent.putExtra("intent", extraIntent)

Note: This is the Android code and needs to be converted before it can be used in unity.

by (300 points)

Hi, thank you. This solved my problem.
Much appreciated!