Android reference
Android API overview
The Android SDK exposes Lanying Chat as Java classes in im.floo.floolib, including the client, services, managers, data models, listeners, push integration, and voice & video support.
Architecture and entry point
The Java API is generated over the shared C++ core through SWIG and JNI. BMXClient owns configuration and service access; service and manager classes perform operations; listener classes deliver asynchronous state changes.
Reference map
Choose the narrowest reference for your task. Each item links to the locally hosted generated API page.
BMXClientInitialisation, sign-in state, network lifecycle, and access to SDK services.BMXChatServiceConversations, history, sending, attachments, read receipts, and recall.BMXRosterServiceContacts, applications, relationships, and block-list operations.BMXGroupServiceGroup lifecycle, membership, roles, moderation, announcements, and files.BMXPushServiceVendor push tokens, aliases, push state, and related callbacks.RTCManagerAndroid voice & video session management and real-time media callbacks.Recommended integration flow
- Initialise the native library and one BMXClient from the Application lifecycle.
- Register service listeners before sign-in so no connection or initial-data event is missed.
- Run blocking service operations away from the UI thread and marshal results back to the presentation layer.
- Use BMXConversation, BMXMessage, and attachment subclasses as the common chat data model.
- Remove listeners, close conversations, and release voice & video resources when their Android owner stops.
What to keep in mind
- Generated Java methods can mirror C++ ownership and overload conventions; check parameter and return types carefully.
- Do not perform network-backed service calls on the main thread.
- Keep vendor push credentials in the console and pass only device tokens through the client SDK.