@Document.BuilderProducer
public final class Alarm.Builder extends Alarm.BuilderBase


Builder for Alarm.

Summary

Public constructors

Constructor with all the existing values.

Builder(@NonNull String namespace, @NonNull String id)

Constructor for Alarm.Builder.

Inherited methods

From androidx.appsearch.builtintypes.Alarm.BuilderBase
@NonNull Alarm

Builds the Alarm.

@NonNull T
setBlackoutPeriodEndDate(@Nullable String blackoutPeriodEndDate)

Sets the end time for the blackout period in ISO 8601 format.

@NonNull T
setBlackoutPeriodStartDate(@Nullable String blackoutPeriodStartDate)

Sets the start date for the blackout period in ISO 8601 format.

@NonNull T
setDaysOfWeek(
    @IntRange(from = Calendar.SUNDAY, to = Calendar.SATURDAY) @Nullable int[] daysOfWeek
)

Sets the scheduled days for repeating.

@NonNull T
setEnabled(boolean enabled)

Sets whether or not the Alarm is active.

@NonNull T
setHour(@IntRange(from = 0, to = 23) int hour)

Sets the hour the Alarm will fire.

@NonNull T
setMinute(@IntRange(from = 0, to = 59) int minute)

Sets the minute the Alarm will fire.

@NonNull T

Sets the next AlarmInstance.

@NonNull T
setOriginatingDevice(int originatingDevice)

Sets the OriginatingDevice this alarm belongs to.

@NonNull T

Sets the previous AlarmInstance.

@NonNull T

Sets the content URI for the ringtone to be played, or VALUE_RINGTONE_SILENT if no ringtone will be played.

@NonNull T
setShouldVibrate(boolean shouldVibrate)

Sets whether or not to activate the device vibrator when the Alarm fires.

From androidx.appsearch.builtintypes.Thing.BuilderBase
@NonNull T

Adds an alias for the item.

@NonNull T

Add a new action to the list of potential actions for this document.

@NonNull Thing

Builds a Thing object.

@NonNull T

Clears the aliases, if any, for the item.

@NonNull T

Clear all the potential actions for this document.

void

If built, make a copy of previous data for every field so that the builder can be reused.

@NonNull T

Sets a list of aliases for the item.

@NonNull T
setCreationTimestampMillis(long creationTimestampMillis)

Sets the creation timestamp for the current AppSearch entity, in milliseconds using the currentTimeMillis time base.

@NonNull T

Sets the description for the item.

@NonNull T
setDocumentScore(int documentScore)

Sets the user-provided opaque document score of the current AppSearch document, which can be used for ranking using RANKING_STRATEGY_DOCUMENT_SCORE.

@NonNull T
setDocumentTtlMillis(long documentTtlMillis)

Sets the time-to-live (TTL) for the current AppSearch document as a duration in milliseconds.

@NonNull T

Sets the URL for an image of the item.

@NonNull T

Sets the name of the item.

@NonNull T

Sets a list of potential actions for this document.

@NonNull T

Sets the deeplink URL of the item.

Public constructors

Builder

Added in 1.1.0
public Builder(@NonNull Alarm alarm)

Constructor with all the existing values.

Builder

Added in 1.1.0
public Builder(@NonNull String namespace, @NonNull String id)

Constructor for Alarm.Builder.

Parameters
@NonNull String namespace

Namespace for the Document. See Document.Namespace.

@NonNull String id

Unique identifier for the Document. See Document.Id.