Google is committed to advancing racial equity for Black communities. See how.

TextOngoingActivityStatus

open class TextOngoingActivityStatus : OngoingActivityStatus
kotlin.Any
   ↳ androidx.wear.ongoingactivity.OngoingActivityStatus
   ↳ androidx.wear.ongoingactivity.TextOngoingActivityStatus

OngoingActivityStatus representing a plain, static text.

Summary

Public constructors
<init>(@NonNull str: String)

Public methods
open Boolean
equals(other: Any?)

open Long
getNextChangeTimeMillis(fromTimeMillis: Long)

See OngoingActivityStatus#getNextChangeTimeMillis(long)

open CharSequence
getText(@NonNull context: Context, timeNowMillis: Long)

See OngoingActivityStatus#getText(Context, long)

open Int

Public constructors

<init>

TextOngoingActivityStatus(@NonNull str: String)

Public methods

equals

open fun equals(other: Any?): Boolean

getNextChangeTimeMillis

open fun getNextChangeTimeMillis(fromTimeMillis: Long): Long

See OngoingActivityStatus#getNextChangeTimeMillis(long)

Parameters
fromTimeMillis Long: current time, usually now as returned by android.os.SystemClock#elapsedRealtime(). In most cases getText and getNextChangeTimeMillis should be called with the exact same timestamp, so changes are not missed.
Return
Long the first point in time after fromTimeMillis when the displayed value of this status will change. returns Long.MAX_VALUE if the display will never change.

getText

@NonNull open fun getText(
    @NonNull context: Context,
    timeNowMillis: Long
): CharSequence

See OngoingActivityStatus#getText(Context, long)

Parameters
context Context: may be used for internationalization. Only used while this method executed.
timeNowMillis Long: the timestamp of the time we want to display, usually now, as returned by android.os.SystemClock#elapsedRealtime().

hashCode

open fun hashCode(): Int