Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix issue 665 #700

Merged
Changes from 2 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
9 changes: 9 additions & 0 deletions src/android/CameraLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
private static final String GET_All = "Get All";
private static final String CROPPED_URI_KEY = "croppedUri";
private static final String IMAGE_URI_KEY = "imageUri";
private static final String IMAGE_FILE_PATH_KEY = "imageFilePath";

private static final String TAKE_PICTURE_ACTION = "takePicture";

Expand Down Expand Up @@ -1350,6 +1351,10 @@ public Bundle onSaveInstanceState() {
state.putString(IMAGE_URI_KEY, this.imageFilePath);
}

if(this.imageFilePath != null) {
state.putString(IMAGE_FILE_PATH_KEY, this.imageFilePath);
}

return state;
}

Expand All @@ -1375,6 +1380,10 @@ public void onRestoreStateForActivityResult(Bundle state, CallbackContext callba
this.imageUri = Uri.parse(state.getString(IMAGE_URI_KEY));
}

if (state.containsKey(IMAGE_FILE_PATH_KEY)) {
this.imageFilePath = state.getString(IMAGE_FILE_PATH_KEY);
}

this.callbackContext = callbackContext;
}
}