I'm working on app that have number of imageviews, when i click on the image i want it to open via android default gallery image picker. i've tried in this way :
String str = "android.resource://" + getPackageName() +"/"+R.drawable.wall1;
Uri path = Uri.parse(str);
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(path, "image/*");
startActivity(intent);
but it doesn't work and i get exception: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=android.resource://com.example.demo/2130837505 typ=image/* }