Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fquirin committed Nov 19, 2022
1 parent c194111 commit a3b5d5f
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
### Notes about this fork

<p align="left"><b><a href="https://github.com/katzer/cordova-plugin-local-notifications/tree/example-x">SAMPLE APP</a> :point_right:</b></p>
- This is a merge of [@timkellypa](https://github.com/timkellypa/cordova-plugin-local-notifications), [@bhandaribhumin](https://github.com/bhandaribhumin/cordova-plugin-local-notification-12), [@powowbox](https://github.com/powowbox/cordova-plugin-local-notification-12) and my own fixes.
- If the app's in background and the 'triggerInApp' option is set to 'true', there is no way to show to users a new notification since the notification is not displayed in the notification center and the app is not visible.
- <b>Fix</b>: if the app's running in background, display the notification in the notification center.
- If the notification is scheduled / canceled / scheduled with the same id, the notification triggers twice.
- <b>Fix</b>: Due to the random reqCode. Now use the notification id for the reqCode.

<br>
#### Important notice
If the app is in background, it must not be launched but put in foreground.
To avoid launching the app in this case, add the following in your config.xml file:
`<preference name="AndroidLaunchMode" value="singleInstance"/>`

#### To install
Run `cordova plugin add https://github.com/fquirin/cordova-plugin-local-notifications.git --save --noregistery`

***

<p align="left"><b><a href="https://github.com/katzer/cordova-plugin-local-notifications/tree/example-x">SAMPLE APP</a> :point_right:</b></p>
<br>
<p align="center">
<img src="images/logo.png">
</p>

<p align="center">
<a href="https://www.npmjs.com/package/cordova-plugin-local-notification">
<img src="https://badge.fury.io/js/cordova-plugin-local-notification.svg" alt="npm version" />
Expand All @@ -18,31 +32,13 @@
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License" />
</a>
</p>

<br>

> A notification is a message you display to the user outside of your app's normal UI. When you tell the system to issue a notification, it first appears as an icon in the notification area. To see the details of the notification, the user opens the notification drawer. Both the notification area and the notification drawer are system-controlled areas that the user can view at any time.
<br>

<img width="60%" align="right" hspace="19" vspace="12" src="https://storage.googleapis.com/material-design/publish/material_v_12/assets/0BwJzNNZmsTcKZy1YYTV3VWQzVUE/notifications-behavior-03-drawer.png"></img>
<img width="60%" align="right" hspace="19" vspace="12" src="https://storage.googleapis.com/material-design/publish/material_v_12/assets/0Bzhp5Z4wHba3S1JWc3NkTVpjVk0/notifications-guidelines-03-optin.png"></img>

### Notes about this fork

- This is a merge of [@timkellypa](https://github.com/timkellypa/cordova-plugin-local-notifications), [@bhandaribhumin](https://github.com/bhandaribhumin/cordova-plugin-local-notification-12), [@powowbox](https://github.com/powowbox/cordova-plugin-local-notification-12) and my own fixes.
- If the app's in background and the 'triggerInApp' option is set to 'true', there is no way to show to users a new notification since the notification is not displayed in the notification center and the app is not visible.
- <b>Fix</b>: if the app's running in background, display the notification in the notification center.
- If the notification is scheduled / canceled / scheduled with the same id, the notification triggers twice.
- <b>Fix</b>: Due to the random reqCode. Now use the notification id for the reqCode.

#### Important notice
If the app is in background, it must not be launched but put in foreground.
To avoid launching the app in this case, add the following in your config.xml file:
`<preference name="AndroidLaunchMode" value="singleInstance"/>`

#### To install
Run `cordova plugin add https://github.com/fquirin/cordova-plugin-local-notifications.git --save --noregistery`
<br>

### Notification components
Expand Down

0 comments on commit a3b5d5f

Please sign in to comment.