My device is not rooted and i want it to do without rooting
This is not possible on Android for third party apps. Google Play is able to do it because it is installed to /system/app
instead of /data/app
. If you can convince any OEM or ROM maker to have your app on the system partition, you can utilize the INSTALL_PACKAGES
permission, as that is only granted to system apps.
In any case, this is an Android anti pattern. If you were allowed to arbitrarily install apps without user consent, it would be a serious security hole, and the user would no longer be in charge of the device.