Skip to content

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

@Galahand

Description

@Galahand

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions