This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I have an app that is just a webview with a button overlayed(shows up onyl in certain situations. it opens the camera, takes the picture an saves it BUT only if i comment out the whole ftp part(the real issue is i am getting a nullpointer exception in getrealpathfromuri). but WHY! I have the real path being output to logcat and its fine.
Hi! Thanks for the greeting! I am getting the NPE in the getRealPathFromURI(uri) method. But i do not know why. logcat shows the output of System.out.prinln(picUri) as file:///mnt/sdcard/xxx.jpg (even though there is no sdcard and it ends up in the root directory which is fine).
but when i call getRealPathFromUri(picUri) I get a NPE at "int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);"
OK, that's not a stack trace, but at least you narrow it down to the line that's causing the problem. So either cursor is null, or the NPE comes from the method getColumnIndexOrThrow(). Can you check if cursor is null? Or just post a stack trace.