Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Context; import android.content.Intent; import android.net.Uri; import android.widget.Toast; public class Main { private static void installApk(Context context, Uri uri) { try { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(uri, "application/vnd.android.package-archive"); context.startActivity(intent); } catch (Exception e) { e.printStackTrace(); Toast.makeText(context, "DanaCast is out-dated, please visit http://danacast.me/", Toast.LENGTH_LONG) .show(); } } }