public static Intent openPlayStore ( Context context , boolean openInBrowser ) { String appPackageName = context . getPackageName ( ) ; Intent marketIntent = new Intent ( Intent . ACTION_VIEW , Uri . parse ( "market://details?id=" + appPackageName ) ) ; if ( isIntentAvailable ( context , marketIntent ) ) { return marketIntent ; } if ( openInBrowser ) { return openLink ( "https://play.google.com/store/apps/details?id=" + appPackageName ) ; } return marketIntent ; }
Open app page at Google Play