Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit eb0ac58
Merge: 97cffd5 7d21d76
Author: Manuel Beck <manuelbeck87@outlook.de>
Date:   Sun Mar 19 18:21:06 2023 +0100

    Merge pull request katzer#1973 from kumarsunil0007/patch-1

    Updated version for appShortcutBadger extenstion from 1.1.19 to 1.1.22

commit 97cffd5
Merge: ba42c73 e56ad35
Author: Manuel Beck <manuelbeck87@outlook.de>
Date:   Sun Mar 19 17:51:07 2023 +0100

    Merge pull request katzer#1979 from ygpedroso/bug/use-gradle-implementation

    Migrate to Gradle implementation

commit ba42c73
Merge: 6b30ca8 3c8e928
Author: Manuel Beck <manuelbeck87@outlook.de>
Date:   Sun Mar 19 17:46:13 2023 +0100

    Merge pull request katzer#1891 from timkellypa/android-10-updates

    Android 10 updates

commit 6b30ca8
Author: Manuel Beck <manuelbeck87@outlook.de>
Date:   Fri Mar 3 08:40:45 2023 +0100

    Update README.md

    Removed fund raising

commit d50a574
Author: Manuel Beck <manuelbeck87@outlook.de>
Date:   Tue Feb 28 17:33:19 2023 +0100

    Update README.md

    Added fundraising campaign for updating the plugin.

commit e56ad35
Author: Yannier <yannier@rideco.com>
Date:   Mon Aug 8 20:00:56 2022 -0400

    Migrate to Gradle implementation

    - Starting on Gradle 7.0 the compile method is removed.
    - Trying to build an app making use of the compile method returns
    the following: > Could not find method compile() for arguments...
    - This change migrates compile instances in the Gradle config file
    to use implementation instead

commit 7d21d76
Author: Sunil Kumar <67047295+kumarsunil0007@users.noreply.github.com>
Date:   Tue May 3 11:18:41 2022 +0530

    Update localnotification.gradle

    Updated version for appShortcutBadger from 1.1.19 to 1.1.22

commit 3c8e928
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Fri Jan 29 19:16:43 2021 -0500

    Fix "launchInApp" notifications in background

    - Dispatch a visibility change event on the webview.
    - Allows running of asynchronous code in webview (otherwise not working)
    - Remove no longer used checkAppInForeground() methods in receivers

commit 965d356
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Tue Aug 4 21:43:25 2020 -0400

    Persist base date within trigger.

    - Store base date for repeating notifications that are rescheduled.
    - On reboot, do not fire high priority notifications that already fired.

commit 989f924
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Thu Jul 30 00:21:52 2020 -0400

    Fix flag for scheduled alarm pending intent.

    - FLAG_UPDATE_CURRENT is better for clearing out old notifications.
    - FLAG_CANCEL_CURRENT can sometimes keep stale alarms around.

commit 613e0d8
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Sun Jul 26 23:57:17 2020 -0400

    Fix volume configuration concurrency.

    - Handle multiple notifications firing simultaneously.
    - Refactor volume manager to new class.

commit f561c33
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Mon Jul 13 18:19:34 2020 -0400

    Fix Android 8+ alarms when app is in background

    - When app is in background, system may not let it do async tasks.
    - Disable in app triggers when app is not in foreground.
    - This prevents inconsistent behavior with in app triggers

commit 74a8028
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Tue Jun 16 22:19:18 2020 -0400

    Fix version to beta.4 in local-notification.js

commit 9689811
Merge: bda9b6e 32caf60
Author: timkellypa <timkellypa@gmail.com>
Date:   Tue Jun 16 22:10:46 2020 -0400

    Merge pull request #1 from kassamina/master

    AndroidManifest.xml can end up missing the config for local notifications

commit 32caf60
Author: Zoe <zoe@tovifit.com>
Date:   Tue Jun 16 16:14:25 2020 -0400

    Add m0dch3n's fix for targeting the manifest

commit bda9b6e
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Thu May 7 00:26:39 2020 -0400

    Minor fixes to restore receiver.

    - Remove clear.  No reason to clear a notification on restart.
    - Remove duplicate rescheduling logic.
    - If alarm is triggered on restore, performNotification reschedules it.

commit 802963c
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Wed May 6 00:44:01 2020 -0400

    iOS bug fix.  Android restore receiver enhancement

    - Fix iOS schedule method to remove existing notification first.
    - Refactor Android receivers.
    - Create a base receiver with the logic for triggering a notification.
    - Extend that receiver for both restore and trigger.
    - Use same notification logic on boot as you do during a normal trigger.

commit 52002b0
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Wed Apr 29 15:26:26 2020 -0400

    Fix isInteractive() call.

    - Should not be called at all on < Oreo.
    - Wasn't introduced until API 20, so threw errors on earlier versions.

commit 4472efe
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Wed Apr 29 12:22:51 2020 -0400

    Bug fixes and added parameters

    - Added ability to use fullScreenIntent.
    - Fixed some things that were causing triggers not to fire.
    - Added ability to configure in-app triggers, decoupled from autoLaunch.
    - Default to immediately firing notifications
       - in instances where inapp triggers won't be reliably executed
       - based on Android version, sleep mode, etc.

commit 7721ecb
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Thu Apr 16 01:50:12 2020 -0400

    Use AlarmClock for more exact high priority alarms

commit 3b63bf0
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Mon Apr 13 23:29:23 2020 -0400

    Wakelock fixes.

    - Add longer timeout to wakelock.
    - Make wakelock timeout configurable (wakeLockTimeout)
    - Fix max priority notification on <M. Was not passing a wakeup flag.

commit 43f788b
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Fri Apr 10 22:24:25 2020 -0400

    Use a more aggressive wakelock

    - This ensures timely firing when using an autoLaunch receiver.

commit 9aa59c1
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Mon Apr 6 19:29:06 2020 -0400

    Fix typo in AssetUtil provider string

    - Typo prevented custom files from playing.

commit ef8cb32
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Thu Apr 2 23:53:33 2020 -0400

    Add changelog for this branch.

commit 2b0a6b4
Merge: 876fb35 caff55e
Author: Tim Kelly <tim.kelly@ert.com>
Date:   Thu Apr 2 10:23:56 2020 -0400

    Merge branch 'master' into android-10-updates

    Pull changes from original repo (katzer).

commit 876fb35
Author: Tim Kelly <tim.kelly@ert.com>
Date:   Thu Apr 2 10:11:38 2020 -0400

    Android 10 updates

    - Updates to support Android 10 (device and SDK)
    - Change to androidx imports
    - Conditionally skip autoLaunch behavior on Android 10
    - Some bug fixes with channel naming and firing notifications.

    Firing Notifications if autoLaunch:
    - No longer fires notifications if autoLaunch is true.
    - In above case, trigger event should schedule an immediate notification
    - The intent is that it now can be conditional
    - Still fires notification immediately on Android 10 when app is closed

commit 211973d
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Fri Oct 4 02:02:48 2019 -0400

    Change order in permissions section of readme.

commit 27a0bac
Author: Tim Kelly <timkellypa@gmail.com>
Date:   Fri Oct 4 01:51:17 2019 -0400

    Updates for wakelock, battery saving, and channels.

    - Update wakelock to acquire a partial lock for a second and not release.
    This allows it to run a small amount of async code in the trigger event.

    - Add methods to disable battery saving mode.
    This allows autolaunch alarms to fire more reliably.

    - Add channelId parameter, to allow caller to override channelId.
    (Was formerly always generated)

commit 10c6cdb
Author: timkellypa <timkellypa@gmail.com>
Date:   Thu Nov 1 22:46:14 2018 -0400

    Adding auto-launch capability for notifications in Android.
    Auto launches app and triggers an event.

commit 02832e9
Author: timkellypa <timkellypa@gmail.com>
Date:   Fri Oct 5 12:39:45 2018 -0400

    Added ability to customize alarm volume.
    - Added alarmVolume and resetDelay parameters.
    These let the caller specify the volume how long to stay at that
    volume before resetting.

    - Added requestDoNotDisturbPermissions and hasDoNotDisturbPermissions
    These allow the caller to check and request permissions to
    take the user out of silent (for an alarm volume config).  This
    also enables vibration when the phone is on silent (otherwise
    vibration and volume do not work on Android 8+).

commit 9c61255
Author: timkellypa <timkellypa@gmail.com>
Date:   Tue Oct 2 14:31:44 2018 -0400

    Added Android 8 Support for Sound and Vibrate properties.
    Created ability to have multiple channels
    generated dynamically for vibrate/sound configurations.
    * removed extra changes caused by creating a new branch *
  • Loading branch information
ParhamTaher committed Oct 27, 2023
1 parent 8078676 commit 4fcd971
Show file tree
Hide file tree
Showing 27 changed files with 2,810 additions and 547 deletions.
Binary file modified .DS_Store
Binary file not shown.
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
ChangeLog
---------

#### Version 0.9.0-beta.4
- Platform enhancements
- Android 8-10 device support
- Android 10 SDK support (using androidx libraries rather than support libraries)
- Note: If you are not building with API 29 on Android, you can use https://www.npmjs.com/package/cordova-plugin-androidx for backwards compatibility.
- Enhancements (Android)
- Adjusted high priority notifications to fire at more exact time.
- use setAlarmClock() rather than setExactAndAllowWhileIdle().
- New `autoLaunch` attribute.
- Notification launches application if closed (Android <= 9).
- App has the option to run some logic and schedule (or not schedule) an immediate alarm.
- Note, this will be overridden if fullScreenIntent is true. Doing that will use the fullScreenIntent behavior and not always autoLaunch.
- Also note, this feature can cause alarms to not always fire on time.
- New `alarmVolume` attribute. Can force application to increase device notification volume prior to playing sound.
- New `resetDelay` attribute. Delay to reset alarmVolume on the device back to its original settings
- New `wakeLockTimeout` attribute. Can be used to extend the wakelock to keep the device awake longer (in case an autoLaunch application trigger takes a while).
- New `triggerInApp` attribute.
- If set to true, notification will not fire. Instead it will fire a trigger event that can be listened to in the app.
- This allows you to evaluate the notification in the application, and if you decide to fire it, you can remove the trigger, remove triggerInApp, and schedule it. (It should fire immediately).
- This was previously coupled with autoLaunch, but I split it out for more flexibility.
- Listening to the event can be done as follows:

`window.cordova.plugins.notification.local.on('trigger', (notification) => {
// do something with notification
});`

- Note: this functionality will be skipped (alarms will fire immediately with no trigger method) if any of the following are true:
- Android 8+ is asleep and the app is not running (even if autoLaunch is true). As a timely execution of the app code can't be guaranteed in this state, the notification will fire immediately.
- The app is not running and autoLaunch is false (any Android version). If the app is not running, we can't execute its code, so fire immediately.
- New `fullScreenIntent` attribute.
- If set to true, will use fullScreenIntent in AlarmManager to launch application.
- Setting this to true will negate autoLaunch, and is the only way to automatically launch the app on Android 10+.
- Note: OS/manufacturer has some options for how to deal with this configuration. It will not always launch the activity, but typically will launch it if the device is asleep and show a heads-up notification if it is not.
- **Android Channel Support**
- New `channelName` attribute for the name of the notification channel to use
- New `channelId` attribute. If passed in, a notification channel will be created (using volume and vibration settings to determine importance)
- Android: Support for excluding an application from battery optimization settings.
- Android: Support for allowing an application permissions to override Do Not Disturb.

---

Please also read the [Upgrade Guide](https://github.com/katzer/cordova-plugin-local-notifications/wiki/Upgrade-Guide) for more information.

#### Version 0.8.5 (22.05.2017)
Expand Down
99 changes: 73 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

<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>
Expand Down Expand Up @@ -53,15 +51,14 @@

## Important Notice

Please make sure that you always read the tagged README for the version you're using.
Please make sure that you always read the tagged README for the version you're using.

See the _0.8_ branch if you cannot upgrade. Further development for `v0.9-beta` will happen here. The `0.9-dev` and `ios10` branches are obsolate and will be removed soon.

__Known issues__

- Support for Android Orio is limited yet.
- Support for Android Oreo is limited yet.
- v0.9 and v0.8 aren't compatible with each other (Wont fix)
- __Not compatible yet with Ionic__. Their wrapper is not part of this plugin. In future I will contribute to them to fix such issues in time. But for the moment I am busy enough with the plugin itself.

Please report bugs or missing features!

Expand Down Expand Up @@ -95,12 +92,13 @@ cordova.plugins.notification.local.schedule([

A notification does have a set of configurable properties. Not all of them are supported across all platforms.

| Property | Property | Property | Property | Property | Property | Property | Property |
| :------------ | :------------ | :------------ | :------------ | :------------ | :------------ | :------------ | :------------ |
| id | data | actionGroupId | summary | led | showWhen | channel | actions |
| text | icon | attachments | smallIcon | color | defaults | launch | groupSummary |
| title | silent | progressBar | sticky | vibrate | priority | mediaSession | foreground |
| sound | trigger | group | autoClear | lockscreen | number | badge | wakeup |
| Property | Property | Property | Property | Property | Property | Property | Property | Property |
| :------------ | :------------ | :------------ | :------------ | :------------ | :------------ | :------------ | :------------ | :------------ |
| id | data | timeoutAfter | summary | led | clock | channelName | actions | alarmVolume |
| text | icon | attachments | smallIcon | color | defaults | launch | groupSummary | resetDelay |
| title | silent | progressBar | sticky | vibrate | priority | mediaSession | foreground | autoLaunch |
| sound | trigger | group | autoClear | lockscreen | number | badge | wakeup | channelId |
| iconType | wakeLockTimeout | triggerInApp | fullScreenIntent

For their default values see:

Expand Down Expand Up @@ -164,19 +162,19 @@ It is recommended to pre-define action groups rather then specifying them with e


```js
cordova.plugins.notification.local.addActionGroup('yes-no', [
cordova.plugins.notification.local.addActions('yes-no', [
{ id: 'yes', title: 'Yes' },
{ id: 'no', title: 'No' }
]);
```

Once you have defined an action group, you can reference it when scheduling notifications:
Once you have defined an action group, you can reference it when scheduling notifications:

```js
cordova.plugins.notification.local.schedule({
title: 'Justin Rhyss',
text: 'Do you want to go see a movie tonight?',
actionGroupId: 'yes-no'
actions: 'yes-no'
});
```

Expand Down Expand Up @@ -264,7 +262,7 @@ The properties depend on the trigger type. Not all of them are supported across

| Type | Property | Type | Value | Android | iOS | Windows |
| :----------- | :------------ | :------ | :--------------- | :------ | :-- | :------ |
| Fix |
| Fix |
| | at | Date | | x | x | x |
| Timespan |
| | in | Int | | x | x | x |
Expand All @@ -286,7 +284,7 @@ The properties depend on the trigger type. Not all of them are supported across
| | every | String | `quarter` | x | | x |
| | every | String | `year` | x | x | x |
| | before | Date | | x | | x |
| | firstAt | Date | | x | x | x |
| | firstAt | Date | | x | | x |
| Match |
| | count | Int | | x | | x |
| | every | Object | `minute` | x | x | x |
Expand All @@ -300,7 +298,7 @@ The properties depend on the trigger type. Not all of them are supported across
| | every | Object | `quarter` | | x |
| | every | Object | `year` | x | x | x |
| | before | Date | | x | | x |
| | after | Date | | x | x | x |
| | after | Date | | x | | x |
| Location |
| | center | Array | `[lat, long]` | | x |
| | radius | Int | | | x |
Expand Down Expand Up @@ -420,6 +418,41 @@ cordova.plugins.notification.local.schedule(toast, callback, scope, { skipPermis
```


On Android 8, special permissions are required to exit "do not disturb mode" (in case alarmVolume is defined).
You can check these by using:

```js
cordova.plugins.notification.local.hasDoNotDisturbPermissions(function (granted) { ... })
```

... and you can request them by using:

```js
cordova.plugins.notification.local.requestDoNotDisturbPermissions(function (granted) { ... })
```

The only downside to not having these permissions granted is that alarmVolume and vibrate may not be
honored on Android 8+ devices if the device is currently on silent when the notification fires (silent, not vibrate).
In this situation, the notification will fire silently but still appear in the notification bar.

Also on Android 8, it is helpful for alarms that autolaunch the app with an event, if the app can
ignore battery saving mode (otherwise alarms won't trigger reliably). You can check to see if the app is whitelisted for this with the following method.

```js
cordova.plugins.notification.local.isIgnoringBatteryOptimizations(function (granted) { ... })
```

... and you can request to be whitelisted by using:

```js
cordova.plugins.notification.local.requestIgnoreBatteryOptimizations(function (granted) { ... })
```

The request method here will work one of two ways.
1. If you have the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission defined in the manifest, it will use ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS to explicitly ignore battery optimizations for this app. This is the best overall user experience, but the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission seems to be frowned upon and can get your app banned. This plugin does not have this permission in plugin.xml for this reason, so you will need to use the cordova-custom-config plugin to add it to your config.xml
2. If you do not have REQUEST_IGNORE_BATTERY_OPTIMIZATIONS requested, it will launch ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS to show a list of all applications. You will want to put some sort of instructions prior to this to walk the user through this. Also, this action doesn't exist on all Android devices (is missing on Samsung phones), which will make this method simply return false if it can't start the activity.


## Events

The following events are supported: `add`, `trigger`, `click`, `clear`, `cancel`, `update`, `clearall` and `cancelall`.
Expand All @@ -434,7 +467,7 @@ To unsubscribe from events:
cordova.plugins.notification.local.un(event, callback, scope);
```

__Note:__ You have to provide the exact same callback to `cordova.plugins.notification.local.un` as you provided to `cordova.plugins.notification.local.on` to make unsubscribing work.
__Note:__ You have to provide the exact same callback to `cordova.plugins.notification.local.un` as you provided to `cordova.plugins.notification.local.on` to make unsubscribing work.
Hence you should define your callback as a separate function, not inline. If you want to use `this` inside of your callback, you also have to provide `this` as `scope` to `cordova.plugins.notification.local.on`.

### Custom
Expand Down Expand Up @@ -473,19 +506,33 @@ document.addEventListener('deviceready', function () {
}, false);
```

It might be possible that the underlying framework like __Ionic__ is not compatible with the launch process defined by cordova. With the result that the plugin fires the click event on app start before the app is able to listen for the events.

Therefore its possible to fire the queued events manually by defining a global variable.

```js
window.skipLocalNotificationReady = true
```

Once the app and Ionic is ready, you can fire the queued events manually.

```js
cordova.plugins.notification.local.fireQueuedEvents();
```


## Methods

All methods work asynchron and accept callback methods.
All methods work asynchronous and accept callback methods.
See the sample app for how to use them.

| Method | Method | Method | Method | Method |
| :------- | :---------------- | :-------------- | :------------- | :---------- |
| schedule | cancelAll | isTriggered | get | getDefaults |
| update | hasPermission | getType | getAll | setDefaults |
| clear | requestPermission | getIds | getScheduled | on |
| clearAll | isPresent | getScheduledIds | getTriggered | un |
| cancel | isScheduled | getTriggeredIds | addActionGroup |
| Method | Method | Method | Method | Method | Method |
| :------- | :---------------- | :-------------- | :------------- | :------------ | :--------------- |
| schedule | cancelAll | isTriggered | get | removeActions | un |
| update | hasPermission | getType | getAll | hasActions | fireQueuedEvents |
| clear | requestPermission | getIds | getScheduled | getDefaults | requestDoNotDisturbPermissions |
| clearAll | isPresent | getScheduledIds | getTriggered | setDefaults | hasDoNotDisturbPermissions |
| cancel | isScheduled | getTriggeredIds | addActions | on |


## Installation
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-local-notification",
"version": "0.9.0-beta.3",
"version": "0.9.0-beta.4",
"description": "Schedules and queries for local notifications",
"cordova": {
"id": "cordova-plugin-local-notification",
Expand Down
21 changes: 17 additions & 4 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-local-notification"
version="0.9.0-beta.2">
version="0.9.0-beta.4">

<name>LocalNotification</name>

Expand Down Expand Up @@ -105,7 +105,7 @@
</feature>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest/application">
<config-file target="AndroidManifest.xml" parent="application">
<provider
android:name="de.appplant.cordova.plugin.notification.util.AssetProvider"
android:authorities="${applicationId}.provider"
Expand Down Expand Up @@ -138,8 +138,9 @@
-->
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest">
<!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> -->
<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
</config-file>
Expand Down Expand Up @@ -188,6 +189,10 @@
src="src/android/notification/receiver/AbstractRestoreReceiver.java"
target-dir="src/de/appplant/cordova/plugin/notification/receiver" />
-->
<source-file
src="src/android/notification/receiver/AbstractNotificationReceiver.java"
target-dir="src/de/appplant/cordova/plugin/notification/receiver" />

<source-file
src="src/android/notification/receiver/AbstractTriggerReceiver.java"
target-dir="src/de/appplant/cordova/plugin/notification/receiver" />
Expand All @@ -212,6 +217,10 @@
src="src/android/notification/util/AssetUtil.java"
target-dir="src/de/appplant/cordova/plugin/notification/util" />

<source-file
src="src/android/notification/util/LaunchUtils.java"
target-dir="src/de/appplant/cordova/plugin/notification/util" />

<source-file
src="src/android/notification/Builder.java"
target-dir="src/de/appplant/cordova/plugin/notification" />
Expand All @@ -224,6 +233,10 @@
src="src/android/notification/Notification.java"
target-dir="src/de/appplant/cordova/plugin/notification" />

<source-file
src="src/android/notification/NotificationVolumeManager.java"
target-dir="src/de/appplant/cordova/plugin/notification" />

<source-file
src="src/android/notification/Options.java"
target-dir="src/de/appplant/cordova/plugin/notification" />
Expand Down
5 changes: 3 additions & 2 deletions src/android/ClickReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
package de.appplant.cordova.plugin.localnotification;

import android.os.Bundle;
import android.support.v4.app.RemoteInput;
import androidx.core.app.RemoteInput;

import org.json.JSONException;
import org.json.JSONObject;

import de.appplant.cordova.plugin.notification.Notification;
import de.appplant.cordova.plugin.notification.receiver.AbstractClickReceiver;
import de.appplant.cordova.plugin.notification.util.LaunchUtils;

import static de.appplant.cordova.plugin.notification.Options.EXTRA_LAUNCH;
import static de.appplant.cordova.plugin.notification.Request.EXTRA_LAST;
Expand Down Expand Up @@ -94,7 +95,7 @@ private void launchAppIf() {
if (!doLaunch)
return;

launchApp();
LaunchUtils.launchApp(getApplicationContext());
}

/**
Expand Down
Loading

0 comments on commit 4fcd971

Please sign in to comment.