Call native image viewer

All your problems with Audio, Video and Images.

Call native image viewer

Postby TheGDeveloper » Mon Jun 27, 2011 9:45 pm

Hi, new member here. I am glad that i am joining your community, i see that there are a lot of useful things here.

I am starting this topic because i woold like to ask if anyone knows if it is possible to call the native image view/gallery ativity. In some forums claims that new Intent(Intent.ACTION_GET_CONTENT); does the job but i do not think so. I have tried a variety of different approaches based on this and failed. One is bellow

Code: Select all

Intent photoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT);
photoPickerIntent.setType("image/jpg");
String forUrl = "/sdcard/sketch_camera/";
File f = new File(forUrl);
String[] files = f.list();
                if( files.length > 0 ) {
                    forUrl += files[ files.length - 1];
                }
photoPickerIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + forUrl));
parrent.startActivityForResult(photoPickerIntent, 1);


I only manage to get the file viewer but not the image galery
TheGDeveloper
Freshman
Freshman
 
Posts: 3
Joined: Mon Jun 27, 2011 9:38 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 20 guests