Open rahulsharmagbpec opened 4 years ago
Where did you store the apk with the update? There are significant changes in Android 10 related scoped storage.
On Wed, Aug 12, 2020 at 1:24 PM rahulsharmagbpec notifications@github.com wrote:
its working in mostly devices what i have, but creating problem in Mi a7 android 10 error E/PackageInstallerSession: Commit of session 819901162 failed: Permission Denied
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sixo/silent-update/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSRRJVDGSUTSYQGQZ3GJR3SAJ3VXANCNFSM4P4RCIIQ .
-- Blog: www.sisik.eu My apps https://play.google.com/store/apps/dev?id=9177152940126947746
i am storing the updated apk inside downloads folder(app have storage permission), i believe scoped storage is from Android 11.
If you target 10 (api 29), try to
add android:requestLegacyExternalStorage="true" to your
On Wed, Aug 12, 2020 at 1:42 PM rahulsharmagbpec notifications@github.com wrote:
i am storing the updated apk inside downloads folder(app have storage permission), i believe scoped storage is from Android 11.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sixo/silent-update/issues/3#issuecomment-672820997, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSRRJXR4UKZMFBHOLTF5D3SAJ5ZVANCNFSM4P4RCIIQ .
-- Blog: www.sisik.eu My apps https://play.google.com/store/apps/dev?id=9177152940126947746
our target sdk is 28,
if i do like below its working, but i wants to update silently
File downloadAPK = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath(), Constants.APK_NAME); Uri apkUri = FileProvider.getUriForFile(this, BuildConfig.APPLICATION_ID + ".provider", downloadAPK); Intent intent = new Intent(Intent.ACTION_INSTALL_PACKAGE); intent.setData(apkUri); intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); startActivity(intent);
Did you make sure that all the details mentioned in the accompanying blogpost are followed?
For example
Additionally, try to store the APK for update in cache folder to see if the issue is with file permission permissions.
On Wed, Aug 12, 2020 at 2:16 PM rahulsharmagbpec notifications@github.com wrote:
our target sdk is 28,
if i do like below its working, but i wants to update silently
Uri apkUri = FileProvider.getUriForFile(this, BuildConfig.APPLICATION_ID + ".provider", downloadAPK); Intent intent = new Intent(Intent.ACTION_INSTALL_PACKAGE); intent.setData(apkUri); intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); startActivity(intent);
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sixo/silent-update/issues/3#issuecomment-672835512, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSRRJR5AWZD36IVDIW2UXDSAKB3HANCNFSM4P4RCIIQ .
-- Blog: www.sisik.eu My apps https://play.google.com/store/apps/dev?id=9177152940126947746
yes i followed the same mentioned in blogpost.
after searching and analysing from 2 days, i came to a conclusion that its MIUI related issue, some of other developers also mentioned the same on stackoverflow and other places.
its working in mostly devices what i have, but creating problem in Mi a7 android 10, app is not getting update error E/PackageInstallerSession: Commit of session 819901162 failed: Permission Denied