Android Question [SOLVED] AppUpdating Android 10

techknight

Well-Known Member
Licensed User
Longtime User
I have noticed with Android 10 on my Pixel 3a, every time I hit Yes to do an app update from my server, its crashing with this error:

B4X:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=file:///storage/emulated/0/Android/data/md.bkrm01/files/tmp.apk typ=application/vnd.android.package-archive flg=0x20000 }

I still target a much lower SDK since I sideload all my apps and dont use the play store. But this is the first time I have encountered this and I dont know why.

Thoughts?
 

JohnC

Expert
Licensed User
Longtime User
If I had to take a guess, it looks like you download the update from your server and save the file to your device as "tmp.apk", then your app tries to run the install for that apk.

Do you have "unknown sources" selected?

On Android 10, I think you need to give an app permission to be able to "install" other apps - did you do that?

It looks like it can't access the "tmp.apk" file.

Does that file exist after the download?

Is the path to the file hard-coded? I ask because maybe on different devices, the path will be different.

Or maybe the path needs to be determined at runtime using RP.GetSafeDirDefaultExternal (RP = RunTimePermission)
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
I am using the AppUpdating lib, as indicated in the subject line. I have Zero issues with older android versions. Android 9.0 and below.
 
Last edited:
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
That fixed it. I suppose Android 10+ broke something or removed some compatibility layer that breaks AppUpdating 1.3X no matter the target SDK version.
 
Upvote 0
Top