Creating a platform channel on Android for File upload using AWS SDK. Now I want to wait for the upload to complete in the background and return the status of the result.
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL).setMethodCallHandler { call, result ->
if (call.method == "uploadToAWS") {
new DoUpload().execute();
// how to await here ?
result.success(true);
} else {
result.notImplemented()
}
}