Fitness specific status codes, for use in Status.getStatusCode()
Constant Summary
int | ACCESS_BLOCKED | Status code denoting that access is blocked due to violation of the Fit platform user data policy, //developers.google.com/terms/api-services-user-data-policy, or out of compliance with Google Fit APIs terms of services, //developers.google.com/fit/terms. |
int | AGGREGATION_NOT_SUPPORTED | Status code denotes that a read request specified an un-supported data type as input for aggregation. |
int | API_EXCEPTION | Status code denotes that an API call failed. |
int | APP_MISMATCH | Status code denotes that the app tried to insert data from the wrong app. |
int | APP_NOT_FIT_ENABLED | Status code denotes that an app was not found in the list of connected apps in Google Fit. |
int | CONFLICTING_DATA_TYPE | Status code denotes that the app attempted to insert a conflicting DataType, that is, there is an existing DataType with the same name and different fields. |
int | DATASET_TIMESTAMP_INCONSISTENT_WITH_UPDATE_TIME_RANGE | Status code denotes that app attempted to update data with new dataSet's timestamp outside of update request time range. |
int | DATA_SOURCE_NOT_FOUND | Status code denotes that there is no local datasource available to subscribe. |
int | DATA_TYPE_NOT_ALLOWED_FOR_API | Status code denotes that the data type provided isn't supported by this API call. |
int | DATA_TYPE_NOT_FOUND | Status code denotes that the requested data type was not found. |
int | DISABLED_BLUETOOTH | Status code denotes that Bluetooth is currently disabled. |
int | EQUIVALENT_SESSION_ENDED | Status code denotes that a session could not be started because an equivalent session has already ended. |
int | INCONSISTENT_DATA_TYPE | Status code denotes that the app attempted to insert a DataType whose name does not match the app's package name. |
int | INCONSISTENT_PACKAGE_NAME | Status code denotes that app attempted to insert data for a DataSource that does not match the app's package name. |
int | INVALID_ACTIVITY_TYPE | Status code denoting that the given API doesn't support the supplied activity type. |
int | INVALID_DATA_POINT | Status code denotes that the app attempted to add invalid data. |
int | INVALID_PERMISSION | Status code denotes that access to a requested data type was denied because the app has not been granted install/runtime permission. |
int | INVALID_SESSION_TIMESTAMPS | Status code denotes that the app attempted to add a session with start time later than end time. |
int | INVALID_TIMESTAMP | Status code denotes that the timestamp in the query is bad. |
int | MISSING_BLE_PERMISSION | This constant is deprecated. Operations that
require Manifest.permission.BLUETOOTH_ADMIN
will throw a SecurityException
if it's not granted. |
int | NEEDS_OAUTH_PERMISSIONS | Status code denotes that the request is missing desired OAuth permissions. |
int | REQUIRES_APP_WHITELISTING | Status code denotes that access to a requested data type was denied because the app has not been whitelisted by Google for access to that type. |
int | SUCCESS_ALREADY_SUBSCRIBED | The subscribe request succeeded, but the subscription already existed, so it was a no-op. |
int | SUCCESS_LISTENER_NOT_REGISTERED_FOR_FITNESS_DATA_UPDATES | The PendingIntent
sent by the client, to unregister itself from listening to changes to fitness store,
was not found in registered listeners listening to fitness store updates. |
int | SUCCESS_NO_CLAIMED_DEVICE | The unclaim request succeeded, but no matching claimed device was found. |
int | SUCCESS_NO_DATA_SOURCES | The subscribe request succeeded, but no data sources are currently available that match it. |
int | TRANSIENT_ERROR | Status code denotes that there was a transient error accessing Google Fit services. |
int | UNKNOWN_AUTH_ERROR | Status code denotes that an unknown error occurred while trying to obtain an OAuth token. |
int | UNSUPPORTED_ACCOUNT | Status code denotes that the account is not supported. |
int | UNSUPPORTED_PLATFORM | Status code denotes that the operation is not supported by Google Fit. |
Inherited Constant Summary
Public Constructor Summary
Inherited Method Summary
Constants
public static final int ACCESS_BLOCKED
Status code denoting that access is blocked due to violation of the Fit platform user data policy, //developers.google.com/terms/api-services-user-data-policy, or out of compliance with Google Fit APIs terms of services, //developers.google.com/fit/terms.
public static final int AGGREGATION_NOT_SUPPORTED
Status code denotes that a read request specified an un-supported data type as input for aggregation.
public static final int API_EXCEPTION
Status code denotes that an API call failed.
public static final int APP_MISMATCH
Status code denotes that the app tried to insert data from the wrong app.
public static final int APP_NOT_FIT_ENABLED
Status code denotes that an app was not found in the list of connected apps in Google Fit. Signifies that either access to the app was already revoked, or the app is not registered on the developer's console.
public static final int CONFLICTING_DATA_TYPE
Status code denotes that the app attempted to insert a conflicting DataType, that is, there is an existing DataType with the same name and different fields.
public static final int DATASET_TIMESTAMP_INCONSISTENT_WITH_UPDATE_TIME_RANGE
Status code denotes that app attempted to update data with new dataSet's timestamp outside of update request time range.
public static final int DATA_SOURCE_NOT_FOUND
Status code denotes that there is no local datasource available to subscribe.
public static final int DATA_TYPE_NOT_ALLOWED_FOR_API
Status code denotes that the data type provided isn't supported by this API call.
public static final int DATA_TYPE_NOT_FOUND
Status code denotes that the requested data type was not found.
public static final int DISABLED_BLUETOOTH
Status code denotes that Bluetooth is currently disabled.
public static final int EQUIVALENT_SESSION_ENDED
Status code denotes that a session could not be started because an equivalent session has already ended.
public static final int INCONSISTENT_DATA_TYPE
Status code denotes that the app attempted to insert a DataType whose name does not match the app's package name.
public static final int INCONSISTENT_PACKAGE_NAME
Status code denotes that app attempted to insert data for a DataSource that does not match the app's package name.
public static final int INVALID_ACTIVITY_TYPE
Status code denoting that the given API doesn't support the supplied activity type.
public static final int INVALID_DATA_POINT
Status code denotes that the app attempted to add invalid data.
public static final int INVALID_PERMISSION
Status code denotes that access to a requested data type was denied because the app has not been granted install/runtime permission.
public static final int INVALID_SESSION_TIMESTAMPS
Status code denotes that the app attempted to add a session with start time later than end time.
public static final int INVALID_TIMESTAMP
Status code denotes that the timestamp in the query is bad. This may be due to a bad time specified in the request or bad system time.
public static final int MISSING_BLE_PERMISSION
This constant is deprecated.
Operations that require Manifest.permission.BLUETOOTH_ADMIN
will throw a SecurityException
if it's not granted.
Status code denotes that the app is missing the required Bluetooth permissions.
public static final int NEEDS_OAUTH_PERMISSIONS
Status code denotes that the request is missing desired OAuth permissions.
If an app does not have the required OAuth access for a specific API request, the request will fail with this status code. When this occurs, apps can use the pending intent inside the status object to request the necessary access before retrying the request.
Sample usage when access is missing for a request:
PendingResult<Result> pendingResult = FitnessApi.readData(fitnessRequest); Result result = pendingResult.await(3L, TimeUnit.SECONDS); Status = result.getStatus(); if (!status.isSuccess()) { if (status.getStatusCode() == FitnessStatusCodes.NEEDS_OAUTH_PERMISSIONS) { status.startResolutionForResult( myActivity, MY_ACTIVITYS_AUTH_REQUEST_CODE); } }
public static final int REQUIRES_APP_WHITELISTING
Status code denotes that access to a requested data type was denied because the app has not been whitelisted by Google for access to that type.
public static final int SUCCESS_ALREADY_SUBSCRIBED
The subscribe request succeeded, but the subscription already existed, so it was a no-op.
public static final int SUCCESS_LISTENER_NOT_REGISTERED_FOR_FITNESS_DATA_UPDATES
The PendingIntent
sent by the client, to unregister itself from listening to changes to fitness store,
was not found in registered listeners listening to fitness store updates.
public static final int SUCCESS_NO_CLAIMED_DEVICE
The unclaim request succeeded, but no matching claimed device was found. No changes were made.
public static final int SUCCESS_NO_DATA_SOURCES
The subscribe request succeeded, but no data sources are currently available that match it. Recording of data will start when data sources become available.
public static final int TRANSIENT_ERROR
Status code denotes that there was a transient error accessing Google Fit services. Clients may retry.
public static final int UNKNOWN_AUTH_ERROR
Status code denotes that an unknown error occurred while trying to obtain an OAuth token.
public static final int UNSUPPORTED_ACCOUNT
Status code denotes that the account is not supported.
public static final int UNSUPPORTED_PLATFORM
Status code denotes that the operation is not supported by Google Fit.