It's a few years since I wrote a B4A app, and I never got involved with telephony so I'm rusty and ignorant. Advice on the following would be welcome:
My objective is to use a single click to make a phone call, the speaker being on during the call, and only during the call.
I'm using B4A v 6.8 and my development phone is running Android v6.
The trick seems to be to acquire the call state having started a call activity, and to use the CALL_STATE_OFFHOOK state to switch the speaker on and the CALL_STATE_IDLE to exit my app. Can someone confirm, please?
Questions:
How do I set up a call state listener?
Do I need to turn the speaker off?
My objective is to use a single click to make a phone call, the speaker being on during the call, and only during the call.
I'm using B4A v 6.8 and my development phone is running Android v6.
The trick seems to be to acquire the call state having started a call activity, and to use the CALL_STATE_OFFHOOK state to switch the speaker on and the CALL_STATE_IDLE to exit my app. Can someone confirm, please?
Questions:
How do I set up a call state listener?
Do I need to turn the speaker off?