1

Which of the following can be accomplished by using the TelephoneNumberUtil class?

  • Save a phone number to the contacts in the phone device.
  • Retrieve a phone number from the contacts in the phone device.
  • Delete a phone number from the contacts in the phone device.
  • Format an international telephone number.

Answer: D Format an international telephone number.
Description:

2

How to handle call interruption scenarios, in an android application?

  • use TelephonyManager
  • use PhoneStateListener
  • we have to use both option 1 & 2
  • none of the above

Answer: C we have to use both option 1 & 2
Description: If we want to handle call interruption scenarios, then get the object of TelephonyManager and start listening to CALL_STATE using PhoneStateListener class's onCallStateChanged() functionality.

3

How to detect and handle incoming calls in android application?

  • i. start listening to CALL_STATE using telephonymanager and phonestatelistener. when incoming call comes onCallStateChanged function of phonestatelistener will be called.
  • ii. start listening to CALL_STATE using telephonymanager and phonestatelistener. when in coming call comes onPhoneStateChanged function of phonestatelistener will be called.
  • iii. state CALL_STATE_RINGING will be passed to onCallStateChanged function.
  • iv. state CALL_STATE_RINGING will be passed to onPhoneStateChanged function.
  • i
  • ii
  • i & iii
  • ii & iv

Answer: C i & iii
Description: If we want to handle call interruption scenarios, then get the object of TelephonyManager and start listening to CALL_STATE using PhoneStateListener class's onCallStateChanged() functionality. onCallStateChanged() function has a int state parameter which will be equal to CALL_STATE_RINGING when an incoming call arrives.

4

In TelephonyManager class, which of the below is not a call state?

  • CALL_STATE_RINGING
  • CALL_STATE_OFFHOOK
  • CALL_STATE_ONHOOK
  • CALL_STATE_IDLE

Answer: C CALL_STATE_ONHOOK
Description: TelephonyMnager has only 3 states, CALL_STATE_RINGING, CALL_STATE_OFFHOOK, and CALL_STATE_IDLE.

5

Which of the following are true about PhoneStateIntentReceiver.notifyPhoneCallState?

  • notifyPhoneCallState has to be called if your application wishes to receive a notification about an incoming phone call.
  • notifyPhoneCallState is a call back function that is called when the call state changes.
  • notifyPhoneCallState is called to initiate a call from the device.
  • notifyPhoneCallState is used to send notifications about call states.

Answer: A notifyPhoneCallState has to be called if your application wishes to receive a notification about an incoming phone call.
Description: