How mesibo/messenger-app-android works
Main Components
• Business Logic and Application Layer: The core application classes such as MainApplication.java, AppConfig.java, AppSettings, and various utility classes encapsulate the application’s business logic.
• Mesibo SDK Integration: The project integrates Mesibo SDKs (as noted in the README) that provide messaging, file transfer (MesiboFileTransferHelper), and call UI modules. This layer abstracts the real-time communication functionality.
• Background and Notification Services: Inside the source tree, there are several service classes (e.g., MesiboGcmListenerService, MesiboRegistrationIntentService, MesiboJobIntentService) that deal with Firebase/Google Cloud Messaging for push notifications, a critical component for real-time updates.
• External Services & APIs: The app uses Google Maps and Google Places SDKs for geolocation features, and pushes OTP generation using Mesibo’s backend (as described in the README). Although the backend code is hosted separately, it interacts with this client-side messenger app.
Component Relationships and Interactions
• The UI Layer interacts with the business logic (activities and fragments call utility functions and services) and directly initiates operations exposed by the Mesibo SDK (e.g., sending messages, starting calls).
• The Mesibo SDK Component bridges the app’s business logic with the remote real-time messaging infrastructure. It handles tasks like managing messaging sessions, file transfers, and call setup.
• Background Services (FCM-related classes) are triggered by system events (e.g., receipt of a push notification) and then communicate with the Mesibo SDK or update the UI via notifications.
• External APIs such as Google Maps/Places are invoked when location-based features are used (for example, sharing location during chat).
Architectural Patterns and Design Principles
• Separation of Concerns: The project clearly segregates UI (activities, fragments, XML layout) from business logic and SDK integration. This separation enhances maintainability and testing.
• Modular and Service-oriented Approach: By isolating functionalities (messaging, notifications, file transfer, geolocation) into dedicated classes and packages, the project achieves a modular design.
• Use of Android Lifecycle Components: The presence of MainApplication and various Activity classes suggests alignment with Android’s architectural practices, even if not strictly MVVM or MVP, ensuring clean state management.
Technologies, Frameworks, and Libraries
• Android SDK and Gradle Build System (the project utilizes Gradle build files and configuration scripts)
• Mesibo SDKs: Core for real-time messaging, Messaging UI Module, and Call UI Module.
• Firebase/Google Cloud Messaging for push notifications.
• Google Maps and Google Places SDKs for geolocation.
• Standard Android frameworks for UI (activities, fragments, layouts, resources).