Local Notifications
IMLib does not implement local notification functionality, which requires your app to implement local notifications independently.
- When the app first enters the background, it remains in an active background state. The SDK receives messages through a persistent connection channel, triggering message reception callbacks when messages arrive. You can display local notifications upon receiving these callbacks. For details about message listeners, refer to Receiving Messages.
- If the app is terminated by the system after entering the background, the SDK will deliver notifications through the push channel after disconnection.
Due to the inherent business characteristics of Ultra Groups, apps may need to coordinate with Do Not Disturb Level functionality (see Ultra Group Do Not Disturb Overview) to implement refined local notification control strategies. Currently, the IMLib SDK's API for retrieving Do Not Disturb status is asynchronous, fetching data from the database each time, which may cause some latency and might not meet certain apps' requirements for local notification handling. If you need to implement memory-based retrieval of Do Not Disturb level data, you can refer to the implementation approach in RC IMKit SDK.
For reference on IMKit's local notification implementation logic, see IMKit Local Notification Documentation.