ServiceNotificationConfig

open class ServiceNotificationConfig

Allows you to configure HyperTrack service notification properties. See FAQ for an explanation. Default behavior is to present notification with "your-app-name is running" title and body with icon that is identical to your app's icon. Tap on that notification is identical to starting app from launcher (it will call "android.intent.action.MAIN" action). Your can either modify that behaviour completely, using ServiceNotificationConfig with required parameters, or use ServiceNotificationConfig.Builder to override some of them, e.g.:


        HyperTrack sdk = HyperTrack.getInstance(this, myPublishableKey);


        ServiceNotificationConfig config = new ServiceNotificationConfig.Builder()
                .setContentText("Tap to stop tracking")
                .build();

        sdk.setTrackingNotificationConfig(config);
    
Check out ServiceNotificationConfig.Builder setters for details.

Constructors

Link copied to clipboard
open fun ServiceNotificationConfig(    @Nullable title: String,     @Nullable body: String,     @DrawableRes smallIconResId: Int,     @DrawableRes bigIconResId: Int,     @Nullable ignored: PendingIntent)

Types

Link copied to clipboard
open class Builder

Functions

Link copied to clipboard
open fun toString(): String

Properties

Link copied to clipboard
val bigIconResId: Int
Link copied to clipboard
val body: String
Link copied to clipboard
val clickActionPendingIntent: PendingIntent
Link copied to clipboard
val NOTIFICATION_ICON_NO_VALUE: Int
Link copied to clipboard
val smallIconResId: Int
Link copied to clipboard
val title: String