Commit 56964e58 authored by arturokunder's avatar arturokunder Committed by GitHub

Merge pull request #1 from jariztia/master

Case the Activity gets killed by the OS while it's in the background
parents df54d51c 73cb5b08
......@@ -15,6 +15,7 @@ import org.json.JSONObject;
import android.Manifest;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.content.pm.PackageManager;
......@@ -302,4 +303,13 @@ public class BarcodeScanner extends CordovaPlugin {
}
}
/**
* This plugin launches an external Activity when the camera is opened, so we
* need to implement the save/restore API in case the Activity gets killed
* by the OS while it's in the background.
*/
public void onRestoreStateForActivityResult(Bundle state, CallbackContext callbackContext) {
this.callbackContext = callbackContext;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment