Making an emergency call in Android 2.1 - android

Can I make an emergency call programmatically in Android 2.1?
I've tried to use something like this:
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(telUri));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_NO_USER_ACTION);
appCtx.startActivity(intent);
but the only thing that I can do is call the system dialpad with the specified emergency number.
I have to push the 'dial' button to make call. Is there any way to skip the dialer?

No, you can't. The phone activity (actually part of the Contacts application) is what responds to the ACTION_CALL intent and you can't change how it handles it. This is done specifically to make sure the user confirms the number he/she wishes to dial.

Related

Double Intent for call skype/phone

Hi I want with the press of the button to either call a phone number or make a Skype call.
To make the call I use:
Intent phone= new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + "+30 6********7"));
startActivity(phone);
Which pops a Window and let me choose from phone app or Skype. When I choose Skype it tries to make a call with Skype founds and not VoIP Skype call.
I found out that for Skype I need to use :
Intent skype = new Intent("android.intent.action.VIEW");
skype.setData(Uri.parse("skype:" + "user_name"));
startActivity(skype);
Is there a way to chain those two intents and whenever I choose phone app to run phone Intent and whenever I choose Skype to run Skype Intent ?
I know I can make a custom dialog to choose Intent to run and exclude Skype app from Intent phone
But I was wondering if there is a more elegant way built in android or even if I can make the VoIp call from the number it self (finding the user from phone).
Thank you in advance

Any Android Intent to make SIP Call?

Can any body suggest me, any Android Intent to make SIP Call? or even third party framework/lib/app, which has the facility to be invoked using an intent and some parameters will be fine.
Kindly Note: Not regular phone call, needed intent for SIP/Internet Phone call.
Thanks In Advance.
1) Do you mean you want to implement a SIP app?
Then, check this:
http://developer.android.com/guide/topics/connectivity/sip.html
Make you app and listen to ACTION_CALL.
Or
2) Do you want to invoke a calling app?
Then the usual ACTION_CALL will do.
(For example, in my phone ACTION_CALL will prompt me if I want to use Skype or Phone App)
Added:
I am using SipDroid in one of my phone. This is what happens when I try to make call:
Alternatively, if you meant to create an Intent, you could trying looking into declaring a custom scheme within an IntentFilter in your AndroidManifest.xml, such as calling an Intent with a sip:<numberToCall> will open your Activity.

Android: make a call and disconnect after ringing to leave a missed call

I am using this code to make call
Intent callIntent = new Intent(Intent.ACTION_CALL,
Uri.parse("tel:" + phoneNumber));
startActivity(callIntent);
and I want to disconnect call after hear first ringing to leave a miss call on the destination phone.
I don't believe that's currently available in the Android sdk. I was trying to control outgoing calls on a project recently but other than dialing a number there's not a lot you can do. My last project needed to place a call, press a button, then hangup. For that I ended up setting up an Asterisk server that listened to a web page. You could do something similar but that would involve using a data connection to your own server.
You can check out these links. I don't like this answer but it's the way it is for now.
How to make a phone call in android and come back to my activity when the call is done?
http://developer.android.com/reference/android/content/Intent.html#ACTION_CALL
If you want to step outside of techniques I would recommend check out the this answer.

Can I implement automatic call to someone in Android?

I want to implement an automatic call from my android phone. If I set message for a particular number and date as well, then my android phone should call that number automatically. Is it possible without any user interaction to call on any number via my android phone?
Yes it is possible. The code for call is straight forward.
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:09999"));
startActivity(intent);
Use your number in place of 09999.
Don't forget to specify the permission to call in Android Manifest.xml
Create an Alarm that will be fired at a particular time and add the code to call any particular number. Here is how you can set the AlarmManager to fire at a particular time. Then you can just call Intent.ACTION_CALL when your Alarm is fired.
Yes you can, with Intent.ACTION_CALL.

how to call 911 without going through the Dialer user interface in android

Can you please help me find out how to call 911 without going through the Dialer user interface in Android?
I used the below code..but it's going through Dialer. I want to call directly to emergency number through my application.
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:911"));
startActivity(intent);
A search through existing questions provides the answer to this one as well as the two you asked yesterday: Dial Number Without Prompt
I think you need to add premission in mainfest file to use action_call.

Categories

Resources