Skip to content

Commit 6bcec66

Browse files
committed
update listener logs
1 parent 29b99f1 commit 6bcec66

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

android/src/main/java/com/onesignal/flutter/OneSignalPlugin.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ private void setConsentGiven(MethodCall call, Result reply) {
9696
replySuccess(reply, null);
9797
}
9898

99+
private void login(MethodCall call, Result result) {
100+
OneSignal.login((String) call.argument("externalId"));
101+
replySuccess(result, null);
102+
}
103+
99104
private void loginWithJWT(MethodCall call, Result result) {
100105
OneSignal.login((String) call.argument("externalId"), (String) call.argument("jwt"));
101106
replySuccess(result, null);

example/ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ EXTERNAL SOURCES:
6767

6868
SPEC CHECKSUMS:
6969
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
70-
onesignal_flutter: ff13b98ed601f835bb6f59509456773998a3faec
70+
onesignal_flutter: 6e6254c04f61c8d71d2b9a511bd19f8977eb44e4
7171
OneSignalXCFramework: ea9e14a95b92ad48d9b35037cbae88a9542bdea3
7272

7373
PODFILE CHECKSUM: 008ee3527530ade7ae7311fc02a615df31949c2e

example/lib/main.dart

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,13 @@ class _MyAppState extends State<MyApp> {
6666
});
6767

6868
OneSignal.Notifications.addClickListener((event) {
69-
print('NOTIFICATION CLICK LISTENER CALLED WITH EVENT: $event');
70-
this.setState(() {
71-
_debugLabelString =
72-
"Clicked notification: \n${event.notification.jsonRepresentation().replaceAll("\\n", "\n")}";
73-
});
69+
print(
70+
'NOTIFICATION CLICK LISTENER CALLED WITH EVENT: ${event.notification.title}');
7471
});
7572

7673
OneSignal.Notifications.addForegroundWillDisplayListener((event) {
77-
print("YO222222!");
78-
// print(
79-
// 'NOTIFICATION WILL DISPLAY LISTENER CALLED WITH: ${event.notification.jsonRepresentation()}');
74+
print(
75+
'NOTIFICATION WILL DISPLAY LISTENER CALLED WITH: ${event.notification.title}');
8076

8177
/// Display Notification, preventDefault to not display
8278
event.preventDefault();

0 commit comments

Comments
 (0)