I'm working on a project in which I have created a button.I want to add a feature that if I clicked on that button then it will automatically make a call to police number (100). I have written the code for the same, and when I clicked on that button my mobile phone's dial pad is opening and 100 number is displaying in dial pad. Is there any way to make a call automatically instead of directing me to dial pad?
Can anyone guide me regarding this please?
It is just a matter of how you use the intent, this should dial the number directly:
Here is documentation on both
ACTION_CALLandACTION_DIAL.ACTION_DIALwill only fill in the number in the dialer: Intent.ACTION_DIALACTION_CALLwill fill in the number in the dialer and attempt to dial it: Intent.ACTION_CALL