Key capability

Push notifications

Add offline notifications through APNs and the major Android vendor channels without introducing a second messaging stack.

Push is part of the same Lanying client SDK used for chat. Your app integrates the vendor SDKs, while Lanying stores the channel credentials, binds device tokens to signed-in users, and routes offline messages through the appropriate provider.

How delivery works

  1. Enable push for the application in the Lanying console and upload the credentials for each target channel.
  2. Add the corresponding vendor SDK to the client and request notification permission from the user.
  3. Obtain the device token from APNs or the Android vendor SDK, then bind it through BMXPushService.
  4. Set the notification title and body on the outgoing message when the defaults are not sufficient.
  5. Test foreground, background, terminated, token-refresh, and sign-out behaviour on physical devices.

SDK object model

Push classestext
BMXClient
|----BMXPushService
    |----BMXPushServiceListener
    |----BMXPushManager
TypeResponsibility
BMXPushServiceSynchronous push lifecycle, token, certificate, alias, and device-token operations.
BMXPushManagerAsynchronous variants of the push operations.
BMXPushServiceListenerToken and push lifecycle callbacks.
BMXMessageNotification content and per-message push configuration.

Platform checklist

PlatformClient workConsole work
iOSEnable notification capabilities, request permission, and pass the APNs device token to the SDK.Upload the APNs certificate or key for the correct environment.
AndroidIntegrate each vendor SDK you ship and bind the returned device token.Add credentials for Huawei, Xiaomi, Meizu, OPPO, vivo, and other enabled channels.
WebUse the browser notification mechanism appropriate to your application.Keep chat-message routing and browser notification policy separate.
Treat push as a delivery hint, not as the source of truth. After the app opens, sync conversations through the chat SDK and deduplicate by message ID.

Before release

  • Verify development and production credentials independently.
  • Rebind the token after the operating system or vendor SDK refreshes it.
  • Stop or unbind push when the user signs out or changes account.
  • Localize notification resources and verify fallback text.
  • Do not put secrets or sensitive message data in notification payloads.