private final String TAG = getClass().getName();
- private AlertDialog swipeDialog;
private PendingIntent tagIntent;
@Override
Intent intent = getIntent();
setResult(RESULT_CANCELED);
- if (swipeDialog != null) {
- swipeDialog.dismiss();
- swipeDialog = null;
- }
int slot = intent.getIntExtra("slot", -1);
if (slot > 0) {
- swipeDialog = makeDialog();
- swipeDialog.show();
enableDispatch(slot);
}
}
super.onPause();
Log.v(TAG, "Finished the work");
- if(swipeDialog != null) {
- swipeDialog.dismiss();
- swipeDialog = null;
- }
disableDispatch();
}
finish();
}
- private AlertDialog makeDialog() {
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setTitle(R.string.challenging);
- builder.setMessage(R.string.swipe);
- builder.setOnCancelListener(
- new DialogInterface.OnCancelListener() {
- public void onCancel(DialogInterface dialog) {
- finish();
- }
- });
- return builder.create();
- }
-
/*
<receiver android:name=".IsoDepReceiver"
android:label="IsoDepReceiver">