List of usage examples for org.apache.cordova.api CordovaInterface managedQuery
public abstract Cursor managedQuery(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder);
From source file:net.mutina.uclimb.ForegroundCameraLauncher.java
License:Apache License
/** * Queries the media store to find out what the file path is for the Uri we supply * * @param contentUri the Uri of the audio/image/video * @param ctx the current applicaiton context * @return the full path to the file/*from w ww . j ava 2s.co m*/ */ private String getRealPathFromURI(Uri contentUri, CordovaInterface ctx) { String[] proj = { _DATA }; Cursor cursor = ctx.managedQuery(contentUri, proj, null, null, null); int column_index = cursor.getColumnIndexOrThrow(_DATA); cursor.moveToFirst(); return cursor.getString(column_index); }