- Home /
Question by
varumora_everywoah · Aug 14, 2017 at 01:30 PM ·
androidvroculusbrowser
How to open a url in VR Browser from a Gear VR app?
Hi, I'm trying to open the VR Browser in a Gear VR app but nothig seems to work. I've tested with:
Application.openURL(myURL);
and
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
activity = jc.GetStatic<AndroidJavaObject>("currentActivity");
AndroidJavaClass intent_class = new AndroidJavaClass("android.content.Intent");
AndroidJavaClass uri_class = new AndroidJavaClass("android.net.Uri");
uri = uri_class.CallStatic<AndroidJavaObject> ("parse", myUrl);
intent = new AndroidJavaObject("android.content.Intent", intent_class.GetStatic<string>("ACTION_VIEW"));
intent.Call ("setData", uri);
activity.Call ("startActivity", intent);
Thanks :)
Comment
Answer by jimprucey · Sep 18, 2017 at 04:30 PM
Did you get this working? I'm interested in this also.