Closed semmet95 closed 6 years ago
Finally got it to work. What I did was copy the .pt file into the app's cache directory and get the uri using FileProvider. I used the code provided here http://stephendnicholas.com/posts/android-attaching-files-from-internal-cache-to-gmail Modified it a bit as it was intended specifically for using gmail to share file and modified the paths.xml file
`<?xml version="1.0" encoding="utf-8"?>
Sorry for posting this here, this is not an issue with the paper library but I'd really appreciate it if I someone helps me out here.
I am using the Paper library to store the object of a Java class. I'm trying to share the .pt file created using the path returned by the getPath function. I'm using an email client to share the file. Here is my code
AndroidManifest.xml
<provider android:name="android.support.v4.content.FileProvider" android:authorities="amit.apps.aurora_raw3.provider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/paths" /> </provider>
paths.xml `<?xml version="1.0" encoding="utf-8"?>