Dim FileName As String = "hilfe.html"
Dim provider As FileProvider
provider.Initialize
'Copy the file to the shared directory
Wait For (File.CopyAsync(File.DirAssets, "hilfe.html", Starter.Provider.SharedFolder, FileName)) Complete (Success As Boolean)
'
If Success = False Then
Log("Android - Error: Failed to copy the file " & FileName & " to the shared directory.")
Return
Else
Log("Android - File copy " & FileName & " successful: ")
End If
'
' Configure the Intent to open the file
Dim docIntent As Intent
docIntent.Initialize(docIntent.ACTION_VIEW, "")
provider.SetFileUriAsIntentData(docIntent, FileName)
docIntent.SetType("application/html")
docIntent.Flags = Bit.Or(1, 2) ' FLAG_GRANT_READ_URI_PERMISSION
StartActivity(docIntent)