[android-developers] About Services

2009-09-02 Thread Michelle Cristina de Melo Silva
Hi,

   i wanna know if i can capture keys using Service.
   Best regards,
  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
-~--~~~~--~~--~--~---



[android-developers] Re: About Services

2009-09-02 Thread Michelle Cristina de Melo Silva
My problem is that i want to map a scenario to android, but i don't know how
to do. The first scenario is END CALL, i wanna measure how much time phone
takes to end a call, but is not possible to capture end call key into an
application. What should i do now?

[]s,
   Michelle.

2009/9/2 Mark Murphy mmur...@commonsware.com


 i wanna know if i can capture keys using Service.

 No, you cannot. Keys only go to the active activity and its widgets.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.html



 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Command

2009-09-02 Thread Michelle Cristina de Melo Silva
Hi,

Is there a command that i can access directly a key into an application?
I don't wanna capture when user press the key, i wanna access it without
press.
[]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
-~--~~~~--~~--~--~---



[android-developers] Capture EndCall key

2009-08-06 Thread Michelle Cristina de Melo Silva
  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:));
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
-~--~~~~--~~--~--~---



[android-developers] Capture key pressed

2009-08-06 Thread Michelle Cristina de Melo Silva
  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:));
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
-~--~~~~--~~--~--~---