Jump to content

fbdbdfb

Verified Members
  • Posts

    2
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Can't do screenshot now. It's just a window on black background, that asks permission to install apk. I can't click yes/no cause controllers don't work in this mode. I had the same problem but i solved it by using Permission Manager. In this case i need FLAG_GRANT_READ_URI_PERMISSION, so i can't use it. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" xmlns:tools="http://schemas.android.com/tools"> <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@style/Theme.WaveVR.Black" android:requestLegacyExternalStorage="true" tools:replace="android:theme"> <!--You can use your theme here.--> <activity android:name="com.htc.vr.unity.WVRUnityVRActivity" android:label="@string/app_name" android:configChanges="density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:enableVrMode="@string/wvr_vr_mode_component" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="com.htc.intent.category.VRAPP" /> </intent-filter> <meta-data android:name="unityplayer.UnityActivity" android:value="true" /> <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="true" /> </activity> <provider android:name="androidx.core.content.FileProvider" android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" /> </provider> </application> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.REQUEST_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" /> <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" /> <uses-permission android:name="vive.wave.vr.oem.data.OEMDataRead" /> <uses-permission android:name="vive.wave.vr.oem.data.OEMDataWrite" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> </manifest>
  2. Apk downloads normally, but when installing starts, 2d system window pops up so i can't do anything. How it can be fixed? Help please This is installing script. AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity"); AndroidJavaObject unityContext = currentActivity.Call<AndroidJavaObject>("getApplicationContext"); string packageName = unityContext.Call<string>("getPackageName"); string authority = packageName + ".provider"; AndroidJavaClass intentObj = new AndroidJavaClass("android.content.Intent"); string ACTION_VIEW = intentObj.GetStatic<string>("ACTION_VIEW"); AndroidJavaObject intent = new AndroidJavaObject("android.content.Intent", ACTION_VIEW); int FLAG_ACTIVITY_NEW_TASK = intentObj.GetStatic<int>("FLAG_ACTIVITY_NEW_TASK"); int FLAG_GRANT_READ_URI_PERMISSION = intentObj.GetStatic<int>("FLAG_GRANT_READ_URI_PERMISSION"); AndroidJavaObject fileObj = new AndroidJavaObject("java.io.File", apkPath); AndroidJavaClass fileProvider = new AndroidJavaClass("androidx.core.content.FileProvider"); AndroidJavaObject uri = fileProvider.CallStatic<AndroidJavaObject>("getUriForFile", unityContext, authority, fileObj); intent.Call<AndroidJavaObject>("setDataAndType", uri, "application/vnd.android.package-archive"); intent.Call<AndroidJavaObject>("addFlags", FLAG_ACTIVITY_NEW_TASK); intent.Call<AndroidJavaObject>("addFlags", FLAG_GRANT_READ_URI_PERMISSION); currentActivity.Call("startActivity", intent);
×
×
  • Create New...