Code example for ActivityRecognitionClient

Methods: connect

0
        // If a request is not already underway 
        if (!mInProgress) {
            // Indicate that a request is in progress 
            mInProgress = true;
            // Request a connection to Location Services 
            mActivityRecognitionClient.connect();
        // 
        } else { 
            /* 
             * A request is already underway. You can handle 
             * this situation by disconnecting the client, 
             * re-setting the flag, and then re-trying the 
             * request. 
             */ 
        } 
    } 
      
     /** 
      * Turn off activity recognition updates 
      * 
      */