diff --git a/README.md b/README.md index 369fc0f..2104449 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ if(!__DEV__) RNScreenshotPrevent.enableSecureView(); * creates a hidden secureTextField which prevents Application UI capture on screenshots * and uses imgUri as the source of the background image (can be both https://, file:///) */ -if(!__DEV__) RNPreventScreenshot.enableSecureView(imgUri); +if(!__DEV__) RNScreenshotPrevent.enableSecureView(imgUri); /* (IOS) disableSecureView for IOS13+ * remove a hidden secureTextField which prevents Application UI capture on screenshots diff --git a/android/src/main/java/com/killserver/screenshotprev/RNScreenshotPreventModule.java b/android/src/main/java/com/killserver/screenshotprev/RNScreenshotPreventModule.java index 02e3cdb..03d99e6 100644 --- a/android/src/main/java/com/killserver/screenshotprev/RNScreenshotPreventModule.java +++ b/android/src/main/java/com/killserver/screenshotprev/RNScreenshotPreventModule.java @@ -124,7 +124,7 @@ private void createOverlay(Activity activity, String imagePath) { @Override public void onHostResume() { - Activity currentActivity = this.reactContext.getCurrentActivity(); + final Activity currentActivity = this.reactContext.getCurrentActivity(); if (currentActivity != null && overlayLayout != null) { currentActivity.runOnUiThread(new Runnable() { @Override @@ -142,7 +142,7 @@ public void run() { @Override public void onHostPause() { - Activity currentActivity = this.reactContext.getCurrentActivity(); + final Activity currentActivity = this.reactContext.getCurrentActivity(); if (currentActivity != null && overlayLayout != null) { currentActivity.runOnUiThread(new Runnable() { @Override