March 2013
Beginner to intermediate
580 pages
16h 11m
English
Instead of sending a crime report, an angry user may prefer a phone confrontation with the suspect. Add a new button that calls the named suspect.
You will need the phone number out of the contacts database. Then you can create an implicit intent with a URI of the telephone:
Uri number = Uri.parse("tel:5551234");
The action can be Intent.ACTION_DIAL or Intent.ACTION_CALL.
ACTION_CALL pulls up the phone app and immediately calls the number sent in the intent; ACTION_DIAL just dials the number and waits for the user to initiate the call.
We recommend using ACTION_DIAL. ACTION_CALL may be restricted and will definitely require a permission. Your user may also appreciate the chance to cool down before pressing ...
Read now
Unlock full access