# 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: `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_MORNING`, `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_AFTERNOON`, `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_EVENING`, `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_NIGHT`, `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_WEEKDAY`, `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_WEEKEND`, `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_HOLIDAY`.

### Public Method Summary

|---|---|
| abstract int\[\] | [getTimeIntervals](https://developers.google.com/android/reference/com/google/android/gms/awareness/state/TimeIntervals#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](https://developers.google.com/android/reference/com/google/android/gms/awareness/state/TimeIntervals#hasTimeInterval(int))(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

- the int constants corresponding to all the semantic time interval labels that are applicable for the current time and device locale. Valid time interval labels are: `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_MORNING`, `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_AFTERNOON`, `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_EVENING`, `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_NIGHT`, `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_WEEKDAY`, `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_WEEKEND`, `https://developers.google.com/android/reference/com/google/android/gms/awareness/fence/TimeFence#TIME_INTERVAL_HOLIDAY`.

#### 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.