Code example for ActivityRecognitionClient

Methods: requestActivityUpdates

0
 
    private void getActivityRecognition() { 
        LogUtils.i("start recoginition..."); 
        Intent intent = new Intent(getApplicationContext(), RecognitionIntentService.class);
        PendingIntent pendingIntent = PendingIntent.getService(getApplicationContext(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
        mActivityRecognitionClient.requestActivityUpdates(1000, pendingIntent);
    } 
} 
Experience pair programming with AI  Get Codota for Java