I am creating an application from which the user can call people. In this application I would like to give the option of using either the phone's dialer or other VOIP applications such as Skype or Lync (which incidentally are both Microsoft software). My only problem is that they don't seem to be registered to listen for android.intent.action.CALL (this gives me the phone), but only for android.intent.action.CALL_PRIVILEGED - via which I cannot reach the phone's dialer (I'm guessing that's the privileged part). I'm developing on a stock Nexus 4 btw.
Is there a pretty way that I can launch my intent and be given the option of both the dialer and also Skype/Lync?
Right now my calling the intent looks like this:
Uri numberUri = Uri.parse("tel:" + number);
final Intent intent = new Intent("android.intent.action.CALL_PRIVILEGED");
intent.setData(numberUri);
mContext.startActivity(intent);
Feel free exchange the contents of the intent for Intent.ACTION_CALL - I'm doing it all the time at the moment.
Sorry Dear this cannot be possible.
Related
Issue:
I've been working on an app that listens to a certain kind of intents depending on a given link format. My intent filter works as expected, I'm just wondering whether it's possible to force the android system to bypass the kind of dialog below and open only my app.
I'm just wondering whether it's possible to force the android system to bypass the kind of dialog below and open only my app.
Do you own the domain of the URI that is being invoked? If so, than yes, with app links.
If not, then no.
you force user to use a specific browser by this:
String packageName = "com.android.yourBrowser";
String className = "com.android.browser.YourBrowserActivity";
Intent internetIntent = new Intent(Intent.ACTION_VIEW);
internetIntent.addCategory(Intent.CATEGORY_LAUNCHER);
internetIntent.setClassName(packageName, className);
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
As the HTC ONE M8 is certified for MirrorLink usage, it also has a customized car app, which comes with an activity that allows phone calls while driving.
Is there a way to start this activity from an external application? Is the only way to call this activity if the app or rather that activity has implemented the ACTION_CALL intent?
thanks
Is there a way to start this activity from an external application?
Yes, you can do that with an intent filter, hereĀ“s the information:
http://developer.android.com/training/basics/intents/filters.html
but if you only want to open the application, knowing the application package is enough with:
PackageManager pm = getPackageManager();
Intent intent = pm.getLaunchIntentForPackage("your.other.app");
startActivity(intent);
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">
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.