Does anyone know how to integrate with the new Gallery3D app (cooliris android gallery)? I want to launch that app so it shows the thumbnails for only a specific folder.
For example, say my app downloads images from my server and stores them in a folder on the sd-card (/sdcard/myapp/image-cache/someid/*). I'd like to be able to do something like the following:
// within an activity
Uri uri = Uri.withAppendedPath(Media.EXTERNAL_CONTENT_URI, "myapp/image-cache/someid");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
Thanks.
I'm told you need to launch it like this:
Further info:
Ensure that you have the right path (check trailing slashes etc). As a test, you can check if the bucket id that comes out from your method equals the bucket id in the database (which you can query for using the MediaProvider class).
What you are doing right now is passing the first image in that bucket, and gallery automatically shows other images in view, but the difference is that you are trying to view an image, not a bucket, which is why it doesn't show up in a thumbnail view.
As far as your MediaScanner issue goes, connect() is an async call, so you should do everything in the method onMediaScannerConnected in you implementation of the MediaScannerConnectionClient interface. You already implemented this interface for onScanCompleted, so you just need to put the logic there instead of polling the MediaScannerService to see if it has connected.