Skip to content Skip to sidebar Skip to footer

Installing Apk From Within Application In Android

I need to downloads and install apk from server to devices and i tried to do this task but it ask for user permission like 'Insall' , 'Cancel' . and if hits 'Install' then it works

Solution 1:

The security model of android won't let you do such things without user interaction. It could be, if the particular phone was rooted, but I think you can't rely on that.

Solution 2:

You can not do this on Android as said because it's a security limitation. It could be possible if you create a system app but based on your question I think that is not what you are after.

However there is a possible workaround: If those apps that you are installing are made by you and it is possible to modify them to act like plugins/libraries(Don't worry you can keep the activities and stuff) then you could load them dynamically when your apk is run, thus essentially giving you new code to be run on the device (Elements of these apps will run under same user ID but you can start them in a new process if you want with android:process=":YourProcessName". Check out this tutorial on how to load external libraries at runtime http://xianminx.blogspot.com/2011/12/dynamic-loading-android-custom-library.html

Post a Comment for "Installing Apk From Within Application In Android"