Example #1
0
 private void OnFileDownloaded()
 {
     RunOnUiThread(() => { openFileButton.Enabled = true; };
     Toast.MakeText(this, "File downloaded", ToastLength.Short).Show();
     // Notify the user about the completed "download"
     var downloadManager = DownloadManager.FromContext(Application.Context);
     var filePath = downloadViewModel.GetDownloadedFilePath();
     downloadManager.AddCompletedDownload(filePath, "myDescription", true, 
         GetFileType(filePath), filePath, File.ReadAllBytes(filePath).Length, true);
 }