Android install apk programmatically
Solution 1
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);
Solution 2
Let me get this straight, you want to remotely put an app on a large number of phones and have it install itself? I don't think that's possible. If it were, think of the virus possibilities!
I think you can email the APK to the phones and have the user use something like Apps-Installer to install it, but I've heard of problems with that method. For your situation though, I would recommend trying it.
The only other alternative I can see beside putting them in the market would be to manually collect all the phones you want it on and manually put it on each one with the ADB, but that would be a huge pain.
Related videos on Youtube
Comments
-
Felix almost 2 years
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.
-
Felix over 13 yearsWhat? Isn't this just for the debugger?
-
John over 13 yearsI think Felix is try to get the APK to install automatically.
-
sandalone over 13 yearsOr you can hire someone to make installer app for your employees. It would automatically install predefined apps. However, users would get infos which apps are going to be installed.
-
Håvard Geithus almost 12 yearsAndroid allows for both installing and uninstalling APKs using intents: stackoverflow.com/questions/6813322/…
-
Swap-IOS-Android about 11 yearscan you give me brief idea How can i update my app without putting it on android market?...i want to update automatically when update is avalible on my site..so app download it and update or reinstall itself..