android - different getPath for different images -
i need set different getpath() different images . below sample describing getpath 1 image . not able understand how use setting 2 images . public string getpath(uri uri) { string[] projection = { mediastore.images.media.data }; cursor cursor = managedquery(uri, projection, null, null, null); if (cursor != null) { // here nullpointer if cursor null // can be, if used oi file manager picking media int column_index = cursor .getcolumnindexorthrow(mediastore.images.media.data); cursor.movetofirst(); return cursor.getstring(column_index); } else return null; } bitmap :- public void decodefile(string filepath) { // decode image size bitmapfactory.options o = new bitmapfactory.options(); o.injustdecodebounds = true; bitmapfactory.decodefile(filepath, o); // new size want scale final int required_size = 70; ...