【发布时间】:2016-10-03 10:33:03
【问题描述】:
在我的 Xamarin 表单中,我使用 Web 客户端在 Android 应用程序中下载了一个文件。它保存在本地文件夹中。 这将提到使用android通知如下代码
webClient.DownloadFile(filePath, localPath);
Notification.Builder builder = new Notification.Builder(Android.App.Application.Context)
.SetContentTitle("Download Successfully")
.SetContentText("Click here to open")
.SetSmallIcon(Resource.Drawable.abc_btn_colored_material);
Notification notification = builder.Build();
NotificationManager notificationManager =
Android.App.Application.Context.GetSystemService(Context.NotificationService) as NotificationManager;
const int notificationId = 0;
notificationManager.Notify(notificationId, notification);
我想从通知中打开下载的文件。我怎么能那样做。我是 Xamarin 的新手。请提出解决方案。
【问题讨论】:
标签: c# xamarin xamarin.ios xamarin.android xamarin.forms