I have my phone number at TextView
and want to open "Intent-picker" to choose application that I want to call with(Skype, Viber...) or just dial to call it.
Intent callIntent = new Intent(Intent.ACTION_CALL);
calls instantly so it doesn't help me.
In the MainActivity Intent, the object is created to redirect activity to the call manager, and the action attribute of intent is set as ACTION_CALL. Phone number input by the user is parsed through Uri and that is passed as data in the Intent object which is then used to call that phone number .
Intent Object - Action to make Phone Call Intent phoneIntent = new Intent(Intent. ACTION_CALL); You can use ACTION_DIAL action instead of ACTION_CALL, in that case you will have option to modify hardcoded phone number before making a call instead of making a direct call.
Method 1) Dial a number (Permission-free) parse() function. Step 2: Set the Intent Action of Intent to Intent. ACTION_DIAL such that Android system can filter and delegate the dialling action to any app that can make a phone call.
I think you are looking for something like this:
Intent intent = new Intent(Intent.ACTION_DIAL); intent.setData(Uri.parse("tel:0123456789")); startActivity(intent);
This opens the dialer (or creates a chooser dialog if there are multiple apps installed which can place a phone call) with the number filled in, but does not actually start the call. See this answer for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With