cancel
Showing results for 
Search instead for 
Did you mean: 

Can you open a link to another app in the Oculus store from within your app?

medicalrealiti1
Explorer
Just wondering is there a method for opening the Oculus store on a specific app download page from within our app? The custom app is built in Unity.
17 REPLIES 17

stevenwireless
Explorer
Linking the apps/universes is super important in VR, let's do this 🙂

codest
Explorer
Hey @imperativity,

I was wondering if there was an update on this? It kind of sounds like it would just be deep linking from an app into the store?

In our case we are wanting to create a demo version of an app that has been out for a little while. It is a paid app which several users have already downloaded, which makes switching to IAPs too complicated. So being able to have a demo which after a level or two is able to just open the store page of the full version would be great.

codest
Explorer
Hey @imperativity

Thanks for the response. I've recently tried Fail Factory, and their demo does implement exactly what I'm looking for, they have a button at the end of the demo that opens the Oculus Store directly to the full game's page. So do you know if this is accomplished with the deep-linking? And if so, what would be the appid and application options to do so?

Anonymous
Not applicable

The App Deeplinking worked fine on Feb 23rd, but now (March 9th) an error has occurred in my app. When the method ‘Application.LaunchOtherApp’ is called, my app crashes and back to the Oculus Home instead of the detail page of the launched app.

Source Code (Unity C#)






    void Update()

    {

        if (OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger))

        {
            var options = new ApplicationOptions();
            Oculus.Platform.Application.LaunchOtherApp({AppID}, options);
        }

    }
  

Error Log

siiktz2dww2e.png

Anonymous
Not applicable
The problem was solved on Marth 12th. My Oculus app version is 3.37 with test channel enabled. The version 3.36
is still in error.

Thanks.

cenek.strichel
Honored Guest
Hello, "Application.LaunchOtherApp" show app in the store, but it start app, if it is already installed. When I want to go to Store for rate I don't need launch it again. How can I do it? How can I redirect players to give me review from the game?

Anonymous
Not applicable
Kicking off an Android Intent for the product description page directly seems to have worked for me. The below is for Unity C#:

    void OpenOculusStorePDPAndroid(string targetAppID)
{
AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
AndroidJavaObject packageManager = currentActivity.Call<AndroidJavaObject>("getPackageManager");
AndroidJavaObject i = packageManager.Call<AndroidJavaObject>("getLaunchIntentForPackage", "com.oculus.home");
i.Call<AndroidJavaObject>("setClassName", "com.oculus.home", "com.oculus.home.HomeActivity");
i.Call<AndroidJavaObject>("setAction", "pdp");
i.Call<AndroidJavaObject>("putExtra", "intent_cmd", targetAppID);

currentActivity.Call("startActivity", i);
}

btelman
Explorer
Looks like a recent update broke this flow (On Quest). This is the updated method that should do the same thing. Given that the old way was not officially supported, this may break later on as well. This has not been tested for Oculus Go.


public static void OpenOculusStorePDPAndroid(string targetAppID)
    {
        AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
        AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
        AndroidJavaObject packageManager = currentActivity.Call<AndroidJavaObject>("getPackageManager");
        AndroidJavaObject i = packageManager.Call<AndroidJavaObject>("getLaunchIntentForPackage", "com.oculus.vrshell");
        i.Call<AndroidJavaObject>("setClassName", "com.oculus.vrshell", "com.oculus.vrshell.MainActivity");
        i.Call<AndroidJavaObject>("setAction", "android.intent.action.VIEW");
        i.Call<AndroidJavaObject>("putExtra", "uri", "/item/" + targetAppID);
        i.Call<AndroidJavaObject>("putExtra", "intent_data", "systemux://store");
        currentActivity.Call("startActivity", i);
    }