getLostData method
Retrieve the lost PickedFile
when selectImage
or selectVideo
failed because the MainActivity is destroyed. (Android only)
Image or video can be lost if the MainActivity is destroyed. And there is no guarantee that the MainActivity is always alive. Call this method to retrieve the lost data and process the data according to your APP's business logic.
Returns a LostData
object if successfully retrieved the lost data. The LostData
object can represent either a
successful image/video selection, or a failure.
Calling this on a non-Android platform will throw UnimplementedError exception.
See also:
LostData
, for what's included in the response.- Android Activity Lifecycle, for more information on MainActivity destruction.
Implementation
Future<LostData> getLostData() {
return platform.retrieveLostData();
}