expo-community / expo-server-sdk-python

Exponent Server SDK
MIT License
143 stars 42 forks source link

Silent notifications on android #47

Closed areksiekiera closed 1 year ago

areksiekiera commented 2 years ago

Hi,

I'm trying to push a silent notification which seems to work on ios (standalone expo 42 app) but the same doesnt seem to work on android (also standalone expo 42 app).

from exponent_server_sdk import (
    DeviceNotRegisteredError,
    PushClient,
    PushMessage,
    PushServerError,
    PushTicketError,
)

extra = {'content-available': 1}

// this doesnt raise notification on iphone, as expected
PushClient().publish(PushMessage(to=ios_token,data=extra))

// both raise empty notification on android 9
PushClient().publish(PushMessage(to=android_token,data=extra))
PushClient().publish(PushMessage(to=android_token))

What am I doing wrong here ?

julianpacker commented 2 years ago

is this still an issue? I'm not sure I've seen this before