Good afternoon,
I have a somewhat strange problem. The application I'm developing capture phone calls. When a call immediately the phone is muted, then see who calls and the volume should vary depending on who is calling.
That's what I want, but all I get is silence that is put in to receive the call, but can not get the volume as the top goes down, if necessary.
This is a piece of my code
Can you help?
Thank you very much!
I have a somewhat strange problem. The application I'm developing capture phone calls. When a call immediately the phone is muted, then see who calls and the volume should vary depending on who is calling.
That's what I want, but all I get is silence that is put in to receive the call, but can not get the volume as the top goes down, if necessary.
This is a piece of my code
B4X:
Sub PE_PhoneStateChanged(State As String, IncomingNumber As String, Intent As Intent)
'Call Incoming
ModoAntiguo = P.GetRingerMode
Log("Modo Actual: " & P.GetRingerMode)
p.setringermode (p.RINGER_SILENT)
.'analyze callers
.
.
.
.
' if a good caller then ...
P.SetRingerMode(ModoAntiguo) ' Restore ringer volume ' THIS IS DONT GO.
DoEvents
Can you help?
Thank you very much!
Last edited: