Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change notification displayType on the example project on Android #7

Closed
Galahand opened this issue Aug 14, 2018 · 1 comment
Closed

Comments

@Galahand
Copy link

I was testing the example project on android and tried to change:
OneSignal.shared.setInFocusDisplayType(OSNotificationDisplayType.notification);
to:
OneSignal.shared.setInFocusDisplayType(OSNotificationDisplayType.none);
but the notification was still showing.

Notification JSON:

I/flutter (25042): Received notification: 
I/flutter (25042): {
I/flutter (25042):   "payload": "{
I/flutter (25042):   "google.sent_time": 1534274760440,
I/flutter (25042):   "google.ttl": 259200,
I/flutter (25042):   "custom": "{"i":"1d407634-82de-4807-a6ba-5128746687db","a":{"actionButtons":[{"id":"id1","text":"test1","icon":"null"},{"id":"id2","text":"test2","icon":"null"}],"actionSelected":"__DEFAULT__"}}",
I/flutter (25042):   "from": "531101699633",
I/flutter (25042):   "alert": "this is a test from OneSignal's Flutter SDK",
I/flutter (25042):   "bicon": "http://cdn1-www.dogtime.com/assets/uploads/gallery/30-impossibly-cute-puppies/impossibly-cute-puppy-2.jpg",
I/flutter (25042):   "title": "Test Notification",
I/flutter (25042):   "google.message_id": "0:1534274760445454%27163fb3f9fd7ecd",
I/flutter (25042):   "google.priority": "normal",
I/flutter (25042):   "notificationId": -2145615901
I/flutter (25042): }",
I/flutter (25042):   "displayType": 2,
I/flutter (25042):   "shown": true,
I/flutter (25042):   "appInFocus": false,
I/flutter (25042):   "silent": null
I/flutter (25042): }

i don't know if that is the correct way to change the displayType but it doesn't seem to work

@Nightsd01
Copy link
Contributor

Alright! Apologies this took so long but we've finally released 1.0.2 which fixes this (and many other) issues. Thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants