--- title: "Silent Push" slug: "silent-push" updated: 2024-12-10T13:22:30Z published: 2024-12-10T13:22:30Z canonical: "docs.mapp.com/silent-push" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Silent Push ## Overview Silent Push Notifications in Android allow developers to send notifications that do not alert the user. These notifications are typically used for background updates, such as syncing data, fetching new content, or triggering specific app actions without user intervention. ## Use Case 1. **Purpose**: - Deliver background updates to the app without interrupting the user. - Trigger app-specific actions like updating user preferences or syncing content. 2. **Benefits**: - Maintain user engagement by keeping the app updated. - Avoid disturbing users with unnecessary alerts. ## **Implementation Details** 1. **Silent Push Payload**: - Silent pushes require a specific payload with no notification content: ```json {    "to": "",    "data": {        "action": "update_content",        "content_id": "12345"    },    "content_available": true,    "priority": "high" } ``` - The `content_available` field is critical for silent notifications. 2. **Handle Silent Pushes**: - Implement a `BroadcastReceiver` to process silent push payloads: ```java public class SilentPushReceiver extends PushDataReceiver {    @Override    public void onSilentPush(PushData pushData) {        Log.d("SilentPush", "Silent push received: " + pushData);        String action = pushData.getCustomData("action");        if ("update_content".equals(action)) {            // Perform background update or sync            syncContent(pushData.getCustomData("content_id"));        }    }    private void syncContent(String contentId) {        // Add logic to fetch and sync content        Log.d("SilentPush", "Syncing content with ID: " + contentId);    } } ``` 3. **Configuration**: - Update `AndroidManifest.xml` to register the receiver: ```xml                         ``` > [!NOTE] > Keep in mind: > > - Silent pushes require `priority: high` to ensure they are delivered promptly. > - Test background processing across devices and Android versions to ensure reliability. > - Ensure the app handles silent pushes efficiently to avoid battery drain. ## Related - [Push Notifications](/push-notifications.md) - [Push Payload Details](/push-payload-details.md)