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

TextOngoingActivityStatus

public class TextOngoingActivityStatus
extends OngoingActivityStatus

java.lang.Object
   ↳ androidx.wear.ongoingactivity.OngoingActivityStatus
     ↳ androidx.wear.ongoingactivity.TextOngoingActivityStatus


OngoingActivityStatus representing a plain, static text.

Summary

Public constructors

TextOngoingActivityStatus(String str)

Public methods

boolean equals(Object o)
long getNextChangeTimeMillis(long fromTimeMillis)

See OngoingActivityStatus.getNextChangeTimeMillis(long)

CharSequence getText(Context context, long timeNowMillis)

See OngoingActivityStatus.getText(Context, long)

int hashCode()

Inherited methods

Public constructors

TextOngoingActivityStatus

public TextOngoingActivityStatus (String str)

Parameters
str String

Public methods

equals

public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getNextChangeTimeMillis

public long getNextChangeTimeMillis (long fromTimeMillis)

See OngoingActivityStatus.getNextChangeTimeMillis(long)

Parameters
fromTimeMillis long: current time, usually now as returned by SystemClock.elapsedRealtime(). In most cases getText and getNextChangeTimeMillis should be called with the exact same timestamp, so changes are not missed.

Returns
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

public CharSequence getText (Context context, 
                long timeNowMillis)

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 SystemClock.elapsedRealtime().

Returns
CharSequence

hashCode

public int hashCode ()

Returns
int