S solas Member Licensed User Longtime User Mar 26, 2011 #1 Hi all I'm a noob and I'm trying to figure out how to get soundpool player to either pause or stop when the phone is ringing/on a call I have used the "log PhoneStateChanged demo " and I can see the phone ringing (ect) in the log file, but I can't figure out what would be the correct PhoneStateChanged syntax which would detect PhoneStateChanged and then pause /stop playId could anyone help with what to put where in the syntax if PhoneStateChanged ........................= IDLE then sp.Stop(playId2) end if Thanks in advance Solas
Hi all I'm a noob and I'm trying to figure out how to get soundpool player to either pause or stop when the phone is ringing/on a call I have used the "log PhoneStateChanged demo " and I can see the phone ringing (ect) in the log file, but I can't figure out what would be the correct PhoneStateChanged syntax which would detect PhoneStateChanged and then pause /stop playId could anyone help with what to put where in the syntax if PhoneStateChanged ........................= IDLE then sp.Stop(playId2) end if Thanks in advance Solas
Erel B4X founder Staff member Licensed User Longtime User Mar 27, 2011 #2 You should use the PhoneStateChanged event. If the state is RINGING or OFFHOOK pause the musing. When it is IDLE resume it. Upvote 0
You should use the PhoneStateChanged event. If the state is RINGING or OFFHOOK pause the musing. When it is IDLE resume it.
peacemaker Expert Licensed User Longtime User Aug 10, 2012 #3 Is there possibility to work with EXTRA_STATE_OFFHOOK and others EXTRA ? TelephonyManager | Android Developers Upvote 0
Is there possibility to work with EXTRA_STATE_OFFHOOK and others EXTRA ? TelephonyManager | Android Developers
Erel B4X founder Staff member Licensed User Longtime User Aug 10, 2012 #4 The intent is passed to the event. So you can extract any data that is available from it. I recommend you to go over this tutorial: Intent Filters - Intercepting SMS messages in the background It might be better to create an intent filter instead of using PhoneEvents in this case. Upvote 0
The intent is passed to the event. So you can extract any data that is available from it. I recommend you to go over this tutorial: Intent Filters - Intercepting SMS messages in the background It might be better to create an intent filter instead of using PhoneEvents in this case.