Showing posts with label Getting Image path from URI not working for Picasa folder. Show all posts
Showing posts with label Getting Image path from URI not working for Picasa folder. Show all posts

Thursday, September 19, 2013

[android help] Getting Image path from URI not working for Picasa folder


Getting Image path from URI not working for Picasa folder




Cursor cursor = contentResolver.query(uri, null, null, null, null);
cursor.moveToFirst();
String filePath = cursor.getString(cursor.getColumnIndexOrThrow(MediaColumns.DATA));



Unlike other folders like Camera, Screenshots, Foursquare etc.., The Pictures from Picasa folder have less no.of columns, of which _data is not there



and Hence I get the Exception:


java.lang.IllegalArgumentException: column'_data' does not exist


There is a column named picasa_id and a Constant in android:



MediaStore.Images.Media.PICASA_ID


Will that help in getting the correct image path?


Also if I had to download the image from the folder and save in my-app-images folder and then get the actual path. How will I even know that the image URI is from Picasa?



Read more

stackoverflow.comm



Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...