public void requestPermissions(string[] permissions, requestCompleteCallback cb) { Log.d(LOG_TAG, "requestPermission"); if (!isInitialized()) { Log.e(LOG_TAG, "requestPermissions failed because permissionsManager doesn't initialize"); return; } if (!permissionsManager.Call <bool>("isShow2D")) { mCallback = cb; permissionsManager.Call("requestPermissions", javaArrayFromCS(permissions), new RequestCompleteHandler()); } else { mCallback = cb; using (AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) { using (AndroidJavaObject jo = jc.GetStatic <AndroidJavaObject>("currentActivity")) { jo.Call("setRequestPermissionCallback", new RequestCompleteHandler()); } } permissionsManager.Call("requestPermissions", javaArrayFromCS(permissions), new RequestCompleteHandler()); } }
public void requestPermissions(string[] permissions, requestCompleteCallback cb) { Log.d(LOG_TAG, "requestPermission"); mCallback = cb; Interop.WVR_RequestPermissions(permissions, requestDoneCallback); }
public void requestPermissions(string[] permissions, requestCompleteCallback cb) { Log.d(LOG_TAG, "requestPermission"); if (!isInitialized()) { Log.e(LOG_TAG, "requestPermissions failed because permissionsManager doesn't initialize"); return; } mCallback = cb; permissionsManager.Call("requestPermissions", javaArrayFromCS(permissions), new RequestCompleteHandler()); }