Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1 from jariztia/master
Browse files Browse the repository at this point in the history
Case the Activity gets killed by the OS while it's in the background
  • Loading branch information
arturokunder authored Oct 20, 2016
2 parents df54d51 + 73cb5b0 commit 56964e5
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import android.Manifest;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.content.pm.PackageManager;

Expand Down Expand Up @@ -302,4 +303,13 @@ public void onRequestPermissionResult(int requestCode, String[] permissions,
}
}

/**
* 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;
}

}

0 comments on commit 56964e5

Please sign in to comment.