Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions src/android/PhotoLibraryService.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,18 +201,8 @@ public void saveImage(final Context context, final CordovaInterface cordova, fin
saveMedia(context, cordova, url, album, imageMimeToExtension, new FilePathRunnable() {
@Override
public void run(String filePath) {
try {
// Find the saved image in the library and return it as libraryItem
String whereClause = MediaStore.MediaColumns.DATA + " = \"" + filePath + "\"";
queryLibrary(context, whereClause, new ChunkResultRunnable() {
@Override
public void run(ArrayList<JSONObject> chunk, int chunkNum, boolean isLastChunk) {
completion.run(chunk.size() == 1 ? chunk.get(0) : null);
}
});
} catch (Exception e) {
completion.run(null);
}
JSONObject item = new JSONObject();
completion.run(item);
}
});

Expand Down