Code example for ActivityRecognitionClient

Methods: disconnectremoveActivityUpdates

0
            mActivityRecognitionClient.requestActivityUpdates(
                    DETECTION_INTERVAL_MILLISECONDS,
                    mActivityRecognitionPendingIntent);
            break; 
		case STOP:
			mActivityRecognitionClient.removeActivityUpdates(
                    mActivityRecognitionPendingIntent);
			break; 
		default: 
			break; 
 
    } 
 
        /* 
         * Since the preceding call is synchronous, turn off the 
         * in progress flag and disconnect the client 
         */ 
        mInProgress = false;
        mActivityRecognitionClient.disconnect();
    } 
 
    /* 
     * Called by Location Services once the activity recognition 
     * client is disconnected. 
Contextual code suggestions in your IDE  Get Codota for Java