How to get Video path in android 4.3 -


yesterday got nexus 7 , try run app on it,and found after finish recordding video , return activity,i can't path of video,which throw nullpointer exception.here code:

private static string[] filepathcolumn = { mediastore.video.media.data };  public static string getpathfromuri(context context, uri uri){     cursor cursor = context.getcontentresolver().query(uri, filepathcolumn, null, null, null);     cursor.movetofirst();     string path = cursor.getstring(cursor.getcolumnindex(filepathcolumn[0]));     cursor.close();     return path; } 

now run fail on nexus7, don't know whether there api change or not, hope me.


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -