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;
    }
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

@param context       Application context
@param openInBrowser Should we try to open application page in web browser
if Play Store app not found on device