private Task <string> StartScanning(IDictionary <string, Java.Lang.Object> configuration) { currentTask = new TaskCompletionSource <string>(); PluginBridge.ScanWithConfiguration(Xamarin.Essentials.Platform.CurrentActivity, configuration); return(currentTask.Task); }
protected override void OnActivityResult(Int32 requestCode, Result resultCode, Intent data) { try { PromiseResult result = PluginBridge.GetPromiseResultFromActivityResult(this, requestCode, (int)resultCode, data); if (result.IsError) { currentTask?.TrySetException(new Exception(result.ErrorMessage)); } else { var pdfUrl = result.Result["pdfUrl"].ToString(); currentTask?.TrySetResult(pdfUrl); } } catch (Exception e) { currentTask?.TrySetException(e); } }
public static void EnableLogging(bool shouldLog) { PluginBridge.EnableLogging(shouldLog); }