We are downloading a file from a server and writing it to folder on
sdcard. As soon as the write finishes, we perform a Media Scan on that
folder. When the user tries to open the file for viewing, we try to
leverage upon the Intent mechanism of Android and raise an Intent as
follows:

Intent myIntent = new
Intent(Intent.ACTION_VIEW,Uri.fromFile(tempFile));
// MIME_TYPE could be either of: image/*, video/*, audio/*, text/*
myIntent.setType(MIME_TYPE);
startActivity(Intent.createChooser(myIntent, "Open file using..."));

On emulator, the camera Application is launched for this Intent but
the application crashes with NPE. And on MOTOROLA Milestone, we are
getting a Toast which says: "No image to show". Note that the photo is
actually displayed in Media Gallery of both emulator and phone as soon
as the scan finishes.

Not sure what has been missed here; please help.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to