How to Install / Uninstall .apk file application programmatically on Android?

Just share...Share on FacebookShare on Google+Tweet about this on TwitterPin on PinterestShare on RedditShare on StumbleUponEmail this to someone

Are you want to install / Uninstall .apk file application programmatically on Android?

How to Install / Uninstall .apk file application programmatically on Android

Install / Uninstall .apk file application programmatically on Android steps

For Installation:

To Installation .apk application programmatically on Android, use following code

  Intent intent = new Intent(Intent.ACTION_VIEW);
         intent.setDataAndType(Uri.fromFile(new File
                 (Environment.getExternalStorageDirectory() + “/karsho.apk”)),
                 “application/vnd.android.package-archive”);
         startActivity(intent);

For Uninstallation

To Uninstallation .apk application programmatically on Android, use following code

  Intent intent = new Intent(Intent.ACTION_DELETE);
         intent.setData(Uri.parse(“package:com.android.karsho”));
         startActivity(intent);

Just share...Share on FacebookShare on Google+Tweet about this on TwitterPin on PinterestShare on RedditShare on StumbleUponEmail this to someone
The following two tabs change content below.
I am Karthik, software engineer by profession. I'm giving some steps to installing, re-installing, updating, removing and any other related queries about software’s, operating systems, plug-ins and so on. You can find and follow me, from Social Media or here. Google+

Leave a Reply

Your email address will not be published. Required fields are marked *

Please Fill this Sum * Time limit is exhausted. Please reload CAPTCHA.