Hi everyone,
This is my first library.
This library decodes codes which are sent by us to IVR during call (Like Press 1 to know your balance Press 2 to recharge ....).
This library can only be used in Activity no services are allowed.
Functions,Objects and Events :
Initialize()
It starts the decoder.
register()
It registers the decoder to listen.It is compulsory to keep it after initialization as if after initializing it any DTMF tone is detect an event call will be processed.
clearText()
As it name denotes it clears text stored in fullText.
maddtmf_keypress(key As Char)
Root of my library.It is called on every key press but if your activity is paused then it is not called.
fullText as string
This string contains all the key press.
Example:
Update :
Library works over call on Gingerbread 2.3.3 on Samsung Galaxy Y.
But application Does on support Samsung Galaxy S4(i9500) . May be ICS does not support the same over call.
This is my first library.
This library decodes codes which are sent by us to IVR during call (Like Press 1 to know your balance Press 2 to recharge ....).
This library can only be used in Activity no services are allowed.
Functions,Objects and Events :
Initialize()
It starts the decoder.
register()
It registers the decoder to listen.It is compulsory to keep it after initialization as if after initializing it any DTMF tone is detect an event call will be processed.
clearText()
As it name denotes it clears text stored in fullText.
maddtmf_keypress(key As Char)
Root of my library.It is called on every key press but if your activity is paused then it is not called.
fullText as string
This string contains all the key press.
Example:
B4X:
Sub Globals
Dim d As madDTMF
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.Initialize("main")
Activity.LoadLayout("main")
'This DTMF Decoder will work till this Application is running
'It initializes the reciever
d.Initialize()
'but even after initializing you have to register it.
d.register()
End Sub
'This event is not called when activity is paused.
Sub maddtmf_keypress(key As Char)
'You can check d.fullText variable in regular interval of time to know every key press.
'we are using here to update textbox on next visible keystroke
Keys.Text=d.fullText
'Key contains new key press.
Log(key)
End Sub
Update :
Library works over call on Gingerbread 2.3.3 on Samsung Galaxy Y.
But application Does on support Samsung Galaxy S4(i9500) . May be ICS does not support the same over call.
Attachments
Last edited: