Cancelado

step counter

// Step 3: Implement [url removed, login to view] method

public void onSensorChanged(SensorEvent event) {

Sensor sensor = [url removed, login to view];

float[] values = [url removed, login to view];

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

int value = -1;

SharedPreferences setting = getSharedPreferences(PREFS_NAME,0);

DecimalFormat df = new DecimalFormat("#.###");

String myheight = [url removed, login to view]("Height","");

String myweight = [url removed, login to view]("Weight","");

double onestep = ( 0.0004734848484848485);//one step in mile

// Calorie calculations from equation: (METs x 3.5 x body weight in kg)/200 = calories/minute

double oneSetpCalPerOneKilo = 1.32352941;

// if user walk 1 mile and weight is 1 kg he/she will burn [url removed, login to view]

double calTest = [url removed, login to view](myweight);

double oneStepCalories = (oneSetpCalPerOneKilo*calTest)/(2112);

// 2112 steps in one mile if steps length is 30 inches

// if user weight is 70 kilogram and walk 1 mile 70*1.3252941 = 92.40 calories burn

// in one mile Total steps are 2112

if ([url removed, login to view] > 0) {

value = (int) values[0];

}

if ([url removed, login to view]() == Sensor.TYPE_STEP_COUNTER) {

[url removed, login to view]("" + value);

[url removed, login to view]("" + [url removed, login to view](onestep * value));

[url removed, login to view]("" + [url removed, login to view](oneStepCalories * value));

} else if ([url removed, login to view]() == Sensor.TYPE_STEP_DETECTOR) {

[url removed, login to view]("" + value);

[url removed, login to view]("" + [url removed, login to view](onestep * value));

[url removed, login to view]("" + [url removed, login to view](oneStepCalories * value));

}

startService(new Intent(this, [url removed, login to view]));

}

Habilidades: Android, Linux, Mobile App Development, PHP, Área de trabalho do Windows

Ver mais: df, calorie, remove shipping method step checkout virtuemart, counter strike name members, calories, step format, zencart payment method step, move shipping method step interspire, number counter strike players total, counter strike server check total players, counter strike player name, counter strike total players, counter strike players total players, counter strike total number players

Acerca do Empregador:
( 0 comentários ) United Kingdom

ID do Projeto: #6838577

1 freelancer está ofertando em média $20 para este trabalho

mobiletech1604

Hired by the Employer

$20 USD / hora
(76 Comentários)
7.1