Need to initialize this
on = (CheckBox) findViewById(R.id.checkBox1);
on above
if(o == 1){
on.setChecked(true);
czas.setEnabled(true);
}
Your view is not initialized and your are going to mark as checked
so there is nullpointerexception
occured.