Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Android] Remove ref to androix @NotNull. [Android] Add new proguard-…
…rule for HeadlessTask
- Loading branch information
1 parent
8132a70
commit 865f861
Showing
5 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Android Auto-linking Setup | ||
|
||
### `react-native >= 0.60` | ||
|
||
### With `yarn` | ||
|
||
```bash | ||
$ yarn add react-native-background-fetch | ||
``` | ||
|
||
### With `npm` | ||
```bash | ||
$ npm install --save react-native-background-fetch | ||
``` | ||
|
||
## Configure __`proguard-rules.pro`__ | ||
|
||
If you're using __`minifyEnabled true`__ with your Android release build, the plugin's __`HeadlessTask`__ class will be mistakenly *removed* and you will have [this crash](https://github.com/transistorsoft/react-native-background-fetch/issues/261). | ||
|
||
1. Edit `android/app/proguard-rules.pro`. | ||
2. Add the following rule: | ||
|
||
```bash | ||
# [react-native-background-fetch] | ||
-keep class com.transistorsoft.rnbackgroundfetch.HeadlessTask { *; } | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters