So what I am trying to do is to make an alarm clock. I am having trouble getting the current time and get the timepicker's time to compare them. If you could help me out a bit just getting the timepicker's time and the current time in the same kind of measurement would be great.
Thanks a ton =) Here is my code:
public class AlarmlockActivity extends Activity implements OnClickListener {
TimePicker tp;
Button set;
long currentTime;
long alarmTime;
long alarmHourmil;
DigitalClock dc;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
tp = (TimePicker) findViewById(R.id.tpAlarmTime);
set = (Button) findViewById(R.id.bSet);
dc = (DigitalClock) findViewById(R.id.digitalClock1);
currentTime = System.currentTimeMillis();
set.setOnClickListener(this);
}
public void onClick(View v) {
switch(v.getId()){
case R.id.bSet:
break;
}
}
}