goto Market via Intent - Android Intent

Android examples for Intent:App Market

Description

goto Market via Intent

Demo Code


//package com.java2s;

import android.content.Context;
import android.content.Intent;

import android.net.Uri;

public class Main {
    public static void gotoMarket(Context context, String packagename) {
        String strUrl = "market://details?id=" + packagename;
        Uri uri = Uri.parse(strUrl);//from www.  j  a  v  a2s . c om
        Intent it = new Intent(Intent.ACTION_VIEW, uri);
        context.startActivity(it);
    }
}

Related Tutorials