Skip to content

Commit f07e0b2

Browse files
committed
update listener logs
1 parent 29b99f1 commit f07e0b2

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ dlcov.log
2323
*.ipr
2424
*.iws
2525
.idea/
26+
27+
# Swift Package Manager
28+
**/.build/
29+
**/.swiftpm/
30+
**/Package.resolved
31+
**/.lock
32+
**/workspace-state.json

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ private void init(Context context, BinaryMessenger messenger) {
2929
channel = new MethodChannel(messenger, "OneSignal");
3030
channel.setMethodCallHandler(this);
3131

32-
channel = new MethodChannel(messenger, "OneSignal");
33-
channel.setMethodCallHandler(this);
34-
3532
OneSignalDebug.registerWith(messenger);
3633
OneSignalLocation.registerWith(messenger);
3734
OneSignalSession.registerWith(messenger);
@@ -96,6 +93,11 @@ private void setConsentGiven(MethodCall call, Result reply) {
9693
replySuccess(reply, null);
9794
}
9895

96+
private void login(MethodCall call, Result result) {
97+
OneSignal.login((String) call.argument("externalId"));
98+
replySuccess(result, null);
99+
}
100+
99101
private void loginWithJWT(MethodCall call, Result result) {
100102
OneSignal.login((String) call.argument("externalId"), (String) call.argument("jwt"));
101103
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)