Recording outgoing call after receiving by the receiver from my Android application? -
i want make call recording application user can record outgoing call. have done it. 1 little problem, call recording when starting dial number. want , call recorded when receiver receive it. otherwise no sound recorded. means, want sound free disgusting dialing tone. sample code of application given below.
//service @override public void oncallstatechanged(int state, string phonenumber) { switch (state) { case telephonymanager.call_state_ringing: log.d(tag, "call_state_ringing"); break; case telephonymanager.call_state_offhook: log.d(tag, "call_state_offhook"); isoffhook = true; try { toast.maketext(context, "recording started", 10000).show(); toast.maketext(context, "recording stop when call diconnected", 10000).show(); startrecord(); } catch (illegalstateexception e) { // todo auto-generated catch block e.printstacktrace(); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } break; case telephonymanager.call_state_idle: log.d(tag, "call_state_idle"); if (isoffhook) { try { stoprecord(); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } } break; }
Comments
Post a Comment