Android Question Update app using file provider

ronell

Well-Known Member
Licensed User
Longtime User
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)

thanks
Ronell
 

DonManfred

Expert
Licensed User
Longtime User
Last edited:
Upvote 0
Top