import android.content.DialogInterface;
import android.util.Log;
import android.view.View;
-import android.widget.TextView;
import android.widget.RadioButton;
-import org.average.nfcauthcr.Check;
+import org.average.nfcauthcr.QueryCrToken;
public class Enroll extends Activity {
if (btn != null) btn.setChecked(true);
}
- @Override
- protected void onPause() {
- super.onPause();
- Log.v(TAG, "Going inactive, try to stop");
- if (!waitingForResult) { finish(); }
- }
-
- @Override
- protected void onStop() {
- super.onStop();
- Log.v(TAG, "Stop requested");
- }
-
public void onSlotSelectionClicked(View view) {
Log.v(TAG, "Radio Button selected");
if (! ((RadioButton) view).isChecked()) return;
byte[] challenge = new byte[63];
rng.nextBytes(challenge);
Log.v(TAG, "Random challenge: " + hex(challenge));
- Log.v(TAG, "Launching challenging activity");
- Intent crIntent = new Intent(this, Check.class);
- crIntent.putExtra("slot", slot);
+ Intent crIntent = new Intent(this, QueryCrToken.class);
crIntent.putExtra("challenge", challenge);
- this.startActivityForResult(crIntent, 0);
waitingForResult = true;
+ this.startActivityForResult(crIntent, 0);
}
private String hex(byte[] a) {