Overview
Thesiren-android-inbox SDK is a comprehensive and customizable Android UI kit for displaying and managing notifications. This documentation provides comprehensive information on how to install, configure, and use the SDK effectively.
Installation
Prerequisites
- Android Studio Arctic Fox or later
- Android SDK 21 or higher
- Kotlin 1.5.0 or higher
Add JitPack Repository
Add the JitPack repository to your project-levelbuild.gradle file:
Add Dependency
Add the SDK dependency to your app-levelbuild.gradle file:
Configuration
Initialization
InitializeSirenSDK in your MainActivity by passing the context, token, recipientId, and error callback:
Configure Notification Icon
Add a notification icon with a badge showing unread count:Notification Icon Parameters
| Parameter | Description | Type | Default | 
|---|---|---|---|
| theme | Theme configuration | Theme | null | 
| customStyles | Custom styles | CustomStyles | null | 
| notificationIcon | Custom notification icon | @Composable (() -> Unit)? | null | 
| darkMode | Enable dark mode | Boolean | false | 
| disabled | Disable click on icon | Boolean | false | 
| hideBadge | Hide the badge on icon | Boolean | false | 
Configure Notification Inbox
Display a paginated list of notifications:Inbox Parameters
| Parameter | Description | Type | Default | 
|---|---|---|---|
| theme | Theme configuration | Theme | null | 
| title | Inbox title | String | ”Notifications” | 
| hideHeader | Hide header section | Boolean | false | 
| hideClearAll | Hide clear all button | Boolean | false | 
| darkMode | Enable dark mode | Boolean | false | 
| cardProps | Notification card props | CardProps | null | 
| listEmptyComponent | Custom empty state | @Composable () -> Unit | null | 
| customHeader | Custom header component | @Composable () -> Unit | null | 
| customFooter | Custom footer component | @Composable () -> Unit | null | 
| customNotificationCard | Custom card component | @Composable (AllNotificationResponseData) -> Unit | null | 
| customLoader | Custom loading component | @Composable () -> Unit | null | 
| customErrorWindow | Custom error component | @Composable () -> Unit | null | 
| itemsPerFetch | Items per API request (max 50) | Int | 20 | 
Customization
Theme Customization
Style Customization
Functions
Notification Management
Error Codes
| Error Code | Description | 
|---|---|
| TIMED_OUT | Request timed out | 
| INVALID_TOKEN | The token passed is invalid | 
| INVALID_RECIPIENT_ID | The recipient ID is invalid | 
| TOKEN_VERIFICATION_FAILED | Token verification failed | 
| GENERIC_API_ERROR | Unexpected API error |