P persianpowerman1 Active Member Licensed User Longtime User Mar 11, 2014 #1 hey guys... im trying to get the call duration... (means present call timing in mins/secs)... while the call is presently active... please see the image i have attached... i need it for ONLY outgoing calls... so i could get a ToastMessageShow every 30secs... or may be a vibration... any ideas?? how to access that timing? thanx, YO!han Attachments forB4A.png 57.8 KB · Views: 345
hey guys... im trying to get the call duration... (means present call timing in mins/secs)... while the call is presently active... please see the image i have attached... i need it for ONLY outgoing calls... so i could get a ToastMessageShow every 30secs... or may be a vibration... any ideas?? how to access that timing? thanx, YO!han
lock255 Well-Known Member Licensed User Longtime User Mar 11, 2014 #2 Good question interested me too Upvote 0
lemonisdead Well-Known Member Licensed User Longtime User Mar 11, 2014 #3 I would bypass the difficulty by creating an intent to detect the phone's status and run a timer or store the time when the phone was OFFHOOK. I would stop the timer when it is IDLE again. http://developer.android.com/reference/android/telephony/TelephonyManager.html Or you could use the PhoneStateListener in a service module http://basic4ppc.com/android/help/phonestatelistener.html Upvote 0
I would bypass the difficulty by creating an intent to detect the phone's status and run a timer or store the time when the phone was OFFHOOK. I would stop the timer when it is IDLE again. http://developer.android.com/reference/android/telephony/TelephonyManager.html Or you could use the PhoneStateListener in a service module http://basic4ppc.com/android/help/phonestatelistener.html
P persianpowerman1 Active Member Licensed User Longtime User Mar 11, 2014 #4 Got your idea... however... the timer starts when the call is answered(till then its 0:00) so how do you think i could trap that event... when the call is answered by the opposite party? cuz CALL_STATE_OFFHOOK doesnt distinguish between ...dialing & active... any ideas? YO!han its weird we dont have a tool for the above , when it is so obvious in all our calls.. !!! Upvote 0
Got your idea... however... the timer starts when the call is answered(till then its 0:00) so how do you think i could trap that event... when the call is answered by the opposite party? cuz CALL_STATE_OFFHOOK doesnt distinguish between ...dialing & active... any ideas? YO!han its weird we dont have a tool for the above , when it is so obvious in all our calls.. !!!