I only want to open file from my internal or external storage with given path like /storage/emulated/0/46_1244625499.gif not only image but it can be of any format like .pdf also. I just want to do this on button click event which provide me various open with option to open that file.
I try following:
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
Uri uri = Uri.parse(Environment.getExternalStorageDirectory().getPath()+ filename); //filename is string with value 46_1244625499.gif
intent.setDataAndType(uri, "text/csv");
startActivity(Intent.createChooser(intent, "Open folder"));
but it don't work.. please provide me working code.