i have this code to install apk but after i change the target sdk = 26 in manifest this code fails( FileUriExposedException error)... is there a sample code using file provider to access apk file in external storage and install?
B4X:
Dim iIntent As Intent
iIntent.Initialize(iIntent.ACTION_VIEW, "file://" & File.Combine(File.DirRootExternal, "myapp.apk"))
iIntent.SetType("application/vnd.android.package-archive")
StartActivity(iIntent)
- Search the forum. I remember one user published an example of doing this.
- Also browse the AppUpdating lib thread. You may find a link there
- Read and understand the FileProvider examples/tutorials.
Once you understand how it works then it should be easy to adapt your code to use fileProvider.