-
public class Message.BuilderBuilder class for Notification Message.
When instantiating a builder it must be called with a unique identifier (package unique) inthe constructor, see Builder
-
-
Constructor Summary
Constructors Constructor Description Message.Builder(int id)Instantiates a new Builder.
-
Method Summary
Modifier and Type Method Description Message.Builderlevel(int level)Level builder. Message.Builderpriority(int priority)Priority builder. Message.Buildertimeout(int timeout)Timeout builder. Message.Buildertitle(@NonNull() String title)Title builder. Message.Buildersummary(@NonNull() String summary)Summary builder. Message.BuilderdetailedDescription(@NonNull() String detailedDescription)Detailed description builder. Message.BuilderdtcId(@NonNull() String dtcId)Dtc id builder. Message.Builderaction(@Nullable() PendingIntent action)Action builder. Message.BuilderactionName(@NonNull() String actionName)Action name builder. Message.Buildericon(int iconResId)Icon builder. Message.Buildercategory(String category)Category builder. Message.BuilderhideHeadsUp()Hide heads-up notificationDisables heads-up for this message.Default is to show message as heads-up. Message.Builderaudio(int audioResId)Messagebuild()Build notification message. -
-
Method Detail
-
level
@NonNull() Message.Builder level(int level)
Level builder.
Uses LEVEL_INFO if not set with the builder.
- Parameters:
level- See Severity.
-
priority
@NonNull() Message.Builder priority(int priority)
Priority builder.
Uses PRIORITY_NONE if not set with the builder.
- Parameters:
priority- Predefined priorities can be used, see PRIORITY_NONE,PRIORITY_LOW, PRIORITY_MEDIUM and PRIORITY_HIGH.
-
timeout
@NonNull() Message.Builder timeout(int timeout)
Timeout builder.
Uses NO_TIMEOUT if not set with the builder.
- Parameters:
timeout- Predefined timeouts can be used, see NO_TIMEOUT,TIMEOUT_SHORT, TIMEOUT_MEDIUM, TIMEOUT_LONG andTIMEOUT_EXTRA_LONG.
-
title
@NonNull() Message.Builder title(@NonNull() String title)
Title builder.
Uses an empty string if not set with the builder.
- Parameters:
title- the title of the message.
-
summary
@NonNull() Message.Builder summary(@NonNull() String summary)
Summary builder.
Uses an empty string if not set with the builder.
- Parameters:
summary- the summary text of the message.
-
detailedDescription
@NonNull() Message.Builder detailedDescription(@NonNull() String detailedDescription)
Detailed description builder.
The description will not be shown in the notification. It is only shown in the detailedactivity of the message. See also action.
Uses an empty string if not set with the builder.
- Parameters:
detailedDescription- the detailed description of the message.
-
dtcId
@NonNull() Message.Builder dtcId(@NonNull() String dtcId)
Dtc id builder. If a Diagnostic Trouble Code needs to be set a dtcId must beprovided.
The dtcId corresponds with the ISO 15031-6 DTC Identifier. To get thecorrect identifier ask your Volvo contact for documentation.
If not set with the builder or empty string is provided no Diagnostic Trouble Code willbe activated.
Apart from triggering a DTC, the string is shown in the detailed activity of the message.
- Parameters:
dtcId- the dtc id according to ISO 15031-6 DTC identifier.
-
action
@NonNull() Message.Builder action(@Nullable() PendingIntent action)
Action builder.
Action that is to be performed if the user presses the message notification. The actionis set via a PendingIntent. The action may be null. See also android.app.PendingIntent.A detailed activity with more details with respect to the message will beshown if no action is set with the builder or if the action is set as null.
- Parameters:
action- the action as a PendingIntent or null
-
actionName
@NonNull() Message.Builder actionName(@NonNull() String actionName)
Action name builder.
Human readable name of the Action that is to be performed if the user presses the messagenotification. The action name may be null. See also action.
- Parameters:
actionName- Name of the action
-
icon
@NonNull() Message.Builder icon(int iconResId)
Icon builder.
Icon shows in HuN and detailed view. Will show default icon if no icon is added.
- Parameters:
iconResId- Resource id of icon drawable
-
category
@NonNull() Message.Builder category(String category)
Category builder.
Uses APP_SYS_NOTIFICATION if not set with the builder.
- Parameters:
category- Predefined categories should be used, see APP_SYS_NOTIFICATION andMACHINE_NOTIFICATION.
-
hideHeadsUp
Message.Builder hideHeadsUp()
Hide heads-up notification
Disables heads-up for this message.Default is to show message as heads-up.
-
audio
@NonNull() Message.Builder audio(int audioResId)
-
-
-
-