Developing an Android pre-load type application which opens up market details page
-
30-04-2021 - |
Question
I'm developing a pre-load-type application... the desktop icon needs to take you directly to the market details page where you can download the full app. i can't seem to figure out how to go straight to the market, bypassing any kind of actual application screen.. the application screen loads for a split second, displaying the value from the android:label tag from the manifest... then the market details loads.
Solution
Step #1: Add android:theme="@android:style/Theme.NoDisplay"
to the <activity>
element for your launcher activity.
Step #2: Call finish()
just after calling startActivity()
to bring up the Market activity.
OTHER TIPS
try this:
Uri marketUri = Uri.parse("market://details?id=" + packageName);
Intent marketIntent = new Intent(Intent.ACTION_VIEW, marketUri);
startActivity(marketIntent);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow