Netmera Developer Guide
Netmera Docs
  • Netmera Developer Guide
  • Platforms
    • iOS
      • New iOS (Swift)
        • SDK Integration
        • Push Notifications
          • Delegate Methods
          • Widget and In-App Messages
          • Media Push
          • Carousel, Slider and Thumbnail Push
        • Live Activities
        • Deep Linking
          • Custom Deep Links
        • Sound & Vibration
        • Push Inbox
        • Events
        • Geofence & Location
        • User Attributes & Preferences
        • Advertising ID
        • Changelog
      • Former iOS (Objective-C)
        • SDK Integration
        • Push Notifications
          • Delegate Methods
          • Push Payload Receivers
          • Widget and In-App Messages
          • Customizing In-App Messages
          • Media Push
          • Carousel, Slider and Thumbnail Push
          • Custom Web View Presentation
          • Push Icon
        • Live Activities
        • Deep Linking
          • Custom Deep Links
        • Sound & Vibration
        • Push Inbox
        • Events
        • Geofence & Location
        • User Attributes & Preferences
        • Data Transfer
        • Advertising ID
        • SSL Pinning
        • Changelog
    • Android
      • SDK Integration
        • Huawei Integration
        • Huawei Message Receipt
        • Custom FCM and HMS Implementations
        • Android Integration FAQs
      • Push Notifications
        • Widget and In-App Messages
        • Push Callbacks
        • Custom Web View Presentation
        • Push Icon
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
        • Background Location Permission
      • User & Attributes
      • Data Transfer
      • Advertising ID
      • App Tracking
      • SSL Pinning
      • Changelog
    • Web
      • SDK Setup
        • Self-Hosted SDK Setup
      • Mobile Web Push for iOS
      • Deep Linking
        • Custom Deep Links
      • Events
      • User & Attributes
    • React Native
      • SDK Integration
      • Push Notifications
        • Widget and In-App Messages
        • Push Callbacks
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
      • User & Attributes
      • Changelog
    • Flutter
      • SDK Integration
        • Custom FCM and HMS Implementations
      • Push Notifications
        • Push Notification Permissions
        • Widget and In-App Messages
        • Flutter iOS Media Push
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
      • User & Attributes
      • SSL Pinning
      • Changelog
    • Cordova
      • SDK Integration
      • Push Notifications
      • Sound & Vibration
      • Push Inbox
      • Events
      • User & Attributes
    • Unity
      • SDK Integration
      • Sound & Vibration
      • Events
      • User & Attributes
      • Changelog
  • Integrated Modules
    • Optimove
    • Adjust
    • Mixpanel
    • IYS Integration
    • VIA Integration
      • Short URL Consent Requests
      • OTP Consent Requests
        • OTP Confirmation Completion
      • VIA Email Rejection Link Generation
      • ETK Rejection via SMS
  • API Documentation
    • REST API
      • Setup
      • Notifications
      • Events
      • User & Device Management
      • Inbox Feature
      • GDPR
      • Error Responses
  • FAQs
    • Push Notifications FAQs
Powered by GitBook
On this page
  • Pop-up and In-App Message Presentation Behavior
  • Enable / Disable Immediate Presentations
  • Customizing Styles Using themes.xml
  • Storing Disabled Pop-ups
  • Troubleshooting

Was this helpful?

  1. Platforms
  2. Android
  3. Push Notifications

Widget and In-App Messages

Pop-up and In-App Message Presentation Behavior

All push notifications in Netmera work automatically—no additional coding is required. However, you can customize pop-up presentations and listen to push callbacks.

By default, when a popup notification or in-app message is received:

  • If the app is in the foreground, the SDK displays pop-up notifications and in-app messages immediately.

  • If the app is in the background, the SDK shows them when the app returns to the foreground.

In-App Messages

  • Requires Netmera SDK 3.4.0 or higher.

Enable / Disable Immediate Presentations

To prevent immediate pop-up presentation (e.g., during video playback, gaming, or checkout), use:

Netmera.disablePopupPresentation();

To re-enable pop-ups, use:

Netmera.enablePopupPresentation();

This should be called in the MainActivity class, not in Splash or App classes.

Customizing Styles Using themes.xml

You can customize the appearance of in-app messages using the attributes defined in the themes.xml file.

<!-- Custom in-app message style -->
<style name="NetmeraInAppMessageStyle">
    
    <!-- In-app message view width in ratio -->
    <item name="inAppMessageWidth">@integer/netmera_default_vertical_width</item>
    
    <!-- In-app message view height in ratio -->
    <item name="inAppMessageHeight">@integer/netmera_default_vertical_height</item>
    
    <!-- In-app message view weight in ratio -->
    <item name="inAppMessageWeight">@integer/netmera_default_vertical_weight</item>
    
    <!-- In-app message view background color -->
    <item name="inAppMessageBackground">@drawable/netmera_bg_in_app_message</item>
    
    <!-- In-app message cancel button image -->
    <item name="inAppMessageCancelButtonDrawable">@drawable/netmera_ic_action_cancel</item>
    
    <!-- In-app message title size -->
    <item name="android:textSize">@dimen/netmera_text_default_size</item>
    
    <!-- In-app message title color -->
    <item name="android:textColor">@color/primary_text_light</item>
    
    <!-- In-app message text size -->
    <item name="inAppMessageTextSize">@dimen/netmera_text_default_size</item>
    
    <!-- In-app message text color -->
    <item name="inAppMessageTextColor">@color/primary_text_light</item>
    
    <!-- In-app message font -->
    <item name="android:fontFamily">@font/custom_font</item>
    
</style>

Storing Disabled Pop-ups

If pop-ups are disabled, the SDK stores the latest notification and presents it when pop-ups are re-enabled. Older notifications are not stored.

Troubleshooting

If you experience issues with pop-ups or in-app messages, please review the cases below:

  1. Increase Session Duration

  • Go to Developer > App Info > App Config.

  • Increase Session Expire Interval by 1.

  • Click Apply and retry.

  1. Review Code for False Values

Make sure no other part of your code disables pop-ups.

  1. Check Third-Party Integrations

Ensure Netmera is initialized at the top of your project.

  1. Check Multiple Pop-Ups

If too many pop-ups trigger at once, they may not load correctly.

  1. Consider Low Device Storage

If storage is nearly full, pop-ups may fail to display.

PreviousPush NotificationsNextPush Callbacks

Last updated 3 months ago

Was this helpful?