Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android install apk programmatically

Is it possible to install an apk programmatically in the background or does the user have to accept the installation.

My scenario is that I want my employees to all have the same set of applications installed.

Of course they can install applications by them self, but I want them all to have at least some applications installed.

I'm not talking about installing applications from the market.

like image 260
Felix Avatar asked Jan 22 '11 16:01

Felix


1 Answers

solution in this link

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "app.apk")),"application/vnd.android.package-archive");
startActivity(intent);
like image 149
Andrew Chen Avatar answered Sep 29 '22 16:09

Andrew Chen