-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from leandrosimoes/feature/add-support-to-rn-69
Feature/add support to rn 69
- Loading branch information
Showing
55 changed files
with
2,875 additions
and
3,662 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github: leandrosimoes | ||
custom: ["https://www.buymeacoffee.com/leandrosimoes", lesimoes.dev] |
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,148 @@ | ||
# Changelog | ||
|
||
## v5.0.0 | ||
|
||
### Fixes | ||
|
||
* Error on build in RN 0.69+ | ||
* Closes https://github.com/leandrosimoes/react-native-android-notification-listener/issues/44 | ||
|
||
### Enhancements | ||
|
||
* Example project now uses RN 0.69.0 | ||
|
||
## v4.1.0 | ||
|
||
### Fixes | ||
|
||
* New RN version compiling exceptions | ||
- Closes https://github.com/leandrosimoes/react-native-android-notification-listener/issues/42 | ||
|
||
### Changes | ||
|
||
* Example project RN dependency updated to 0.68.1 | ||
|
||
### Breaking changes | ||
|
||
* RN peer dependency updated to 0.68.1 | ||
* Gradle version must be greater than or equal 7.0.0 | ||
|
||
## v4.0.2 | ||
|
||
### Fixes | ||
|
||
* Fix Gradle 7.0 breaking changes | ||
|
||
## v4.0.1 | ||
|
||
### Fixes | ||
|
||
* Fixed missing README on npm | ||
|
||
### Enhancements | ||
|
||
* Linting improvements | ||
* Now example project also is written in typescript | ||
|
||
## v4.0.0 | ||
|
||
### Enhancements | ||
|
||
* Improved project folders structure | ||
* Now the example project has a prepare.js file used to set up the project for testing. Just follow [this](https://github.com/leandrosimoes/react-native-android-notification-listener/blob/master/example/README.md) instructions | ||
|
||
### Breaking Changes | ||
|
||
* RN peer dependency updated to 0.65.1 | ||
* Also updated example project RN's version | ||
|
||
## v3.1.2 | ||
|
||
### Fixes | ||
|
||
* The extra key `EXTRA_SMALL_ICON` is deprecated and because of that was unable to build the project so this key was removed. | ||
|
||
### Enhancements | ||
|
||
* Added support for large icon | ||
- This feature closes https://github.com/leandrosimoes/react-native-android-notification-listener/issues/21 | ||
|
||
### Thanks for helping | ||
|
||
@arunahuja94 | ||
|
||
## v3.1.1 | ||
|
||
### Fixes | ||
|
||
* Fixed `groupedMessages` being passed always empty to the notification listener | ||
|
||
### Thanks for helping | ||
|
||
@arunahuja94 | ||
|
||
## v3.1.0 | ||
|
||
### Enhancements | ||
|
||
* Add `time`, `icon`, and `image` properties to the notification payload | ||
- NOTE 1: The `image` may not work for some apps such as Telegram and WhatsApp | ||
- NOTE 2: The `icon` and `image` is passed as base64 string | ||
|
||
## v3.0.0 | ||
|
||
### Enhancements | ||
|
||
* Add more properties to the notification payload. You can see all of them in the documentation [here](https://github.com/leandrosimoes/react-native-android-notification-listener). | ||
|
||
### Breaking Changes | ||
|
||
Now the notification received by the handler function was changed to a JSON string payload so before using you must do `JSON.parse`. You can see more in the documentation [here](https://github.com/leandrosimoes/react-native-android-notification-listener). | ||
|
||
### Thanks for helping | ||
|
||
@arunahuja94 | ||
|
||
## v2.0.0 | ||
|
||
### Enhancements | ||
|
||
* Add Headless JS service to avoid the notification listener to be killed by Android | ||
* Add Boot Up Receiver to restart the service in case the user reboots the device as soon the OS restart | ||
* Add index.d.ts to provide some typings | ||
|
||
### Breaking changes | ||
|
||
* Removed the method `onNotificationReceived` because now the handle must be made using the `AppRegistry`. (See the documentation [here](https://github.com/leandrosimoes/react-native-android-notification-listener)) | ||
|
||
### Thanks for helping | ||
|
||
@jehartzog | ||
|
||
## v1.0.4 | ||
|
||
### Fixes | ||
|
||
* Fixed some java syntax error about missing comma | ||
* Fixed crashing application on Android 8+ | ||
- Closes https://github.com/leandrosimoes/react-native-android-notification-listener/issues/1 | ||
|
||
### Thanks for helping | ||
|
||
@qsdamar | ||
|
||
## v1.0.3 | ||
|
||
### Fixes | ||
|
||
* Fix crashing application on receiving notification | ||
|
||
## v1.0.2 | ||
|
||
### Enhancements | ||
|
||
* Add publishing with GitHub Actions | ||
|
||
## v1.0.0 | ||
|
||
* First version |
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,76 @@ | ||
# Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to make participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all project spaces, and it also applies when | ||
an individual is representing the project or its community in public spaces. | ||
Examples of representing a project or community include using an official | ||
project e-mail address, posting via an official social media account, or acting | ||
as an appointed representative at an online or offline event. Representation of | ||
a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at <[email protected]>. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, | ||
available at https://www.contributor-covenant.org/version/2/1/code_of_conduct/ | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
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,28 @@ | ||
# Contributing to React Native Android Notification Listener | ||
|
||
Thank you for your interest in contributing to React Native Android Notification Listener! See bellow how you can contribute with this project: | ||
|
||
## Issues | ||
|
||
All issues are valid since follow this simple rules: | ||
|
||
1) Check if there's any other issue open or close that matches your need/problem before open; | ||
2) Always follow the issue templates provided on open a new issue and answer the questions carefully; | ||
3) Always help to find the a solution. Don't be that guy that opens an issue and waits for the solution to come from others; | ||
4) Be kind with everyone; | ||
|
||
## Pull Requests | ||
|
||
Fell free to open a PR with your modifications, but keep in mind that it will be merged only if all the following rules are properly applied. | ||
|
||
1) The codes follow all the code standards. You can execute `yarn lint` to check if is everything fine before send your PR; | ||
2) You code was properly tested in real devices and everything works fine; | ||
3) You PR was reviewed and approved by the repository maintainers; | ||
|
||
## Donating | ||
|
||
If this repository helped you in any aspect, consider to send a donation to the repository owner: | ||
|
||
* [GitHub Sponsor Page](https://github.com/sponsors/leandrosimoes) | ||
* [Buy Me A Coffee](https://www.buymeacoffee.com/leandrosimoes) | ||
* [More Info](https://lesimoes.dev) |
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 |
---|---|---|
|
@@ -8,7 +8,12 @@ React Native Android Notification Listener is a library that allows you to liste | |
|
||
## Installation | ||
|
||
`$ npm install react-native-android-notification-listener` | ||
* For React Native greater or equal then 0.68.0 | ||
- `$ yarn add react-native-android-notification-listener` | ||
* For React Native between 0.65.1 and 0.67.4 | ||
- `$ yarn add [email protected]` | ||
* For React Native less then 0.65 | ||
- `$ yarn add [email protected]` | ||
|
||
## Usage | ||
|
||
|
@@ -83,12 +88,12 @@ For more details, see the `example/` project in this repository | |
|
||
"There are some limitations regarding the use of the Headless JS by this module that I should care about?" | ||
|
||
Yes, there are some nuances that you should concern. For example, since Headless JS runs in a standalone "Task" you can't interact directly with it by the touch UI. | ||
Yes, there are some nuances that you should concern about. For example, since Headless JS runs in a standalone "Task" you can't interact directly with it by the touch UI. | ||
For more information about using Headless JS in React Native, I suggest you take a look at the official documentation [here](https://reactnative.dev/docs/headless-js-android). | ||
|
||
*** | ||
|
||
"I keep receiving the warning `registerHeadlessTask or registerCancellableHeadlessTask called multiple times for same key '${taskKey}'`, is that a problem? | ||
"I keep receiving the warning `registerHeadlessTask or registerCancellableHeadlessTask called multiple times for the same key '${taskKey}'`, is that a problem? | ||
|
||
No, this warning is here, where you can see that the task providers are stored in a set, and there's no way to delete them, so react is just complaining about the fact that we are overwriting it. | ||
|
||
|
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,2 @@ | ||
BUNDLE_PATH: "vendor/bundle" | ||
BUNDLE_FORCE_RUBY_PLATFORM: 1 |
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
Oops, something went wrong.