Sample Notification
Last updated
Last updated
The example below shows how to create a notification that can be passed to SentianceOptions
. We use the androidx.core.app.NotificationCompat
class to build a notification suitable for both old and recent Android versions.
The notification channel, necessary for Android 8 and above, has the channel importance set to IMPORTANCE_LOW
, the minimum by Google for notifications used for running services.
You can quickly test the notification appearance by running a fresh app/SDK installation on an Android 8+ device. The notification will appear the first time the SDK starts automatic detections, or when you manually start a trip (more about this ).