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
12 changes: 12 additions & 0 deletions src/android/com/synconset/ImagePicker/ImagePicker.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

public class ImagePicker extends CordovaPlugin {
Expand Down Expand Up @@ -69,4 +70,15 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
this.callbackContext.error("No images selected");
}
}

/**
* Choosing a picture launches another Activity, so we need to implement the
* save/restore APIs to handle the case where the CordovaActivity is killed by the OS
* before we get the launched Activity's result.
*
* @see http://cordova.apache.org/docs/en/dev/guide/platforms/android/plugin.html#launching-other-activities
*/
public void onRestoreStateForActivityResult(Bundle state, CallbackContext callbackContext) {
this.callbackContext = callbackContext;
}
}