Jump to content
Registration disabled at the moment Read more... ×
Paul12

file Sharing intent on Android

Recommended Posts

I need to share a file using Android built-in handlers - e.g. email/whatsapp etc.
This is done by creating a TJintent and giving it a URI containing the filename
I can get the share activity up, however any attempt to give it the filename results in a security exception
'FileURIExposedException'
Apparently you used to be able to just give it a 'file://' URI, but later version of android blocked this.
Does anyone have a sample program that does this ?
It may need modifying the manifest file ??
I have allready added Intent.addFlags(TJIntent.JavaClass.FLAG_GRANT_READ_URI_PERMISSION); to the intent but that does not help.
The file is in TPath.GetSharedDocumentsPath
Thanks.

Share this post


Link to post
4 hours ago, Paul12 said:

I have allready added Intent.addFlags(TJIntent.JavaClass.FLAG_GRANT_READ_URI_PERMISSION); to the intent but that does not help.

It might help to show the rest of your code

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×