stop incoming call ?

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

stop incoming call ?

Postby eden91940 » Tue Apr 21, 2009 11:53 pm

How do i stop incoming calls ?

Ive got the following snippet to complete :

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. TelephonyManager tm = (TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);
  3.  
  4. tm.listen(this, CallStateListener.LISTEN_CALL_STATE);
  5.  
  6.  
  7.  
  8. public void onCallStateChanged(int state, String incomingNumber)
  9.  
  10. {
  11.  
  12.     switch(state)
  13.  
  14.     {
  15.  
  16.           case TelephonyManager.CALL_STATE_DLE:
  17.  
  18.                Log.d(DEBUG, "PHONE STATE - IDLE");
  19.  
  20.                break;
  21.  
  22.           case TelephonyManager.CALL_STATE_OFFHOOK:
  23.  
  24.                Log.d(DEBUG, "PHONE STATE - OFFHOOK");
  25.  
  26.                break;
  27.  
  28.           case TelephonyManager.CALL_STATE_RINGING:
  29.  
  30.                Log.d(DEBUG, "PHONE STATE - RINGING");
  31.  
  32.                break;
  33.  
  34.      }
  35.  
  36. }
  37.  
  38.  
  39.  
  40.  
Parsed in 0.034 seconds, using GeSHi 1.0.8.4


thx
eden91940
Freshman
Freshman
 
Posts: 5
Joined: Tue Apr 21, 2009 11:45 pm

Top

Postby Barmaleikin » Wed Apr 22, 2009 11:33 am

Can't you just break GSM network connection in anyway?
Barmaleikin
Freshman
Freshman
 
Posts: 2
Joined: Wed Apr 22, 2009 11:25 am

Postby eden91940 » Wed Apr 22, 2009 1:14 pm

???

i need an answer not a question :/

The Phone.endcall() method is deprecated what is the equivalent way to end a call ?
eden91940
Freshman
Freshman
 
Posts: 5
Joined: Tue Apr 21, 2009 11:45 pm

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest