Exemple #1
0
        private Task <string> StartScanning(IDictionary <string, Java.Lang.Object> configuration)
        {
            currentTask = new TaskCompletionSource <string>();
            PluginBridge.ScanWithConfiguration(Xamarin.Essentials.Platform.CurrentActivity, configuration);

            return(currentTask.Task);
        }
Exemple #2
0
 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);
     }
 }
Exemple #3
0
 public static void EnableLogging(bool shouldLog)
 {
     PluginBridge.EnableLogging(shouldLog);
 }