This interface was deprecated.
use
getSnapshotClient(Activity)
Deprecated entry point for the Awareness Snapshot API using GoogleApiClient
.
The methods must be used in conjunction with a GoogleApiClient
instance. For example:
new GoogleApiClient.Builder(context)
.addApi(Awareness.API)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build()
See Also
Public Method Summary
abstract PendingResult<BeaconStateResult> |
getBeaconState(GoogleApiClient
client, Collection<BeaconState.TypeFilter>
beaconTypes)
This method was deprecated. use
getBeaconState(BeaconState.TypeFilter...) .
|
abstract PendingResult<BeaconStateResult> |
getBeaconState(GoogleApiClient
client,
TypeFilter... beaconTypes)
This method was deprecated. use
getBeaconState(BeaconState.TypeFilter...) .
|
abstract PendingResult<DetectedActivityResult> | |
abstract PendingResult<HeadphoneStateResult> | |
abstract PendingResult<LocationResult> | |
abstract PendingResult<PlacesResult> | |
abstract PendingResult<TimeIntervalsResult> | |
abstract PendingResult<WeatherResult> |
Public Methods
public abstract PendingResult<BeaconStateResult> getBeaconState (GoogleApiClient client, Collection<BeaconState.TypeFilter> beaconTypes)
This method was deprecated.
use
getBeaconState(BeaconState.TypeFilter...)
.
Get the current information about nearby beacons. Note that beacon snapshots are
only available on devices running API level 18 or higher. If calling from a device
running API level 17 or earlier, getStatus()
will return status code
API_NOT_AVAILABLE
.
To use this method, your app must declare the
android.permission.ACCESS_FINE_LOCATION
permission in AndroidManifest.xml,
and the user must provide consent at runtime.
Parameters
client | A GoogleApiClient
instance. |
---|---|
beaconTypes | The types of beacon attachments to return. See Beacons for details about beacon attachments. |
Returns
- a
PendingResult
withBeaconStateResult
. Check the status viagetStatus()
to determine success or failure. If successful, usegetBeaconState()
to get data on the nearby beacons.
Throws
SecurityException | Thrown if a required permission is missing. |
---|
public abstract PendingResult<BeaconStateResult> getBeaconState (GoogleApiClient client, TypeFilter... beaconTypes)
This method was deprecated.
use
getBeaconState(BeaconState.TypeFilter...)
.
Get the current information about nearby beacons. Note that beacon snapshots are
only available on API level 18 or higher. If calling from a device prior to API level
18, getStatus()
will return status code
API_NOT_AVAILABLE
.
To use this method, your app must declare the
android.permission.ACCESS_FINE_LOCATION
permission in AndroidManifest.xml,
and the user must provide consent at runtime.
Parameters
client | A GoogleApiClient
instance. |
---|---|
beaconTypes | The types of beacon attachments to return. See Beacons for details about beacon attachments. |
Returns
- a
PendingResult
withBeaconStateResult
. Check the status viagetStatus()
to determine success or failure. If successful, usegetBeaconState()
to get data on the nearby beacons.
Throws
SecurityException | Thrown if a required permission is missing. |
---|
public abstract PendingResult<DetectedActivityResult> getDetectedActivity (GoogleApiClient client)
This method was deprecated.
use
getDetectedActivity()
.
Get the user's current activity (e.g., running, walking, biking, driving, etc.).
To use this method, your app must declare the
com.google.android.gms.permission.ACTIVITY_RECOGNITION
permission in
AndroidManifest.xml, and the user must provide consent at runtime.
Parameters
client | A GoogleApiClient
instance. |
---|
Returns
- a
PendingResult
withDetectedActivityResult
. Check the status viagetStatus()
to determine success or failure. If successful, then usegetActivityRecognitionResult()
to get the current activity.
Throws
SecurityException | Thrown if a required permission is missing. |
---|
public abstract PendingResult<HeadphoneStateResult> getHeadphoneState (GoogleApiClient client)
This method was deprecated.
use
getHeadphoneState()
.
Report whether headphones are plugged into the device.
Parameters
client | A GoogleApiClient
instance. |
---|
Returns
- a
PendingResult
withHeadphoneStateResult
. Check the status viagetStatus()
to determine success or failure. If successful, usegetHeadphoneState()
to get the current headphone state.
public abstract PendingResult<LocationResult> getLocation (GoogleApiClient client)
This method was deprecated.
use getLocation()
.
Get the device's current location (lat/lng).
To use this method, your app must declare the
android.permission.ACCESS_FINE_LOCATION
permission in
AndroidManifest.xml
, and the user must provide consent at runtime.
Parameters
client | A GoogleApiClient
instance. |
---|
Returns
- a
PendingResult
withLocationResult
. Check the status viagetStatus()
to determine success or failure. If successful, then usegetLocation()
to get the current device location.
Throws
SecurityException | Thrown if a required permission is missing. |
---|
public abstract PendingResult<PlacesResult> getPlaces (GoogleApiClient client)
This method was deprecated.
use getPlaces()
.
Get the device's current semantic location, or "place", which can include a name, place type, and address.
To use this method, your app must declare the
android.permission.ACCESS_FINE_LOCATION
permission in AndroidManifest.xml,
and the user must provide consent at runtime.
Parameters
client | A GoogleApiClient
instance. |
---|
Returns
- a
PendingResult
withPlacesResult
. Check the status viagetStatus()
to determine success or failure. If successful, then usegetPlaceLikelihoods()
to get the current place information.
Throws
SecurityException | Thrown if a required permission is missing. |
---|
public abstract PendingResult<TimeIntervalsResult> getTimeIntervals (GoogleApiClient client)
This method was deprecated.
use
getTimeIntervals()
.
Get the semantic time intervals for the to the current time and location. As
examples, some attributes are:
TIME_INTERVAL_MORNING
,
TIME_INTERVAL_AFTERNOON
,
TIME_INTERVAL_EVENING
,
TIME_INTERVAL_NIGHT
,
TIME_INTERVAL_WEEKDAY
,
TIME_INTERVAL_WEEKEND
,
TIME_INTERVAL_HOLIDAY
.
To use this method, your app must declare the
android.permission.ACCESS_FINE_LOCATION
permission in AndroidManifest.xml,
and the user must provide consent at runtime.
Parameters
client | A GoogleApiClient
instance. |
---|
Returns
- a
PendingResult
withTimeIntervalsResult
. Check the status viagetStatus()
to determine success or failure. If successful, then usegetTimeIntervals()
to get the attributes of the current day and time.
Throws
SecurityException | Thrown if a required permission is missing. |
---|
public abstract PendingResult<WeatherResult> getWeather (GoogleApiClient client)
This method was deprecated.
use getWeather()
.
Get the current weather conditions (temperature, feels-like temperature, dewpoint, humidity, etc.) at the current device location.
To use this method, your app must declare the
android.permission.ACCESS_FINE_LOCATION
permission in AndroidManifest.xml,
and the user must provide consent at runtime.
Parameters
client | A GoogleApiClient
instance. |
---|
Returns
- a
PendingResult
withWeatherResult
. Check the status viagetStatus()
to determine success or failure. If successful, then usegetWeather()
to get the current weather state.
Throws
SecurityException | Thrown if a required permission is missing. |
---|