Android Question Problems with FileProvider and intent.

Lowegaterecords

Member
Licensed User
Hi I'm having problems with the FileProvider, I can not open pdf files with an external app. I use an intent to view other apps, but no apps appear in the selection panel, a message appears saying (that the app for this intent has either been blocked or not installed) but outside of my app in the device are installed. I do not see the problem can someone help me?

B4X:
Sub BtApriCon_Click
   
    File.Copy(File.DirDefaultExternal,FileName, Starter.Provider.SharedFolder,FileName)
    Dim ia As Intent
  
    ia.Initialize (ia.ACTION_VIEW,"" )
    Starter.Provider.SetFileUriAsIntentData(ia,LoadLink)
    ia.SetType ( "application/pdf" )
    ia.WrapAsIntentChooser ( "Select" )
    ia.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION
    StartActivity (ia)
    ToastMessageShow("Select App",True)
  

End Sub
 
Top