0

How can I open/view an image in default gallery application using Intent. The following code opens up gallery App but does not show any image. I am new to android programming. Any help would be grateful. :)

            Intent intent = new Intent(Intent.ACTION_VIEW);
            String path = Environment.getExternalStorageDirectory().getPath().toString() + "/my_folder/" + filename;
            intent.setDataAndType(Uri.parse(test),"image/*");
            startActivity(intent);

0 Answers0