TimeIntervals

public interface TimeIntervals

This interface is deprecated.
The Awareness API is deprecated and will be turned down in a future Google Play services release, as early as January 2027. There is no direct replacement.

The semantic time intervals for the to the current time and location. Some examples of time intervals are: TimeFence.TIME_INTERVAL_MORNING, TimeFence.TIME_INTERVAL_AFTERNOON, TimeFence.TIME_INTERVAL_EVENING, TimeFence.TIME_INTERVAL_NIGHT, TimeFence.TIME_INTERVAL_WEEKDAY, TimeFence.TIME_INTERVAL_WEEKEND, TimeFence.TIME_INTERVAL_HOLIDAY.

Public Method Summary

abstract int[]
getTimeIntervals()
This method is deprecated. The Awareness API is deprecated and will be turned down in a future Google Play services release, as early as January 2027. There is no direct replacement.
abstract boolean
hasTimeInterval(int desiredTimeInterval)
This method is deprecated. The Awareness API is deprecated and will be turned down in a future Google Play services release, as early as January 2027. There is no direct replacement.

Public Methods

public abstract int[] getTimeIntervals ()

This method is deprecated.
The Awareness API is deprecated and will be turned down in a future Google Play services release, as early as January 2027. There is no direct replacement.

Get the semantic time intervals for the to the current time and location.

Returns

public abstract boolean hasTimeInterval (int desiredTimeInterval)

This method is deprecated.
The Awareness API is deprecated and will be turned down in a future Google Play services release, as early as January 2027. There is no direct replacement.

Returns true if the given semantic time interval is applicable to the current time and locale

Parameters
desiredTimeInterval is the desired time interval label.
Returns
  • true if the label is applicable to the current time and locale.