I'm a newbie in Android Development. I am trying to develop an app that ends the active call on reaching particular call duration given by the user. I am using reflections to achieve this but, I'm stuck in. Can anybody help me continue?
My pgm goes like below:
if(intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(
TelephonyManager.EXTRA_STATE_OFFHOOK)){
//infinite loop until user duration exceeds
while( <condtion I dont know>){
if(userSeconds >= (System.currentTimeMillis() - start_time)){
telephonyService.endCall();
}
}
}
finally found something which worked, really happy, now I'm sharing it... we can user java timers as well.. :)