Enable/Disable Widget and In App Messages
All types of push notifications in Netmera work automatically:
All types of push notifications in Netmera work automatically without requiring any additional implementation. In other words, you don't need to code anything to make them function. However, you have the ability to customize the presentation of pop-up notifications and listen to related push callbacks.
When the Netmera SDK receives a popup notification or an in-app message, it immediately displays the corresponding web view content if the application is in the foreground state. If the application is in the background state when a pop-up is received, the SDK presents the web view content when the application comes back to the foreground state.
Enable / Disable Pop-ups
To disable the immediate presentation behavior, such as when users are watching a video, playing a game level, or about to complete an order, you can call the disablePopupPresentation()
method on the MainActivity
class (not Splash and App classes). Likewise, you can call the enablePopupPresentation()
method to re-enable the immediate popup presentation.
To use in-app messages, you need to integrate the Netmera SDK version 3.4.0 or higher.
You can customize the appearance of in-app messages using the attributes defined in the
themes.xml
file.
Storing and Presenting Disabled Popups
If a pop-up notification is received while popup presentation is disabled through your code, the SDK stores it and presents it whenever pop-up presentation is re-enabled. If multiple pop-up notifications are received during that period, the SDK only stores and presents the most recent notification.
Troubleshooting
Widget / In App Issues
If you are experiencing difficulties in receiving popups, please follow these troubleshooting steps:
Increase Session Duration:
Navigate to the initial panel.
Under Developer > App Info find the App Config section.
Increase the value in the 'Session Expire Interval' field by 1.
Click the 'Apply' button to save the changes.
Retry the popup.
Check Internet Connection:
Verify your device's internet connection to ensure it is stable.
Check for Other False Settings:
Examine your project to ensure that no other parts of your code are setting values to 'false' that might affect popup functionality.
Check for Third-Party Tool Integration:
Ensure that Netmera is initialized at the top of your project if any third-party tools are integrated.
Additional Warnings
Multiple Concurrent Popups:
If multiple popups are set to display simultaneously, it may lead to issues with popup loading.
Low Device Storage:
Note that if the device's storage is nearly full, popups may not load correctly.
These troubleshooting steps should help you diagnose and resolve any issues related to popup functionality.
Last updated