我正在尝试在用户点击通知时打开外部存储目录,但没有任何反应。我就是这样做的:
Intent intent = new Intent(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath);
const int pendingIntentId = 0;
PendingIntent pendingIntent = PendingIntent.GetActivity(this, pendingIntentId, intent, PendingIntentFlags.CancelCurrent);
Notification.Builder builder = new Notification.Builder(this);
builder.SetContentTitle("...");
builder.SetContentText(notificationText);
builder.SetSmallIcon(Resource.Drawable.HgssLogoNotification);
builder.SetContentIntent(pendingIntent);
Notification.BigTextStyle textStyle = new Notification.BigTextStyle();
textStyle.BigText(notificationText);
textStyle.SetSummaryText("...");
builder.SetStyle(textStyle);
Notification notification = builder.Build();
NotificationManager notificationManager = (NotificationManager)GetSystemService(Context.NotificationService);
const int notificationID = 0;
notificationManager.Notify(notificationID,notification);
我做错了吗?
感谢任何帮助。