package net.yaht.m.iintent;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;

public class Ask extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_ask);

        // What came to us?
        Intent intent = getIntent();
        Uri data = intent.getData();

    }

    public void _btn_a(View v) {

        Intent result = new Intent();
        result.putExtra("ans", "A");
        setResult(Activity.RESULT_OK, result);
        finish();

    }

    public void _btn_b(View v) {

        Intent result = new Intent();
        result.putExtra("ans", "B");
        setResult(Activity.RESULT_OK, result);
        finish();

    }

    public void _btn_c(View v) {

        Intent result = new Intent();

        // || RESULT_CANCEL
        result.putExtra("ans", "C");
        setResult(Activity.RESULT_OK, result);
        finish();

    }

}