I trying to get whatsapp chat txt file. As i saw on Android documentation:
private void handleSentMultipleAttached(Intent intent) {
ArrayList<Uri> attachedFilesUris = intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM);
if (attachedFilesUris != null) {
for (Uri uri : attachedFilesUris) {
File f = new File(uri.getPath());
}
}
}
The uri is:
content://com.whatsapp.fileprovider/external/.Shared/WhatsApp%20Chat%20with.txt
But i can't use the f file because file is not exist in that path.
I'v already open permission in the manifest:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
What should i do so i can use the file?