Ongoing Notifications on Android
With each new Android version it becomes increasingly hard to get background execution time. This is specially noticeable in the latest versions of Android when requesting for network activity while the app is in the background. Considering the facts mentioned above and the nature of our SDK, at Plot Projects we research and devise solutions that help us minimize the effect of these restrictions on the overall performance of the product.
The latest Plot Projects 3.X SDK was developed to reduce the dependence to an internet connection, as it does not require constant network activity for the triggering or refreshing of campaigns. However to send newly created/edited campaigns to the device and to share statistics, a periodic update is required and those fail more often nowadays due to the Android's strict restrictions.
This situation can be countered by using a ongoing notification, commonly known as Foreground Service. This notification is shown only when updating campaigns in the background, as Android recognizes it as foreground execution and doesn't block the network activity. This process takes a few seconds and will only occur 1-2 times a day. By default this notification shows the icon, the name of the app and a short description. The default description is "Updating app content…", but that text can be altered in the config file. The figure below portrays an example manifestation of this feature.
This feature is available and enabled by default from the SDK's 3.3.0 release. Note that disabling this feature can affect the performance and efficiency of the product.
You can read more about this feature in the chapter regarding the Config File. Where you'll find how to disable this feature or define the message displayed in the notification. Optionally, you can also use the Config Hook to set these properties.