Jump to content
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×