Code example for AtomicInteger

Methods: addAndGet, get

0
	private final class StepsListener implements StepCounter.StepCounterListener { 
 
		@Override 
		public void onStepsCounted(int deltaStepCount) {
 
			stepsCount.addAndGet(deltaStepCount);
			 
			persistentStateEditor.putInt(PERSISTENT_SATE_STEPS_COUNT, stepsCount.get());
			persistentStateEditor.apply();
 
			broadcastStepCount(stepsCount.get());
			 
			Log.d(TAG, "onStepCounted: " + stepsCount.get());
		} 
		 
	} 
	 
	private final class AccelerometerListener implements SensorEventListener {
 
 
		@Override