Sub CreateFileProviderUri (Dir As String, FileName As String) As Object
Dim FileProvider As JavaObject
Dim context As JavaObject
context.InitializeContext
FileProvider.InitializeStatic("android.support.v4.content.FileProvider")
Dim f As JavaObject
f.InitializeNewInstance("java.io.File", Array(Dir, FileName))
Return FileProvider.RunMethod("getUriForFile", Array(context, Application.PackageName & ".provider", f))
End Sub
The logged error is:
"Caused by: java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/*PACKAGENAME*/files/shared/AppTest.apk"
(Note that i changed the packagename, but that one is correct)
Could it be that i have two "/data"?
The app has all the permissions and i'm testing it on an Android 7.1.1 device