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

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -