Skip to main content

Push Notifications

Gameball Flutter SDK supports registering push tokens for Firebase and Huawei devices. Pass the token and provider when initializing the customer.

Register the Push Token

deviceToken and pushProvider must be provided together. If one is set, the other is required.

Handle Token Refresh (Firebase example)

Huawei Devices

Call initializeCustomer after login/registration with the latest token to keep notifications working across devices.
Registering a new token adds it to the customer’s devices. Tokens registered earlier keep receiving notifications until Firebase or Huawei reports them as invalid. Gameball has no way to remove a token, so a device keeps receiving the customer’s notifications after the customer logs out.