Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android install apk without asking user permission

I am building a App for kiosk mode purposes. The device is not rooted. The app is the device administrator (android.permission.BIND_DEVICE_ADMIN) . I want the app to be able to download and direct install other apks onto the tablet without asking for permission.

At moment I am using Android DownloadManager to download the apk: then:

Intent intent = new Intent(Intent.ACTION_VIEW);
                                intent.setDataAndType(Uri.fromFile(new File(filePath)), "application/vnd.android.package-archive");
                                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // without this flag android returned a intent error!
                                DownloadManagerActivity.this.startActivity(intent);

To install the apk. But this bring a popup for confirmation. is theer another away to direct install the apk after it has been downloaded? Thanks

update:

I came across this post: https://paulononaka.wordpress.com/2011/07/02/how-to-install-a-application-in-background-on-android/

But it does not work and it very limited.

like image 652
Thiago Avatar asked Sep 30 '15 04:09

Thiago


People also ask

Can I install APK without signing?

In Android, an apk should be signed with its developer's certificate before installed, while those without valid signatures cannot be installed.

Can you install APKs without developer mode?

Thankfully, it's now possible to install APKs on your Chromebook without Developer mode. For this, you'll need to set up ADB functionality on your Chromebook (ADB = Android Debug Bridge). Once you have ADB on your Chromebook, you can install any APK on your Chromebook.


1 Answers

There is no way to install the APK without the popup confirmation. This is a by-design security feature. Some phone vendors like Samsung offer options like SAFE or KNOX to allow that installing without a prompt, but it requires additional permissions and these technologies are not available across all android devices.

like image 68
jyanks Avatar answered Sep 27 '22 19:09

jyanks