Hi.
I have service for handle outgoing call.
I register receiver and can handle call but not first.
I log outcoming call number but i must be dial atleast one time and next log number
How detect number first dial?
I have service for handle outgoing call.
I register receiver and can handle call but not first.
I log outcoming call number but i must be dial atleast one time and next log number
How detect number first dial?
B4X:
Dim broadcast As BroadCastReceiver
broadcast.Initialize("BroadcastReceiver")
broadcast.addAction("android.intent.action.NEW_OUTGOING_CALL")
broadcast.SetPriority(9147483647)
broadcast.registerReceiver("")
Sub BroadcastReceiver_OnReceive (Action As String,i As Object)
Try
Dim i2 As Intent
i2 = i
Dim X As String : X = i2.ExtrasToString
Dim Z As String : Z = X.IndexOf("NUMBER=")
Dim y As String
y = X.SubString2(Z+7,Z+24)
y= y.replace(" ","")
y= y.replace(",","")
y= y.replace("a","")
y= y.replace("n","")
y= y.replace("d","")
y= y.replace("r","")
y= y.replace("o","")
y= y.replace("i","")
y= y.replace("d","")
y= y.replace(".","")
y = y.replace("+98","")
log(y)
Catch
Log(LastException.Message)
End Try