Code example for ActivityRecognitionClient

Methods: requestActivityUpdates

0
 
    class ActivityCallbacks implements GooglePlayServicesClient.ConnectionCallbacks {
 
        @Override 
        public void onConnected(Bundle arg0) {
            mActivityRecognitionClient.requestActivityUpdates(1000 * 60 * 5,
                    mActivityRecognitionPendingIntent);
        } 
 
        @Override 
        public void onDisconnected() { 
 
        } 
    } 
 
    @Override 
    protected void onStart() { 
        super.onStart(); 
        mLocationClient.connect();
    }