I want to be able to answer the phone by blowing into the mic, so that I can keep my hands on the handles while riding my bike and a call comes in. Surely this has to be one of the easiest apps to write (no more than a few lines of code), I just need to know which is the phone-class, then I can use e.g. call.answer(). (I think I'm already making some headway in finding out how to detect blowing into the mic - or making any random noise for that matter)
Edit:
android.telephony.TelephonyManager seems not to be exactly what I want: it's a monitoring-class, which tells you if the phone's ringing, or offhook (My Hero is deficient here; no hooks anywhere; should I've nought some as after-market?). What I want is:
If mic.blowingsound==true
{ phone.pickup(); }
Maybe also verify if
TelephonyManager=CALL_STATE_RINGING before I set CALL_STATE_OFFHOOK=true
Pardon the bogus pseudocode pls. Sadly, set CALL_STATE_OFFHOOK=true is impossible using android.telephony.TelephonyManager.
Edit:
android.telephony.TelephonyManager seems not to be exactly what I want: it's a monitoring-class, which tells you if the phone's ringing, or offhook (My Hero is deficient here; no hooks anywhere; should I've nought some as after-market?). What I want is:
If mic.blowingsound==true
{ phone.pickup(); }
Maybe also verify if
TelephonyManager=CALL_STATE_RINGING before I set CALL_STATE_OFFHOOK=true
Pardon the bogus pseudocode pls. Sadly, set CALL_STATE_OFFHOOK=true is impossible using android.telephony.TelephonyManager.