Skip to content

Commit

Permalink
Add a callback method when notification message clicked. #187
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Mar 23, 2020
1 parent 50c35a8 commit 7bdecb0
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion native-src/android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
- Open this folder as "an existing project" in Android Studio
- Change anything needed
- In the Gradle build window run `app > Tasks > build > clean` and `app > Tasks > build > build`
- Copy the release .aar: from the project root, run: `cp native-src/android/app/build/outputs/aar/app-release.aar src/platforms/android/`
- Copy the release .aar: from the plugin project root, run: `cp native-src/android/app/build/outputs/aar/app-release.aar src/platforms/android/`
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,11 @@ protected void onHandleIntent(@Nullable Intent intent) {
}

try {

final JSONObject jsonData = new JSONObject();
jsonData.put("event", Builder.NOTIFICATION_ID);
LocalNotificationsPlugin.executeOnMessageClickedCallback(jsonData);

onClick(intent.getAction(), bundle);

} catch (JSONException e) {
Log.e(TAG, e.getMessage(), e);
}
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-local-notifications",
"version": "4.2.0",
"version": "4.2.1",
"description": "The Local Notifications plugin allows your app to show notifications when the app is not running. Just like remote push notifications, but a few orders of magnitude easier to set up.",
"main": "local-notifications",
"typings": "index.d.ts",
Expand Down
Binary file modified src/platforms/android/app-release.aar
Binary file not shown.

0 comments on commit 7bdecb0

Please sign in to comment.