3

I have a strange problem. To detect outgoing calls I have registered a broadcast receiver for android.intent.action.PHONE_STATE. When the state becomes OFFHOOK, then a conversation is started. It seems working on emulator: the debugger in fact reaches some code while it doesn't work on real device (Acer Liquid). Is it possible?
Which is a way to detect outgoing calls?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Matroska
  • 6,885
  • 14
  • 63
  • 99

1 Answers1

4

Well, if it works on the emulator, I would expect it to work on the device. You might registering a PhoneStateListener with the TelephonyManager via listen() and see if it gets you better results.

If you think of it, comment on this answer with the results of your testing.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • The problem was not to use static receiver or dynamic receiver. The problem was related to the android lifecycle. It should work in both ways. – Matroska Apr 21 '10 at 10:05