I'd like to use the Google Fit Sensors API to read Sensor data from an Android device. However, I don't want to require that the user have an internet connection to enable it.
From my testing, it appears that any time you want to do anything with Sensors, you must have a connected instance of a GoogleApiClient.
public abstract PendingResult<DataSourcesResult> findDataSources (GoogleApiClient client, DataSourcesRequest request)
When I authenticate with a connected GoogleApiClient, I was then able to kill my internet connection and continue to receive sensor data. However, after some period of time, I was no longer able to receive sensor data unless I reconnected my GoogleApiClient (turned data back on). I have a use case where access to data cannot be guaranteed.
Is there a way to use the Sensors API reliably, but without an internet connection?