My app has 12 pictures saved in drawable, and i made on a list of 12 item, so if any item pressed it should open the corresponding image. I want to open these images by default gallery application. i tried this
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("android.resource://com.app.mid/" + R.drawable.pic10), "image/png");
startActivity(intent);
But it gives me error :ActivityNotFoundException, No activity found to handle intent.
What should i do ? Thanks in advance :)