How to make a phone call programatically without Intent - android

I'm new on android and i want make phone call without use the intent.
I know that this code:
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:" + bundle.getString("mobilePhone")));
context.startActivity(intent);
Can i make call in android programmatically without use "Intent"?
Do you have any answer?
Thanks

Can i make call in android programmatically without use "Intent"?
Not from an ordinary Android SDK app. A custom ROM mod certainly could.

You can't, and that's a security feature.
See http://developer.android.com/reference/android/content/Intent.html#ACTION_CALL and http://developer.android.com/reference/android/content/Intent.html#ACTION_DIAL

Related

Android Video Calling feature using wifi

Can anyone help me how to implement video calling using wifi feature?
I have tried Intent for it but its not working.Please help me out.
Intent callIntent = new Intent("com.android.phone.videocall");
callIntent.putExtra("videocall", true);
callIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
callIntent.setData(Uri.parse("tel:" + "+919167903192"));
startActivity(callIntent);
Video calling like Skype requires using the SIP protocol. Good thing, there is android.net.sip. Bad thing, it only supports VoIP out of the box.
What's the way out?
You need to use a SIP library like JAIN SIP or CSipSimple to get the work done. You will also need a SIP provider. You can either become one or use an existing one like GetOnSip.
My point being?
It is not as easy as using an intent. You will have to do the manual coding.

How to choose third party dials before making a call in android

I have implemented how to make a call in android, it working now but I need choose option before making call if any third party dials app is available in my phone, is it possible do this,
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:" + "mobilePhone"));
context.startActivity(intent);
As a measure of security android does not allow dialing app, i mean you can design your own dialing app and contacts etc but you can only go as far as "dialing the number", all calling etc is done by the system own app
if you want to build the app you need only call this
Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:The telephone number to call"));
startActivity(callIntent);
After this android will take over control and make the call
Do not forget the permission:
<uses-permission android:name="android.permission.CALL_PHONE">

Preventing call forwarding popup on Android

The following code sends a call forwarding command via intent
Intent intentCallForward = new Intent(Intent.ACTION_CALL);
intentCallForward.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Uri uri = Uri.fromParts("tel", "*21*001234567890#", "#");
intentCallForward.setData(uri);
startActivity(intentCallForward);
The issue with this code is that it shows a popup which is a bit weird, is there a way to prevent this? Maybe via NDK or something like that?
Thanks in advance
The intent invokes the phone's phone activity. It is the source of your pop-up.
That is why you cannot change it or disable it.
If it really bothers you, you can include in your app some other calling activity and perform the call internally (not via intent), but I'm not sure such thing even possible, and it is surely doesn't worth the effort.

Put some message in a call from android app

I'm trying to make a call from my android app using the code below
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:123456789"));
startActivity(callIntent);
Now i'm able to make a call from my device successfully but my requirement is that when the receiver of call (i.e. phone with number 123456789 )....picks the call he should be able to hear some custom message.....this custom message i should be able to give from my andriod app .....is it possible ?...any ideas ?

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