Code example for ActivityRecognitionClient

0
         * new clients. 
         * 
         */ 
        if (mActivityRecognitionClient == null) {
            // Create a new one 
            setActivityRecognitionClient(new ActivityRecognitionClient(mContext, this, this));
        } 
        return mActivityRecognitionClient;
    } 
 
    /** 
     * Get a activity recognition client and disconnect from Location Services 
     */ 
    private void requestDisconnection() { 
 
        // Disconnect the client 
        getActivityRecognitionClient().disconnect();
 
        // Set the client to null 
        setActivityRecognitionClient(null); 
Connect your IDE to all the code out there  Get Codota for Java