Reputation: 2579
How can I make a call without/with user interaction.
I found the intent Intent.ACTION_CALL
on the internet, but I want to write program like the one which initiates a call in response of this intent, is this possible? If this is possible, then how can I do this?
I do not want to initiate a dialog to dial for a call, I want to internally make a call in my application.
Is there any java library, which I can use for this purpose?
Upvotes: 2
Views: 1492
Reputation: 960
That is not possible from an SDK application.You have to use Intent.ACTION_CALL.
Upvotes: 0
Reputation: 75635
Use Intent. That's how it is designed to work in Android:
try {
startActivity(new Intent(Intent.ACTION_CALL,
Uri.parse("tel:PHONE_NUMBER_HERE" )));
} catch (Exception e) {
e.printStackTrace();
}
This will start dialing.
Upvotes: 1