jump To System Install Apk Activity - Android App

Android examples for App:APK Install and Uninstall

Description

jump To System Install Apk Activity

Demo Code


//package com.java2s;

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

import java.io.File;

public class Main {
    public static void jumpToSystemInstallApkActivity(Context context,
            String apkPath) {//w  w  w . ja  v a2s.  com
        Intent intent = new Intent("android.intent.action.VIEW");
        intent.setDataAndType(Uri.fromFile(new File(apkPath)),
                "application/vnd.android.package-archive");
        context.startActivity(intent);
    }
}

Related Tutorials