October 2018
Intermediate to advanced
464 pages
15h 17m
English
In this recipe, we are monitoring the Call State events, as indicated with this constant: LISTEN_CALL_STATE. The other interesting options include the following:
Take a look at the PhoneStateListener link in See also for a complete list.
When we're done listening for events, call the listen() method and pass LISTEN_NONE, as shown here:
telephonyManager.listen(mPhoneStateListener,PhoneStateListener.LISTEN_NONE);