Android Google Awarness APIs suggest change

Get current user activity using Snapshot API

For one-time, non-constant requests for a user’s physical activity, use the Snapshot API:

// Remember to initialize your client as described in the Remarks section
    .setResultCallback(new ResultCallback<DetectedActivityResult>() {
        public void onResult(@NonNull DetectedActivityResult detectedActivityResult) {
            if (!detectedActivityResult.getStatus().isSuccess()) {
                Log.e(getClass().getSimpleName(), "Could not get the current activity.");
            ActivityRecognitionResult result = detectedActivityResult
            DetectedActivity probableActivity = result.getMostProbableActivity();
            Log.i(getClass().getSimpleName(), "Activity received : " + 

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents