open Application On Google Play - Android App

Android examples for App:App Market

Description

open Application On Google Play

Demo Code


//package com.java2s;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;

public class Main {
    public static void openApplicationOnGooglePlay(Context context,
            String packageName) {
        try {//from   www  . j ava2  s  .  co m
            Intent intent = new Intent(Intent.ACTION_VIEW);
            intent.setData(Uri.parse("market://details?id=" + packageName));
            context.startActivity(intent);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}

Related Tutorials