Skip to content

Commit

Permalink
Merge pull request #30 from empiretylh/main-1
Browse files Browse the repository at this point in the history
Fixed Wrong Android Installation Setup
  • Loading branch information
killserver authored Oct 4, 2023
2 parents b9c2144 + d15773f commit f5b659e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@

#### Android

1. Open up `android/app/src/main/java/[...]/MainActivity.java`
- Add `import com.killserver.screenshotprev.RNPreventScreenshotPackage;` to the imports at the top of the file
- Add `new RNPreventScreenshotPackage()` to the list returned by the `getPackages()` method
1. Open up `android/app/src/main/java/[...]/MainApplication.java`
- Add `import com.killserver.screenshotprev.RNScreenshotPreventPackage;` to the imports at the top of the file
- Add `new RNScreenshotPreventPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-screenshot-prevent'
project(':react-native-screenshot-prevent').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-screenshot-prevent/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-screenshot-prevent')
implementation project(':react-native-screenshot-prevent')
```


Expand Down Expand Up @@ -95,4 +95,4 @@ useEffect(() => {
```


[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/killeserver)
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/killeserver)

0 comments on commit f5b659e

Please sign in to comment.