Any Android Intent to make SIP Call? - android

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.

Related

How to Open my App during a call?

I want my app to open whenever the user makes a call. I am able to know that call has started but cant open my app. Is there any way i can do that.
Thanks in advance
When you know that a call has started, use your package name / class directly, for example to create a new intent to call the twidroid program you'd use the followinglink text:
Intent intent = new Intent("com.twidroid.SendTweet");
You'd probably want to put a try/catch around for a ActivityNotFoundException for when the application is not installed.

Place a SIP call via Intent

I am writing an Android application which will place a SIP call. I want to use the native Android SIP APIs and have found documentation under:
http://developer.android.com/guide/topics/connectivity/sip.html and
http://developer.android.com/reference/android/net/sip/SipManager.html
Although I could regsiter with a SIP provider and start a call, it looks like this is too low-level. I want to just hand off the SIP call to the native Android phone app and give it a SIP address to call and assume that the user has already registered a SIP account in the Android phone app.
I thought that there must be an Intent for this, like http://developer.android.com/reference/android/content/Intent.html#ACTION_DIAL where I could provide a SIP address, like this:
Uri phoneCall = Uri.parse("tel:1234567890");
Intent caller = new Intent(Intent.ACTION_DIAL, phoneCall);
startActivity(caller);
but my experiments were unsuccessful. Do I have to use SipManager or is there an Intent I could use?
Assuming you've already created a global SIP-account:
Uri phoneCall = Uri.parse("sip:[number]#[domain]");
Just replace number and domain with the appropriate values.

Making an emergency call in Android 2.1

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.

How to send fake call broadcast on android

I am trying to send a broadcast to simulate an incoming call.
I added the permission in AndroidManifest.xml file,
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
When I try to run the program, the phone reboots.(Emulator too).
Intent intent = new Intent();
intent.setAction("android.intent.action.PHONE_STATE");
intent.putExtra(TelephonyManager.EXTRA_STATE, TelephonyManager.CALL_STATE_RINGING);
intent.putExtra("EXTRA_INCOMING_NUMBER", "923982398");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
sendBroadcast(intent);
I may be wrong as I can't find anything in the docs but I'd say it's not possible to 'spoof' a call ringing broadcast. It's almost certainly reserved as 'system only'.
Think about it - if apps could do this, it may simply result in 'mischief' rather than anything malicious but it isn't something that I'd like to happen on my phone.
Create your own 'phone ringing' action to use for testing purposes and have your BroadcastReceiver listen for it. When you come to release the app then simply change the BroadcastReceiver's intent filter to listen for the real one.
I Downloaded some of the fake Caller Apps from play store and tested them.
I found that the App Raises an Event which displays the pre-mentioned GUI on the Top of Lock Screen and adds the entry into call logs using the insert method of ContentResolver.
The app does not use the inbuild Calling (Broadcast) mechanism. it just fakes the GUI on the Screen and plays the Default Ringtone/Vibration.
As per my Knowledge, I think it is not possible to fake a call ringing broadcast

How to include my application as a dialing option when calling from the addressbook?

I need to include additional dialing options in the menu appearing after pressing "Call" over a contact (Screenshot).
I'm trying to do it with action-filters for the DIAL and CALL intents without any success.
I know this is possible because Skype does it (Screenshot). Anybody knows how to implement it?
I think the Intent you're looking for is android.intent.action.CALL_PRIVILEGED. Have a look at the complete Skype manifest.
I'd start here:
using android dialer in 3rd party app
And look through the Android dialer source to see what intents it uses
Then, check the official Intent list:
Which leads me to guess you need to at least include:
VIEW
DIAL
CALL
in category DEFAULT

Categories

Resources