I am downloading an image and saving it to a folder, and pushing a Notification, I want when user click on Notification, all the image from that folder in which image in saved should open in the android's default gallery view..below is my code snippet.
File file = new File(result);
if (file.exists()) {
galleryAddPic(file);
// push a notification of image downloaded.
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.fromFile(file));
PendingIntent pIntent = PendingIntent.getActivity(context, 0, intent, 0);
Notification notification = new Notification.Builder(context).setContentTitle("Download Complete").setContentText("Image downloaded, click to see.").setSmallIcon(R.drawable.arrow).setContentIntent(pIntent).setAutoCancel(true).getNotification();
notificationManager.notify(0, notification);
}