You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to synchronize the deletion of files in system album with my app, but on Android, the deletion event does not contain the ID of the deleted file.
The methodCall looks like the code below. {mediaType: 1, type: delete, uri: content://media/, platform: android}
the MethodCall when photo inserted {mediaType: 1, id: 20492, type: insert, uri: content://media/external/images/media/20492, platform: android, galleryId: -1739773001}
My question is , How to get the id of deletion of photos?
Thank you very much
My code
void_onChangeNotified(MethodCall call) {
if (defaultTargetPlatform ==TargetPlatform.iOS) {
final delete =List<dynamic>.from(call.arguments['delete']);
if (delete.isNotEmpty ==true) {
_onPhotosDeleted(delete.map((e) => e['id'].toString()).toList());
}
final create =List<dynamic>.from(call.arguments['create']);
if (create.isNotEmpty ==true) {
_onPhotosCreated(create.map((e) => e['id'].toString()).toList());
}
} elseif (defaultTargetPlatform ==TargetPlatform.android) {
if (call.arguments['type'] =='delete') {
// no id returned ???
}
if (call.arguments['type'] =='insert') {
final assetId = call.arguments['id'].toString();
_onPhotosCreated([assetId]);
}
} else {
throwUnsupportedError('Unsupported platform');
}
}
Try do it
No response
The text was updated successfully, but these errors were encountered:
Platforms
Android
Description
Hello
I need to synchronize the deletion of files in system album with my app, but on Android, the deletion event does not contain the ID of the deleted file.
The methodCall looks like the code below.
{mediaType: 1, type: delete, uri: content://media/, platform: android}
the MethodCall when photo inserted
{mediaType: 1, id: 20492, type: insert, uri: content://media/external/images/media/20492, platform: android, galleryId: -1739773001}
My question is , How to get the id of deletion of photos?
Thank you very much
My code
Try do it
No response
The text was updated successfully, but these errors were encountered: