0 votes
by (360 points)
edited by

Whenever a build is out of date a pop-up appears in our app which informs the user. I like to be able to start the update process or redirect to the app store page if a certain button is pressed.

How can this be achieved?

For the Android phone version I'm using "market://details?id=[bundle id]", but it doesn't work on a Pico

1 Answer

0 votes
by (3.8k points)
selected by
Best answer

Whats your sdk vision? and my understanding is that you need to open the pico store in your app, like click a button, am i right?

by (360 points)
edited by

That is correct

Our app currently uses "PicoVR Unity SDK(Deprecated)", but I'm in the process of transitioning to "Unity XR Platform SDK (Legacy)" and "Unity XR SDK". I'm not sure when I'll be done with implementing them so I like to know how to do it for all 3 SDKs

by (360 points)

Does this information suffice to be able to answer the question?

by (3.8k points)

you need to know the app id of pico store to open the app page in stroe, and you can ask the id of pico store by sending email to picodevanswers@bytedance.com. Here is the code.
public void LaunchStoreDetail()
AndroidJavaObject context = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic("currentActivity");
AndroidJavaObject intent = new AndroidJavaObject("android.content.Intent", "pvr.intent.action.ADAPTER");
AndroidJavaObject intentEx = new AndroidJavaObject("android.content.Intent", "picovr.intent.action.storedetail");
intentEx.Call("putExtra", "intent
extraappid", "(your app id in store)");
intentEx.Call("putExtra", "intentextratype", 2);
intent.Call("putExtra", "intent", intentEx);
intent.Call("setPackage", "com.pvr.adapter");
context.Call("startService", intent);