Michelle,

You cannot act on the ENDCALL event on application level.


There are multiple threads about this already

http://groups.google.com/group/android-platform/browse_thread/thread/c6e2de4b0cdbecd7/21b7cf4ee06a7005?lnk=raot&fwc=1
http://groups.google.com/group/android-framework/browse_thread/thread/ddc9b724f0aa4fce


--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Aug 6, 6:45 am, Michelle Cristina de Melo Silva <m...@cin.ufpe.br>
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 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