Skip to content

Latest commit

 

History

History
53 lines (44 loc) · 1.72 KB

File metadata and controls

53 lines (44 loc) · 1.72 KB

StepUp

StepUp is an Android application which basically tracks steps of users. We wanted to encourage people to excercise. Unlike other pedometer apps which track steps of users and convert those steps into calories, our app converts the foods that users eat into steps and calories.

Team members:

  • Hai Phan
  • Bang Nguyen
  • Tehetena Behailu

Screenshots

Features

  • Scan for bluetooth device
  • Add food
  • Show list of food
  • Count steps
  • Count calories
  • Track steps in the background
  • UI Design follows Material Design

##Code example: We used BMI160 Accelerometer sensor to detect steps.

bmi160AccModule.enableStepDetection();
bmi160AccModule.start();
bmi160AccModule.readStepCounter(false);

bmi160AccModule.routeData().fromStepDetection().stream("step_detector").commit()
    .onComplete(new AsyncOperation.CompletionHandler<RouteManager>() {
        @Override
        public void success(RouteManager result) {
            result.subscribe("step_detector", new RouteManager.MessageHandler() {
                @Override
                public void process(Message msg) {
                    stepsTaken++;
                    calculateStepsLeft();
                    calculateCaloriesLeft();
                    setStepCount();
                    setCaloriesCount();
                }
            });
        }
});

##References: