Appstore install Pebble for 2.0 use - Android Intent

Android examples for Intent:App Market

Description

Appstore install Pebble for 2.0 use

Demo Code


//package com.book2s;

import android.content.Context;

import android.content.Intent;
import android.net.Uri;

public class Main {
    /**//from  w ww. j  a  v a  2s .co m
     * Appstore install for 2.0 use
     * @param context
     * @param appStoreUID
     */
    public static void appStoreInstall(Context context, String appStoreUID) {
        Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setData(Uri.parse("pebble://appstore/" + appStoreUID));
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);
    }
}

Related Tutorials