Having trouble getting file path to new photo

All your problems with Audio, Video and Images.

Having trouble getting file path to new photo

Postby barney » Wed Jan 13, 2010 8:18 am


I am trying to develop an app that will upload an photo to a server as soon as the photo is taken with the default Camera app. So far, I used the intent com.android.camera.NEW_PICTURE, which worked well. However, that intent is supposed to come with the path to the new file. When I call getDataString() on that intent, this is what comes back:


Now, when I try to upload the file that this string points to, I get a null pointer exception.

The photo on the camera is really at the location something like this: /sdcard/DCIM/Camera/2010-01-12 22.58.32.jpg

How can I get a string that points to the jpg file created by the camera app instead of the current string I'm getting which doesn't seem to point to anything?

Thanks a lot in advance,

Junior Developer
Junior Developer
Posts: 14
Joined: Tue Apr 28, 2009 5:40 am


Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 5 guests