Please provide the following:
- SDK Version: 40.0
- Platforms(Android/iOS/web/all):Android
- expo-notifications
In my app the user are able to export all the data as a json file.
And this file get created in Downloads/appName/file.backup
This is my code for creating the file
var album = "Download/NovelManager";
let fileUri = FileSystem.documentDirectory + 'NovelManager.backup';
await FileSystem.writeAsStringAsync(fileUri, JSON.stringify(result), { encoding: FileSystem.EncodingType.UTF8 });
const asset = await MediaLibrary.createAssetAsync(fileUri);
var al = await MediaLibrary.createAlbumAsync(album, asset, true); // Copy First to download folder to get the Download Folder path
await MediaLibrary.deleteAlbumsAsync(al, true); // Remove all, remove all files in this folder eg Download/NovelManager
await MediaLibrary.createAlbumAsync(album, asset, false);// Then Move the new create file to the empty Download/NovelManager
Now this is not the problem, After I create a file I use expo-notifications
to create a notification.
await globalContext.notify({
content: {
title: 'NovelManager',
body: globalContext.currentLanguage.downloadCompleted,
},
trigger: { seconds: 1 },
});
Now I am able to know when the user click on the notification but what I do not know is how am I able to open the Download
Folder when the user click on the notification.
This is on android
only, using react-native
any help will be really greet as I am really lost and I am not finding any information on this issue on google or expo sites.