### Start Foreground Service (Kotlin) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui.presentation.view.activity/-inbox-activity/index.html Initiates a foreground service, which is a service that the user is actively aware of and can be managed. This method takes an Intent to define the service to be started and returns the ComponentName of the started service. ```kotlin open override fun startForegroundService(p0: Intent): ComponentName? ``` -------------------------------- ### startServerCommunication Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh/-pushwoosh/index.html Starts communication with the Pushwoosh server. ```APIDOC ## startServerCommunication ### Description Starts communication with the Pushwoosh server. ### Method POST (Assumed, as it initiates an action) ### Endpoint /startServerCommunication ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example (No request body required) ### Response #### Success Response (200) (No specific success response details provided, likely void or a success status) #### Response Example (No specific JSON response example provided) ``` -------------------------------- ### User Segmentation with Pushwoosh Tags (Android) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/README.md This prompt demonstrates how to implement user segmentation using Pushwoosh tags in an Android application. It requests an example helper class with methods for setting and getting tags, leveraging the SDK's setTags and getTags functionalities. ```text Show me how to use Pushwoosh tags for user segmentation in Android. Create example helper class with methods for setting and getting tags. Use Context7 MCP to fetch Pushwoosh Android SDK documentation for setTags and getTags. ``` -------------------------------- ### Start Server Communication in Pushwoosh Android SDK Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh/-pushwoosh/start-server-communication.html This function starts communication with Pushwoosh servers, enabling data exchange. It's essential for SDK functionality and should be managed with stopServerCommunication for privacy. The example shows its use in a scenario where a user accepts a privacy policy. ```kotlin open fun startServerCommunication() { // Implementation details for starting server communication } ``` -------------------------------- ### Initialize PushwooshLocation and Start Tracking (Kotlin) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-location/com.pushwoosh.location/-pushwoosh-location/index.html This snippet demonstrates how to initialize the PushwooshLocation class and start location tracking. It requires the Pushwoosh Android SDK. The startLocationTracking() function initiates the tracking process. ```kotlin import com.pushwoosh.location.PushwooshLocation // ... // Initialize PushwooshLocation (if not already done by the SDK) val locationTracker = PushwooshLocation() // Start location tracking locationTracker.startLocationTracking() // To stop tracking: // locationTracker.stopLocationTracking() ``` -------------------------------- ### Start Activity from Fragment (Kotlin) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui.presentation.view.activity/-inbox-activity/index.html Enables starting an activity from within a Fragment. This method requires the Fragment instance, the Intent, and a request code. An optional Bundle can be provided for extra data. It ensures proper activity launching context from a fragment. ```kotlin open fun startActivityFromFragment(p0: Fragment, p1: Intent, p2: Int) open fun startActivityFromFragment(p0: Fragment, p1: Intent, p2: Int, p3: Bundle?) ``` -------------------------------- ### Get Calling Package (Kotlin) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui.presentation.view.activity/-inbox-activity/index.html Retrieves the name of the package that started the current activity. This helps identify the originating application. It returns an optional `String` representing the package name. ```kotlin open fun getCallingPackage(): String? ``` -------------------------------- ### Start Single Activity with Intent (Kotlin) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui.presentation.view.activity/-inbox-activity/index.html Launches a single activity using an Intent. Overloads allow for starting with or without additional Bundle parameters. This is fundamental for transitioning the user to a new screen or task. ```kotlin open override fun startActivity(p0: Intent) open override fun startActivity(p0: Intent, p1: Bundle?) ``` -------------------------------- ### Get Tags with Loading Indicator and Callback (Java) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.function/-callback/index.html Demonstrates fetching user tags with the Pushwoosh SDK, including showing a loading indicator before the operation and hiding it upon completion via the callback. It processes the retrieved tags or logs any errors. This example combines UI feedback with asynchronous data retrieval. ```java // Show loading indicator during operation showLoadingIndicator(); Pushwoosh.getInstance().getTags((result) -> { hideLoadingIndicator(); if (result.isSuccess()) { TagsBundle tags = result.getData(); String userName = tags.getString("Name", "Unknown"); int userAge = tags.getInt("Age", 0); updateUserProfile(userName, userAge); } else { ``` -------------------------------- ### Start Intent Sender (Kotlin) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui.presentation.view.activity/-inbox-activity/index.html Starts an activity or service based on an IntentSender. This is often used for operations that require user permission or confirmation, such as launching activities from other applications or handling specific system intents. It involves multiple integer parameters for flags and options. ```kotlin open override fun startIntentSender(p0: IntentSender, p1: Intent?, p2: Int, p3: Int, p4: Int) ``` -------------------------------- ### Start Postponed Enter Transition - Android Kotlin Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui.presentation.view.activity/-inbox-activity/index.html Starts the postponed enter transition. This should be called after the necessary data or resources for the transition have been loaded. ```kotlin open fun supportStartPostponedEnterTransition() ``` -------------------------------- ### Start Server Communication (Kotlin) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh/-pushwoosh/index.html Initiates communication with the Pushwoosh server. This is typically called to begin receiving push notifications and other server-driven features. ```kotlin open fun startServerCommunication() ``` -------------------------------- ### Get System Service by Class (Kotlin) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui.presentation.view.activity/-inbox-activity/index.html Retrieves a system service strongly typed by its class. This method is generic and accepts a Class object for the desired service, returning an instance of that type. It's a safer alternative to getting services by name. ```kotlin fun getSystemService(p0: Class): T ``` -------------------------------- ### Implement Custom SummaryNotificationFactory Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.notification/-summary-notification-factory/index.html Examples of extending the SummaryNotificationFactory to customize notification appearance, including message text, icons, colors, and conditional display logic. ```java public class MySummaryNotificationFactory extends SummaryNotificationFactory { public String summaryNotificationMessage(int notificationsAmount) { return notificationsAmount + " new messages"; } public int summaryNotificationIconResId() { return R.drawable.ic_notification_stack; } public int summaryNotificationColor() { return 0xFF6200EE; } } ``` ```java public class OrderSummaryFactory extends SummaryNotificationFactory { public String summaryNotificationMessage(int notificationsAmount) { return notificationsAmount == 1 ? "1 order update" : notificationsAmount + " order updates"; } public int summaryNotificationIconResId() { return R.drawable.ic_shopping_bag; } public int summaryNotificationColor() { return getApplicationContext().getResources().getColor(R.color.brand_primary); } public boolean autoCancelSummaryNotification() { return true; } } ``` ```java public class SmartSummaryFactory extends SummaryNotificationFactory { public boolean shouldGenerateSummaryNotification() { SharedPreferences prefs = getApplicationContext().getSharedPreferences("app_prefs", Context.MODE_PRIVATE); return prefs.getBoolean("enable_grouped_notifications", true); } public String summaryNotificationMessage(int notificationsAmount) { return notificationsAmount + " notifications"; } public int summaryNotificationIconResId() { return -1; } public int summaryNotificationColor() { return -1; } } ``` -------------------------------- ### Start Location Tracking (With Callback) - Pushwoosh Android SDK Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-location/com.pushwoosh.location/-pushwoosh-location/start-location-tracking.html Starts location tracking for geo push notifications and provides a callback to handle the success or failure of the operation. The callback receives a Void on success or a LocationNotAvailableException on failure. It returns whether the user accepted permissions and enabled location services. ```kotlin open fun startLocationTracking(callback: Callback) ``` -------------------------------- ### GET getHwid Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh/-pushwoosh/get-hwid.html Retrieves the unique Pushwoosh Hardware ID (HWID) for the current device installation. ```APIDOC ## GET getHwid ### Description Returns the unique Pushwoosh Hardware ID (HWID) associated with the current device installation. This identifier is persistent across app reinstalls. ### Method GET ### Endpoint com.pushwoosh.Pushwoosh.getHwid() ### Parameters None ### Request Example N/A (Method call) ### Response #### Success Response (200) - **hwid** (String) - The unique identifier string for the device. #### Response Example { "hwid": "12345-ABCDE-67890" } ``` -------------------------------- ### Example Usage of startServerCommunication Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh/-pushwoosh/start-server-communication.html This code snippet demonstrates how to use the startServerCommunication function in conjunction with registering for push notifications, typically after a user accepts a privacy policy. ```kotlin // User accepts privacy policy if (userAcceptsPrivacyPolicy()) { Pushwoosh.getInstance().startServerCommunication(); Pushwoosh.getInstance().registerForPushNotifications(); } ``` -------------------------------- ### Start Instrumentation (Kotlin) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui.presentation.view.activity/-inbox-activity/index.html Launches an instrumentation process. This is typically used for testing purposes, allowing external code to control and monitor the application's execution. It requires a ComponentName, a string for arguments, and an optional Bundle. ```kotlin open override fun startInstrumentation(p0: ComponentName, p1: String?, p2: Bundle?): Boolean ``` -------------------------------- ### Get Calling Activity (Kotlin) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui.presentation.view.activity/-inbox-activity/index.html Retrieves the `ComponentName` of the activity that started the current activity. This is useful for understanding the navigation history. It returns an optional `ComponentName` object. ```kotlin open fun getCallingActivity(): ComponentName? ``` -------------------------------- ### Initialize and Use ModalConfigResolver in Kotlin Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.inapp.view.config/-modal-config-resolver/index.html Demonstrates how to instantiate the ModalConfigResolver class and utilize the getEffectiveConfig function to retrieve a ModalRichmediaConfig object based on a provided resource. ```kotlin import com.pushwoosh.inapp.view.config.ModalConfigResolver import com.pushwoosh.inapp.view.config.Resource val resolver = ModalConfigResolver() val resource = Resource() // Assuming Resource is initialized appropriately val config = resolver.getEffectiveConfig(resource) ``` -------------------------------- ### Initialize and Configure Pushwoosh SDK Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh/-pushwoosh/index.html Demonstrates how to retrieve the Pushwoosh instance, register for push notifications, set user tags for segmentation, and configure a user ID for cross-device tracking. The SDK handles initialization automatically, so no manual setup is required. ```java // 1. Get Pushwoosh instance (SDK is already initialized automatically) Pushwoosh pushwoosh = Pushwoosh.getInstance(); // 2. Register for push notifications pushwoosh.registerForPushNotifications((result) -> { if (result.isSuccess()) { Log.d("App", "Push registered: " + result.getData().getToken()); } else { Log.e("App", "Registration failed: " + result.getException()); } }); // 3. Set user tags for targeting TagsBundle tags = new TagsBundle.Builder() .putString("Name", "John Doe") .putInt("Age", 25) .putString("Subscription", "premium") .build(); pushwoosh.setTags(tags); // 4. Set user ID for cross-device tracking pushwoosh.setUserId("user_12345"); ``` -------------------------------- ### Get Pushwoosh Notification ID and other IDs (Kotlin) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.notification/-push-message/get-pushwoosh-notification-id.html Example demonstrating how to retrieve the Pushwoosh notification ID, message ID, and campaign ID from a PushMessage object. It also shows how to save diagnostic information if a valid notification ID is available. This is useful for advanced tracking and debugging. ```kotlin protected boolean onMessageReceived(PushMessage message) { long notificationId = message.getPushwooshNotificationId(); long messageId = message.getMessageId(); long campaignId = message.getCampaignId(); // Log all IDs for comprehensive tracking Log.d("Analytics", String.format( "Notification - PW ID: %d, Message ID: %d, Campaign ID: %d", notificationId, messageId, campaignId )); // Store for support/debugging if (notificationId != -1) { saveDiagnosticInfo(notificationId, message.toJson().toString()); } return false; } ``` -------------------------------- ### Initialize PushwooshException Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.exception/-pushwoosh-exception/index.html Demonstrates the available constructors for creating a new instance of PushwooshException, allowing initialization with a message, a cause, or both. ```kotlin val e1 = PushwooshException("Error message") val e2 = PushwooshException(throwable) val e3 = PushwooshException("Error message", throwable) ``` -------------------------------- ### Initialize PostEventException Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.exception/-post-event-exception/index.html Constructs a new PostEventException instance with a specific error description string. ```kotlin constructor(description: String) ``` -------------------------------- ### Handle Custom Deep Links in Push Notifications (Java) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.notification/-notification-service-extension/start-activity-for-push-message.html This example shows how to handle custom deep links provided within a Pushwoosh notification's custom data. It checks if a 'deep_link' exists and starts with 'myapp://'. If it's a recognized deep link, it parses the URI and routes to specific screens (e.g., product details, cart). Otherwise, it falls back to the default behavior. ```java protected void startActivityForPushMessage(PushMessage message) { String deepLink = message.getCustomData().getString("deep_link"); if (deepLink != null && deepLink.startsWith("myapp://")) { // Parse and handle custom deep link Uri uri = Uri.parse(deepLink); String path = uri.getPath(); // e.g., "/product/123" // Route based on path if (path.startsWith("/product/")) { String productId = path.substring("/product/".length()); openProductScreen(productId); } else if (path.equals("/cart")) { openCartScreen(); } else { // Unknown deep link - use default super.startActivityForPushMessage(message); } } else { // No custom deep link - use default super.startActivityForPushMessage(message); } } ``` -------------------------------- ### Initialize Pushwoosh SDK Entry Point Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh/index.html The Pushwoosh class is the primary entry point for the SDK. It is used to register devices for push notifications, manage user identity, set tags, and schedule local notifications. ```kotlin open class Pushwoosh { // Main entry point for the Pushwoosh SDK. } ``` -------------------------------- ### Theme Initialization Script Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.richmedia/-rich-media-type/-m-o-d-a-l/index.html A JavaScript snippet used by the documentation generator to detect and apply the user's preferred color scheme (light or dark mode) based on local storage or system settings. ```javascript var pathToRoot = "../../../../"; document.documentElement.classList.replace("no-js","js"); const storage = localStorage.getItem("dokka-dark-mode"); if (storage == null) { const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; if (osDarkSchemePreferred === true) { document.getElementsByTagName("html")[0].classList.add("theme-dark"); } } else { const savedDarkMode = JSON.parse(storage); if(savedDarkMode === true) { document.getElementsByTagName("html")[0].classList.add("theme-dark"); } } ``` -------------------------------- ### Start Activity if Needed (Kotlin) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui.presentation.view.activity/-inbox-activity/index.html Starts an activity only if it's not already running or if specific conditions are met. It returns a boolean indicating if the activity was started. This function is useful for optimizing activity launches and managing application state. ```kotlin open fun startActivityIfNeeded(p0: Intent, p1: Int): Boolean open fun startActivityIfNeeded(p0: Intent, p1: Int, p2: Bundle?): Boolean ``` -------------------------------- ### Pushwoosh SDK Initialization and Core Functions Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh/-pushwoosh/index.html This section covers core functions for initializing and interacting with the Pushwoosh SDK, including getting the instance, application code, HWID, and push token. ```APIDOC ## Pushwoosh SDK Core Functions ### Description Provides access to essential information and the singleton instance of the Pushwoosh SDK. ### Methods - **getInstance**(): Returns the shared instance of the Pushwoosh SDK. - **getApplicationCode**(): Returns the current Pushwoosh application code. - **getHwid**(): Returns the Pushwoosh Hardware ID (HWID) associated with the current device. - **getPushToken**(): Returns the current push notification token. ### Request Example ```java // Get the Pushwoosh instance Pushwoosh pushwoosh = Pushwoosh.getInstance(); // Get application code String appCode = pushwoosh.getApplicationCode(); // Get HWID String hwid = pushwoosh.getHwid(); // Get push token String pushToken = pushwoosh.getPushToken(); ``` ### Response #### Success Response (200) - **getInstance**: Pushwoosh - The singleton instance of the SDK. - **getApplicationCode**: String - The application code. - **getHwid**: String - The device's HWID. - **getPushToken**: String - The device's push token. #### Response Example ```json { "applicationCode": "YOUR_APP_CODE", "hwid": "DEVICE_HWID", "pushToken": "DEVICE_PUSH_TOKEN" } ``` ``` -------------------------------- ### Initialize PushwooshException in Kotlin Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.exception/-pushwoosh-exception/-pushwoosh-exception.html Demonstrates the available constructors for the PushwooshException class. These constructors allow for initializing exceptions with a description string, a throwable cause, or a combination of both. ```kotlin val exception1 = PushwooshException("Error description") val exception2 = PushwooshException(throwable) val exception3 = PushwooshException("Message", throwable) ``` -------------------------------- ### Handle Post-Create Initialization (Nullable Bundle) in Android Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui.presentation.view.activity/-inbox-activity/index.html This is an alternative implementation for handling post-create initialization, specifically accepting a nullable Bundle. It's an override of a superclass method for initialization after onCreate. ```kotlin protected open override fun onPostCreate(p0: Bundle?) ``` -------------------------------- ### GET InboxMessage.getSendDate Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox/com.pushwoosh.inbox.data/-inbox-message/get-send-date.html Retrieves the date the inbox message was sent. ```APIDOC ## GET InboxMessage.getSendDate ### Description Retrieves the timestamp representing when the specific inbox message was sent. ### Method GET ### Endpoint com.pushwoosh.inbox.data.InboxMessage.getSendDate() ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example // Method call in Java/Kotlin Date sendDate = inboxMessage.getSendDate(); ### Response #### Success Response (200) - **Date** (java.util.Date) - The date object representing the message send time. #### Response Example { "sendDate": "2026-01-01T12:00:00Z" } ``` -------------------------------- ### Example: Generating Auto-Cancelable Notification (Java) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.notification/-notification-factory/add-cancel.html This Java example demonstrates how to use the addCancel function when generating a notification. It shows the typical workflow of creating a notification builder, building the notification, and then calling addCancel to make it dismissible upon tapping. ```java public Notification onGenerateNotification(@NonNull PushMessage data) { String channelId = addChannel(data); NotificationCompat.Builder builder = new NotificationCompat.Builder( getApplicationContext(), channelId) .setContentTitle(data.getHeader()) .setContentText(data.getMessage()) .setSmallIcon(R.drawable.ic_notification); Notification notification = builder.build(); addCancel(notification); // Dismiss when tapped return notification; } ``` -------------------------------- ### PushwooshVoIPMessage Constructor Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-calls/com.pushwoosh.calls/-pushwoosh-vo-i-p-message/-pushwoosh-vo-i-p-message.html Initializes a new instance of the PushwooshVoIPMessage class. ```APIDOC ## PushwooshVoIPMessage Constructor ### Description Initializes a new instance of the PushwooshVoIPMessage class with the provided payload. ### Method CONSTRUCTOR ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **payload** (Bundle?) - Optional - The bundle containing the VoIP message payload. ### Request Example ```json { "payload": { /* Bundle object */ } } ``` ### Response #### Success Response (200) N/A (Constructor) #### Response Example N/A (Constructor) ``` -------------------------------- ### getNotificationIntent Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.notification/-summary-notification-factory/get-notification-intent.html Retrieves the Intent that should be started when a user clicks on a summary notification. ```APIDOC ## getNotificationIntent ### Description Returns an Intent to start when the user clicks on the summary notification. ### Method `open fun` ### Endpoint N/A (This is a function within the SDK, not a REST endpoint) ### Parameters None ### Request Example N/A ### Response #### Success Response - **Intent** (Intent) - The Intent to be started upon notification click. ``` -------------------------------- ### GET getImageUrl Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox/com.pushwoosh.inbox.data/-inbox-message/get-image-url.html Retrieves the image URL associated with an inbox message. ```APIDOC ## GET getImageUrl ### Description Retrieves the URL of the image associated with the specific inbox message instance. ### Method GET ### Endpoint com.pushwoosh.inbox.data.InboxMessage.getImageUrl() ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example // This is a method call on an InboxMessage object instance message.getImageUrl(); ### Response #### Success Response (200) - **url** (String) - The absolute URL string pointing to the message image. #### Response Example { "url": "https://example.com/image.png" } ``` -------------------------------- ### Configure Push Notification Settings in Android Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.notification/-pushwoosh-notification-settings/index.html Examples demonstrating how to initialize and configure global notification settings such as multi-notification mode, sound, vibration, and LED colors within an Android Application class. ```java public class MyApplication extends Application { public void onCreate() { super.onCreate(); Pushwoosh.getInstance().registerForPushNotifications(); PushwooshNotificationSettings.setMultiNotificationMode(true); PushwooshNotificationSettings.setSoundNotificationType(SoundType.ALWAYS); PushwooshNotificationSettings.setVibrateNotificationType(VibrateType.DEFAULT_MODE); PushwooshNotificationSettings.setEnableLED(true); PushwooshNotificationSettings.setColorLED(Color.BLUE); } } ``` ```java public class ShoppingApplication extends Application { public void onCreate() { super.onCreate(); Pushwoosh.getInstance().registerForPushNotifications(); int brandColor = ContextCompat.getColor(this, R.color.brand_primary); PushwooshNotificationSettings.setNotificationIconBackgroundColor(brandColor); PushwooshNotificationSettings.setColorLED(brandColor); PushwooshNotificationSettings.setEnableLED(true); PushwooshNotificationSettings.setMultiNotificationMode(true); PushwooshNotificationSettings.setSoundNotificationType(SoundType.ALWAYS); PushwooshNotificationSettings.setVibrateNotificationType(VibrateType.ALWAYS); PushwooshNotificationSettings.setLightScreenOnNotification(true); PushwooshNotificationSettings.setNotificationChannelName("Order Updates"); } } ``` ```java public class FocusApplication extends Application { public void onCreate() { super.onCreate(); Pushwoosh.getInstance().registerForPushNotifications(); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); boolean focusModeEnabled = prefs.getBoolean("focus_mode", false); if (focusModeEnabled) { PushwooshNotificationSettings.setSoundNotificationType(SoundType.NO_SOUND); PushwooshNotificationSettings.setVibrateNotificationType(VibrateType.NO_VIBRATE); PushwooshNotificationSettings.setEnableLED(false); } else { PushwooshNotificationSettings.setSoundNotificationType(SoundType.DEFAULT_MODE); PushwooshNotificationSettings.setVibrateNotificationType(VibrateType.DEFAULT_MODE); } } } ``` -------------------------------- ### Initialize RichMediaStyle in Kotlin Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.richmedia/-rich-media-style/-rich-media-style.html The RichMediaStyle class is initialized using a constructor that accepts an integer for the background color and a RichMediaAnimation object. This defines the visual presentation settings for rich media content within the SDK. ```kotlin val style = RichMediaStyle(backgroundColor, richMediaAnimation) ``` -------------------------------- ### GET NotificationServiceExtension.applicationContext Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.notification/-notification-service-extension/application-context.html Retrieves the application context for the current NotificationServiceExtension instance. ```APIDOC ## GET /com.pushwoosh.notification/NotificationServiceExtension/applicationContext ### Description Retrieves the protected application context associated with the Pushwoosh NotificationServiceExtension. ### Method GET ### Endpoint com.pushwoosh.notification.NotificationServiceExtension.applicationContext ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example N/A (Property access) ### Response #### Success Response (200) - **applicationContext** (Context) - The Android Context object associated with the application. #### Response Example { "applicationContext": "android.content.Context@..." } ``` -------------------------------- ### GET ModalRichMediaDismissAnimationType.values() Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.inapp.view.config.enums/-modal-rich-media-dismiss-animation-type/values.html Retrieves an array of all available constants for the ModalRichMediaDismissAnimationType enum. ```APIDOC ## GET /com.pushwoosh.inapp.view.config.enums/ModalRichMediaDismissAnimationType/values ### Description Returns an array containing the constants of the ModalRichMediaDismissAnimationType enum type, in the order they are declared. This is typically used for iterating over available animation types. ### Method GET ### Endpoint /com.pushwoosh.inapp.view.config.enums/ModalRichMediaDismissAnimationType/values ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **Array** - An array containing all enum constants. #### Response Example [ "SLIDE_DOWN", "FADE_OUT", "NONE" ] ``` -------------------------------- ### LoadingViewCreatorInterface.createLoadingView Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.richmedia/-rich-media-style/-loading-view-creator-interface/create-loading-view.html This function is responsible for creating a loading view. It is an abstract function, meaning it must be implemented by any class that implements the LoadingViewCreatorInterface. ```APIDOC ## createLoadingView ### Description Abstract function to create a loading view. This must be implemented by concrete classes. ### Method Abstract ### Endpoint N/A (Method within an interface) ### Parameters None ### Request Example N/A ### Response #### Success Response - **View** (View) - The created loading view. #### Response Example N/A (Abstract function, implementation specific) ``` -------------------------------- ### Implement RichMediaPresentingDelegate interface Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.richmedia/-rich-media-presenting-delegate/index.html The RichMediaPresentingDelegate interface defines methods for managing the lifecycle of Rich Media content. Implement these methods to handle events such as content display, closure, errors, and conditional presentation logic. ```kotlin interface RichMediaPresentingDelegate { fun onClose(richMedia: RichMedia) fun onError(richMedia: RichMedia, pushwooshException: PushwooshException) fun onPresent(richMedia: RichMedia) fun shouldPresent(richMedia: RichMedia): Boolean } ``` -------------------------------- ### GET isActionPerformed Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox/com.pushwoosh.inbox.data/-inbox-message/is-action-performed.html Checks whether an action has been performed on a specific Inbox message. ```APIDOC ## GET /com.pushwoosh.inbox.data/InboxMessage/isActionPerformed ### Description Determines if the action associated with an Inbox Message has been triggered, either via the performAction method or through a push notification tap. ### Method GET ### Endpoint /com.pushwoosh.inbox.data/InboxMessage/isActionPerformed ### Parameters #### Path Parameters - **None** ### Response #### Success Response (200) - **result** (Boolean) - Returns true if an action was performed in the Inbox, otherwise false. ### Response Example { "isActionPerformed": true } ``` -------------------------------- ### Initialize ModalRichmediaConfig Constructor Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.inapp.view.config/-modal-richmedia-config/-modal-richmedia-config.html This snippet shows the default constructor for the ModalRichmediaConfig class. It is used to create an instance of the configuration for modal rich media messages. ```kotlin constructor() ``` -------------------------------- ### Compare ModalRichMediaWindowWidth in Kotlin Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.inapp.view.config.enums/-modal-rich-media-window-width/compare.html The compare function compares the current ModalRichMediaWindowWidth instance with a provided source instance. It returns an integer representing the comparison result, typically used for sorting or conditional logic in UI configuration. ```kotlin open fun compare(source: ModalRichMediaWindowWidth): Int ``` -------------------------------- ### GET /com.pushwoosh.tags/TagsBundle/getMap Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.tags/-tags-bundle/get-map.html Retrieves the internal map representation of tags from the TagsBundle object. ```APIDOC ## GET /com.pushwoosh.tags/TagsBundle/getMap ### Description Returns the internal map representation of tags stored within the TagsBundle. This method is intended for advanced use cases and provides an immutable view of the tag data. ### Method GET ### Endpoint com.pushwoosh.tags.TagsBundle.getMap() ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example // No request body required for this method call ### Response #### Success Response (200) - **Map** - An immutable map containing tag names as keys and their corresponding values. #### Response Example { "tag_name_1": "string_value", "tag_name_2": 123, "tag_name_3": true } ``` -------------------------------- ### GET InboxMessage.getTitle() Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox/com.pushwoosh.inbox.data/-inbox-message/get-title.html Retrieves the title of an inbox message within the Pushwoosh Android SDK. ```APIDOC ## GET InboxMessage.getTitle() ### Description Retrieves the title string associated with an inbox message object. ### Method GET ### Endpoint com.pushwoosh.inbox.data.InboxMessage.getTitle() ### Parameters #### Path Parameters - None ### Request Example N/A (Method call on InboxMessage instance) ### Response #### Success Response (200) - **title** (String) - The title of the inbox message. #### Response Example { "title": "Welcome to our app!" } ``` -------------------------------- ### Configure Modal Presentation Globally (Java) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.inapp.view.config/-modal-richmedia-config/index.html Demonstrates how to set up a basic ModalRichmediaConfig and apply it globally using RichMediaManager. This sets default presentation parameters for all subsequent in-app messages. ```java ModalRichmediaConfig config = new ModalRichmediaConfig() .setAnimationDuration(500); RichMediaManager.setDefaultRichMediaConfig(config); ``` -------------------------------- ### Handle Post-Create Initialization in Android Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui.presentation.view.activity/-inbox-activity/index.html This method is called after the activity's onCreate() method has completed. It can receive optional Bundle and PersistableBundle arguments for state restoration. It's used for post-creation setup. ```kotlin open fun onPostCreate(p0: Bundle?, p1: PersistableBundle?) ``` -------------------------------- ### GET unreadMessagesCount Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox/com.pushwoosh.inbox/-pushwoosh-inbox/unread-messages-count.html Retrieves the total number of unread inbox messages for the current user. ```APIDOC ## GET unreadMessagesCount ### Description Fetches the count of unread messages from the Pushwoosh inbox. This method is asynchronous and requires a callback to handle the result. ### Method GET ### Endpoint com.pushwoosh.inbox.PushwooshInbox.unreadMessagesCount ### Parameters #### Request Body - **callback** (Callback) - Required - A callback function that receives the integer count on success or an InboxMessagesException on failure. ### Request Example ```kotlin PushwooshInbox.instance().unreadMessagesCount { result -> if (result.isSuccess) { val count = result.data } else { val error = result.exception } } ``` ### Response #### Success Response (200) - **count** (Integer) - The total number of unread messages currently in the inbox. #### Response Example ```json { "count": 5 } ``` ``` -------------------------------- ### GET /com.pushwoosh.badge/PushwooshBadge/getBadgeNumber Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-badge/com.pushwoosh.badge/-pushwoosh-badge/get-badge-number.html Retrieves the current application icon badge number from the Pushwoosh SDK. ```APIDOC ## GET /com.pushwoosh.badge/PushwooshBadge/getBadgeNumber ### Description Retrieves the current badge number displayed on the application icon. ### Method GET ### Endpoint com.pushwoosh.badge.PushwooshBadge.getBadgeNumber() ### Parameters None ### Request Example N/A (Method call) ### Response #### Success Response (200) - **badgeNumber** (Int) - The current application icon badge number. #### Response Example { "badgeNumber": 5 } ``` -------------------------------- ### Initialize InboxMessagesException in Kotlin Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox/com.pushwoosh.inbox.exception/-inbox-messages-exception/index.html Demonstrates the available constructors for the InboxMessagesException class. It allows instantiation with a description string, a throwable cause, or a combination of both for detailed error reporting. ```kotlin val exception1 = InboxMessagesException("Error message") val exception2 = InboxMessagesException(throwable) val exception3 = InboxMessagesException("Error message", throwable) ``` -------------------------------- ### GET getTagsHashMap Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.tags/-tags-bundle/-builder/get-tags-hash-map.html Retrieves the current collection of tags stored in the TagsBundle Builder as a HashMap. ```APIDOC ## GET getTagsHashMap ### Description Retrieves the current collection of tags stored in the TagsBundle Builder as a HashMap. This method returns the key-value pairs representing the tags configured for the push notification. ### Method GET ### Endpoint com.pushwoosh.tags.TagsBundle.Builder.getTagsHashMap() ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example N/A (Method call) ### Response #### Success Response (200) - **HashMap** - A map containing the tag keys and their corresponding values. #### Response Example { "tags": { "Language": "en", "PremiumUser": true } } ``` -------------------------------- ### Initialize Theme Handling in Documentation Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui/index.html A JavaScript snippet used by the documentation site to detect and apply the user's preferred color scheme (dark mode) based on local storage or system settings. ```javascript var pathToRoot = "../../"; document.documentElement.classList.replace("no-js","js"); const storage = localStorage.getItem("dokka-dark-mode"); if (storage == null) { const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; if (osDarkSchemePreferred === true) { document.getElementsByTagName("html")[0].classList.add("theme-dark"); } } else { const savedDarkMode = JSON.parse(storage); if(savedDarkMode === true) { document.getElementsByTagName("html")[0].classList.add("theme-dark"); } } ``` -------------------------------- ### GET getOpenAnimation Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.richmedia.animation/-rich-media-animation-slide-top/get-open-animation.html Retrieves the open animation for the RichMediaAnimationSlideTop component in the Pushwoosh Android SDK. ```APIDOC ## GET getOpenAnimation ### Description Retrieves the animation object used when opening a RichMedia view, specifically for the SlideTop animation type. ### Method GET ### Endpoint com.pushwoosh.richmedia.animation.RichMediaAnimationSlideTop.getOpenAnimation ### Parameters #### Path Parameters - **parentView** (View) - Required - The parent view associated with the animation context. ### Request Example N/A (Method call) ### Response #### Success Response (200) - **Animation** (Object) - Returns an Android Animation object representing the slide-top transition. #### Response Example { "animation": "android.view.animation.Animation" } ``` -------------------------------- ### Handle Asynchronous Results with Callback.process Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.function/-callback/process.html Demonstrates how to implement the process method to handle various SDK operations including push registration, tag management, and retrieving user tags. It checks the result status and handles success data or exceptions accordingly. ```java public void process(@NonNull Result result) { if (result.isSuccess()) { RegisterForPushNotificationsResultData data = result.getData(); String pushToken = data.getToken(); boolean notificationsEnabled = data.isEnabled(); Log.d("App", "Push token: " + pushToken); Log.d("App", "Notifications enabled: " + notificationsEnabled); statusTextView.setText("Push notifications enabled"); } else { RegisterForPushNotificationsException exception = result.getException(); Log.e("App", "Registration failed: " + exception.getMessage(), exception); AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Registration Failed") .setMessage("Unable to register for push notifications: " + exception.getMessage()) .setPositiveButton("Retry", (dialog, which) -> retryRegistration()) .setNegativeButton("Cancel", null) .show(); } } ``` ```java public void process(@NonNull Result result) { if (result.isSuccess()) { Log.d("App", "Tags set successfully"); Toast.makeText(this, "Profile updated", Toast.LENGTH_SHORT).show(); } else { PushwooshException exception = result.getException(); Log.e("App", "Failed to set tags: " + exception.getMessage(), exception); if (exception.getMessage().contains("network")) { Toast.makeText(this, "Network error. Please check your connection", Toast.LENGTH_LONG).show(); } else { Toast.makeText(this, "Update failed. Please try again", Toast.LENGTH_SHORT).show(); } } } ``` ```java public void process(@NonNull Result result) { if (result.isSuccess()) { TagsBundle tags = result.getData(); String userName = tags.getString("Name", "Guest"); int userAge = tags.getInt("Age", 0); String subscription = tags.getString("Subscription", "free"); Log.d("App", "User: " + userName + ", Age: " + userAge + ", Plan: " + subscription); nameTextView.setText(userName); subscriptionBadge.setText(subscription.toUpperCase()); } else { // Handle error case } } ``` -------------------------------- ### GET PushMessage.vibration Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.notification/-push-message/vibration.html Retrieves the vibration setting associated with a specific push notification message. ```APIDOC ## GET PushMessage.vibration ### Description Returns the vibration configuration for the received push notification. This property indicates whether the device should vibrate upon receiving the notification. ### Method GET ### Endpoint com.pushwoosh.notification.PushMessage.vibration ### Parameters None ### Response #### Success Response (200) - **vibration** (Boolean) - Returns true if vibration is enabled for the notification, false otherwise. ### Response Example { "vibration": true } ``` -------------------------------- ### POST /PushwooshHmsHelper/GetTokenAsync/doInBackground Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-huawei/com.pushwoosh.huawei/-pushwoosh-hms-helper/-get-token-async/do-in-background.html Executes the asynchronous task to retrieve a token for Huawei Mobile Services (HMS) integration. ```APIDOC ## POST /PushwooshHmsHelper/GetTokenAsync/doInBackground ### Description Performs the background operation to fetch the HMS token required for Pushwoosh push notifications on Huawei devices. ### Method POST ### Endpoint /com.pushwoosh.huawei/PushwooshHmsHelper/GetTokenAsync/doInBackground ### Parameters #### Request Body - **voids** (Array) - Required - An array of Void objects as required by the AsyncTask implementation. ### Request Example { "voids": [] } ### Response #### Success Response (200) - **GetTokenAsyncResult** (Object) - The result object containing the retrieved HMS token or error status. #### Response Example { "status": "success", "token": "hms_token_string_example" } ``` -------------------------------- ### GET /com.pushwoosh.inapp.view.config.enums/ModalRichMediaWindowWidth/valueOf Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.inapp.view.config.enums/-modal-rich-media-window-width/value-of.html Retrieves the enum constant for ModalRichMediaWindowWidth based on the provided string name. ```APIDOC ## GET /com.pushwoosh.inapp.view.config.enums/ModalRichMediaWindowWidth/valueOf ### Description Returns the enum constant of the ModalRichMediaWindowWidth type with the specified name. The input string must match exactly the identifier used to declare the enum constant. ### Method GET ### Endpoint /com.pushwoosh.inapp.view.config.enums/ModalRichMediaWindowWidth/valueOf ### Parameters #### Query Parameters - **name** (String) - Required - The exact name of the enum constant to retrieve. ### Request Example { "name": "FULL_WIDTH" } ### Response #### Success Response (200) - **result** (ModalRichMediaWindowWidth) - The matching enum constant. #### Error Handling - **IllegalArgumentException**: Thrown if no enum constant exists with the specified name. #### Response Example { "result": "FULL_WIDTH" } ``` -------------------------------- ### Example Usage of setLargeIcon (Java) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.notification/-local-notification/-builder/set-large-icon.html Demonstrates how to use the `setLargeIcon` method within the `LocalNotification.Builder` to set a large icon for various notification types, such as e-commerce product updates, news alerts, and fitness achievements. The examples showcase setting a URL for the circular image that will appear on the left side of the notification. ```java LocalNotification productNotification = new LocalNotification.Builder() .setMessage("Your favorite item is back in stock!") .setLargeIcon("https://cdn.example.com/products/item-thumb.jpg") .setLink("myapp://products/12345") .setDelay(3600) .build(); LocalNotification newsNotification = new LocalNotification.Builder() .setMessage("Breaking news update") .setLargeIcon("https://news.example.com/article-thumb.jpg") .setLink("newsapp://article/67890") .setDelay(1800) .build(); LocalNotification achievementNotification = new LocalNotification.Builder() .setMessage("You earned a new badge!") .setLargeIcon("https://cdn.fitnessapp.com/badges/runner-gold.png") .setDelay(7200) .build(); ``` -------------------------------- ### Build and Send Tags using TagsBundle Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.tags/-tags-bundle/index.html Demonstrates how to use the TagsBundle.Builder to create a collection of user attributes and send them to the Pushwoosh server. It also shows how to retrieve values from the bundle and convert the bundle to a JSON object. ```java // Building tags for a premium customer TagsBundle tags = new TagsBundle.Builder() .putString("customer_tier", "premium") .putInt("lifetime_orders", 15) .putLong("customer_since", System.currentTimeMillis()) .putBoolean("newsletter_subscribed", true) .putList("favorite_categories", Arrays.asList("electronics", "books")) .putDate("last_purchase", new Date()) .build(); // Sending tags to Pushwoosh Pushwoosh.getInstance().sendTags(tags); // Reading tags from bundle String tier = tags.getString("customer_tier"); // "premium" int orders = tags.getInt("lifetime_orders", 0); // 15 List categories = tags.getList("favorite_categories"); // ["electronics", "books"] // Converting to JSON for API calls JSONObject json = tags.toJson(); ``` -------------------------------- ### Conditional Activity Launch with Authentication Check (Java) Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.notification/-notification-service-extension/start-activity-for-push-message.html This example illustrates how to implement an authentication check before launching an activity based on a push notification. It retrieves login status from SharedPreferences and checks if the notification requires authentication. If authentication is required and the user is not logged in, it prevents the activity launch (though the provided snippet is incomplete and would typically navigate to a login screen or use default behavior). ```java protected void startActivityForPushMessage(PushMessage message) { Context context = getApplicationContext(); SharedPreferences prefs = context.getSharedPreferences("auth", Context.MODE_PRIVATE); boolean isLoggedIn = prefs.getBoolean("is_logged_in", false); String screenType = message.getCustomData().getString("screen"); boolean requiresAuth = message.getCustomData().getBoolean("requires_auth", false); if (requiresAuth && !isLoggedIn) { // Handle case where authentication is required but user is not logged in // For example, navigate to login screen or use default behavior // super.startActivityForPushMessage(message); } else { // Proceed with launching activity based on screenType or default behavior // ... (rest of the logic) ... } } ``` -------------------------------- ### GET /com.pushwoosh.inbox.ui/PushwooshInboxStyle/dateColor Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox-ui/com.pushwoosh.inbox.ui/-pushwoosh-inbox-style/date-color.html Retrieves or defines the color property for the date display in unread inbox messages. ```APIDOC ## GET /com.pushwoosh.inbox.ui/PushwooshInboxStyle/dateColor ### Description Retrieves the color configuration for the date text of unread messages within the Pushwoosh Inbox UI. ### Method GET ### Endpoint /com.pushwoosh.inbox.ui/PushwooshInboxStyle/dateColor ### Parameters #### Path Parameters - **None** ### Request Example N/A ### Response #### Success Response (200) - **dateColor** (Int?) - The color value for unread message dates. Defaults to Android's android.R.attr.textColorSecondary. #### Response Example { "dateColor": -16777216 } ``` -------------------------------- ### GET InboxMessage.isRead Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh-inbox/com.pushwoosh.inbox.data/-inbox-message/is-read.html Retrieves the read status of an inbox message within the Pushwoosh Android SDK. ```APIDOC ## GET InboxMessage.isRead ### Description Checks whether a specific inbox message has been marked as read by the user. ### Method GET ### Endpoint com.pushwoosh.inbox.data.InboxMessage.isRead() ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example N/A (Method call on InboxMessage object) ### Response #### Success Response (200) - **isRead** (Boolean) - Returns true if the message has been read, false otherwise. #### Response Example { "isRead": true } ``` -------------------------------- ### GET Rich Media Type Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.richmedia/-rich-media-manager/get-rich-media-type.html Retrieves the currently configured Rich Media display type from the RichMediaManager. ```APIDOC ## GET getRichMediaType ### Description Returns the current Rich Media display type configured in the SDK. The value is determined by priority: explicit set via setRichMediaType, value from AndroidManifest.xml, or the default value. ### Method GET ### Endpoint com.pushwoosh.richmedia.RichMediaManager.getRichMediaType() ### Parameters None ### Response #### Success Response (200) - **RichMediaType** (Enum) - The current display type (e.g., DEFAULT, IN_APP, BROWSER) #### Response Example { "richMediaType": "DEFAULT" } ``` -------------------------------- ### POST handleMessage Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.notification/-notification-service-extension/handle-message.html Internal method used by the SDK to process incoming push notification bundles. ```APIDOC ## POST handleMessage ### Description Internal method that handles incoming push notification messages. This is a final method called by the SDK when a push notification arrives; it processes the notification bundle and delegates to onMessageReceived for custom handling. ### Method POST (Internal SDK Method) ### Endpoint com.pushwoosh.notification.NotificationServiceExtension.handleMessage ### Parameters #### Path Parameters - **pushBundle** (Bundle) - Required - The push notification payload containing all notification data. ### Request Example { "pushBundle": { "title": "Hello", "message": "World", "custom_data": "..." } } ### Response #### Success Response (200) - **void** - The method performs internal processing and does not return a value directly. ### Response Example { "status": "processed" } ``` -------------------------------- ### GET summaryNotificationIconResId Source: https://github.com/pushwoosh/pushwoosh-android-sdk/blob/master/docs/pushwoosh/com.pushwoosh.notification/-summary-notification-factory/summary-notification-icon-res-id.html Retrieves the resource ID for the small icon used in summary notifications. ```APIDOC ## GET summaryNotificationIconResId ### Description Returns the small icon resource ID for the summary notification. This icon appears in the status bar and the notification itself for grouped notifications. ### Method GET ### Endpoint com.pushwoosh.notification.SummaryNotificationFactory.summaryNotificationIconResId() ### Parameters None ### Request Example N/A (Method call) ### Response #### Success Response (200) - **return** (Int) - The drawable resource ID for the summary notification icon. Returns -1 to use the default app notification icon. #### Response Example ```java // Use custom stack icon public int summaryNotificationIconResId() { return R.drawable.ic_notification_stack; } ``` ```