Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 712
  • Last Modified:

Android Phone call access

Hi
i want to access the voice call when it is still on i.e. when a user is still on voice call using normal gsm/cdma call for a academic project.I have gone through sdk from android api but couldnt get any info to directly access the call details...

is there a class to directly access the voice call during when it is active
0
darien_software
Asked:
darien_software
1 Solution
 
SanthanaTechnical LeadCommented:
Hi  darien_software,

1)  is there a class to directly access the voice call during when it is active

Actually I did n't get your question ...what do you mean by accessing voice call ...


But through TelephonyManager we can get the Phone call state changes....

http://developer.android.com/reference/android/telephony/TelephonyManager.html

TelephonyManager telManager =  (TelephonyManager) getActivity().getSystemService(Context.TELEPHONY_SERVICE);
telManager.listen(mCustomPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);
......
......
You can get the call back here......

private final PhoneStateListener mCustomPhoneStateListener = new PhoneStateListener (){
         public void onCallStateChanged(int state , String inComingNumber){
                if(state == TelephonyManager.CALL_STATE_IDLE){
                        // here you can kick off a process that you wants...
               }
        }
}
0
 
darien_softwareAuthor Commented:
hi sanathanasamy

as both my Q are relating to same topic..we will discuss more about this in this Q to avoid confusion..hope it ok
http://www.experts-exchange.com/Programming/Languages/Java/Android/Q_27665575.html#a37821627
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now