Android Launch PlayStore
Launch PlayStore:
To launch the Google Play Store from your Android application, you can use an explicit Intent.
Example:
// AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
// activity_launch_play_store_example.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".LaunchPlayStoreExample"
android:padding="16dp"
android:gravity="center"
android:background="@color/colorOrange"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Click on button to Launch Play Store"
android:textColor="@color/colorWhite"
android:textSize="30sp"
android:gravity="center"/>
<Button
android:id="@+id/click"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Launch Play Store"
android:textColor="@color/colorWhite"
android:textSize="16dp"
android:layout_marginTop="20dp"
android:background="@color/colorPrimaryDark"
/>
</LinearLayout>
Output