- Home /
What do I pass into Application.OpenURL to open up the Android market from an app?
I'm using this:
Application.OpenURL("http://market.android.com/details?id=?" + m_GameBundleID);
Where m_GameBundleID is "com.MyCompanyName.MyGameName".
But I get an error. Is this correct?
Answer by Crazydadz · Apr 06, 2012 at 04:15 AM
Hi there,
Check below "Linking to Your Apps on Google Play" on [http://developer.android.com/guide/publishing/publishing.html][1]
You can also check on unity forum [http://forum.unity3d.com/threads/63931-How-to-open-an-market-Intent][2]
You can link directly to your app details page this way:
Application.OpenURL ("market://details?id=com.example.android"); //Replace 'com.example.android' by your <package name>
You can also do a search on market this way:
Application.OpenURL ("market://search?q=Unity Remote"); //Replace 'Unity Remote' by <Your Publisher name>
You can use these examples to test your code if you didn't publish your app yet it works with my Nexus S.
Hope it helps! [1]: http://developer.android.com/guide/publishing/publishing.html [2]: http://forum.unity3d.com/threads/63931-How-to-open-an-market-Intent
Answer by AnnieN · Aug 09, 2019 at 01:56 AM
A little fix updated to the issue:
1/ Link user directly to your app details page (to rate, leave comment, etc):
Application.OpenURL("market://details?id=com.<your company name>.<your app name>");
2/ Link user to list of your games on play store (do a search on market, for "More games" button):
Application.OpenURL ("market://search?q=pub:<your company name>");
Hope it be helpful.