Hi,

        i want to capture when user press the EndCall key in simulator, but
i think i'm doing something wrong cause nothing happens!
        My code is:

public class MakeACall extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent intent = new Intent(Intent.ACTION_CALL);
        intent.setData(Uri.parse("tel:99999999"));
        startActivity(intent);
        setContentView(R.layout.main);
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent ev) {
        switch(keyCode) {
            case KeyEvent.KEYCODE_ENDCALL:
                System.out.println("Terminou!!");
                break;
            default:
                return false;
        }
        return super.onKeyDown(keyCode, ev);
    }
}

   Can anybody help me?

[]s,
     Michelle.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to