public interface ZendriveNotificationProvider
Zendrive.setup(android.content.Context, com.zendrive.sdk.ZendriveConfiguration, java.lang.Class<? extends com.zendrive.sdk.ZendriveBroadcastReceiver>, java.lang.Class<? extends com.zendrive.sdk.ZendriveNotificationProvider>, com.zendrive.sdk.ZendriveOperationCallback)
method.
The implementing subclass must provide a default constructor.
This class should only construct and return notifications required by the Zendrive SDK. It should not do any computationally intensive work as doing so may result in an ANR.
The SDK uses this class to fetch ZendriveNotificationContainer
objects that contain
notifications that are displayed when the SDK goes into foreground mode.
Modifier and Type | Method and Description |
---|---|
ZendriveNotificationContainer |
getInDriveNotificationContainer(android.content.Context context)
Fetches a notification that is displayed when the SDK detects that the user is driving.
|
ZendriveNotificationContainer |
getMaybeInDriveNotificationContainer(android.content.Context context)
Fetches a notification that is displayed when the SDK detects a possible drive.
|
@NonNull ZendriveNotificationContainer getMaybeInDriveNotificationContainer(@NonNull android.content.Context context)
This method is only called on devices running Android O.
This notification may be displayed up multiple times. The application should use setOnlyAlertOnce(boolean) while building the notification to ensure the user is alerted only once.
context
- The context used to construct the notification.ZendriveNotificationContainer
object that contains the notification to be
displayed.@NonNull ZendriveNotificationContainer getInDriveNotificationContainer(@NonNull android.content.Context context)
This notification may be displayed multiple times. The application should use setOnlyAlertOnce(boolean) while building the notification to ensure the user is alerted only once.
context
- The context used to construct the notification.ZendriveNotificationContainer
object that contains the notification to be
displayed.