Forum Discussion
AlanYeats
2 years agoHonored Guest
Open Store Page from Unity app
I've trying to add a deep link to the store page to another app (from a demo version of the game to the main version store page). I have something working but it seems to only work every second time and I'm totally lost to why.
This is the code I'm using to trigger the opening of store
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/" + APP_ID);
i.Call<AndroidJavaObject>("putExtra", "intent_data", "systemux://store");
currentActivity.Call("startActivity", i);
Comparing logs between when it does work and when it doesn I really can't see anything either.
Has anyone got any thoughts on this or another way around this?
1 Reply
- domkonecnyExplorer
Hey, working solution here: https://communityforums.atmeta.com/t5/Quest-Development/Linking-To-An-App-s-Store-Page-Review-Tab/m-p/841949
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 month ago