The end call key is not delivered to applications.

On Thu, Aug 6, 2009 at 1:37 PM, Michelle Cristina de Melo Silva <
[email protected]> wrote:

>   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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to