cancel
Showing results for 
Search instead for 
Did you mean: 

Linking To An App's Store Page Review Tab

Anonymous
Not applicable
Hi all. So recently the oculus store app page has been re-designed. It used to be an all-in-one type page. If you'd like to send the user to your review page you simply sent the user to your app page since everything was there, including the review. With the new design the Review is on a tab on the left-hand side. Previously to send the user to the app store page you could fire an intent with the app id of the desired app. How can this be done now to send them to the review tab? Is there a new parameter that needs to be sent with the intent to open the review tab?
This is how the app store page was opened previously, assuming Unity. (This still works but does not send you to the new review tab)
    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);
}
2 REPLIES 2

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. Still does not open the review area directly though.


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);
    }

This works for me, thank you !