I am having a bit of trouble understanding how to continually check for PhoneStateChanged. I am trying to make myself an app that if I call myself from a specific number even if my phone is set to vibrate it will ring.
Originally I had attempted this functionality using http://www.b4x.com/android/forum/threads/phonestatelistener.12377/#post69524 however it seems the same functionality can be had via the PhoneStateChanged functionality. My issue is that I can check the phone state with a button press, but I would like the phone to always be listening to a state change if the app is running.
Would I need to use a listener and continually invoke PhoneStateChanged if RINGING ? I also searched and found some threads on listeners but I'm not sure I understand what I'm trying to do yet.
Originally I had attempted this functionality using http://www.b4x.com/android/forum/threads/phonestatelistener.12377/#post69524 however it seems the same functionality can be had via the PhoneStateChanged functionality. My issue is that I can check the phone state with a button press, but I would like the phone to always be listening to a state change if the app is running.
Would I need to use a listener and continually invoke PhoneStateChanged if RINGING ? I also searched and found some threads on listeners but I'm not sure I understand what I'm trying to do yet.