I am developing android app and want to launch Phone app from one of my dashboard screen. But Phone app is merged with contacts app, and when I open it opening contacts app by default,instead it should open Phone app. I have set ,
intent.setClassName( "com.android.contacts", "com.android.contacts.activities.DialtactsActivity") and starting activity, but its opening contacts screen instead of phone.
Can anyone suggest?
I think in most (if not all) Huawei devices the package responsible for the phone app is com.android.phone
From within an activity you can use the following intent to open the dialer:
Intent intent = new Intent(Intent.ACTION_DIAL);
startActivity(intent);
Related
I want my app to be in the autostart list and in running state after installation.
I know when I install an app like (WhatsApp) it goes automatically to the autostart list. I want my app to be the same
some app always listed under the running state like show above I want my app to be the same
I try this code for autostart
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.miui.securitycenter", "com.miui.permcenter.autostart.AutoStartManagementActivity"));
startActivity(intent);'
it's work but it will throw to autostart manager where I manually found the app and allow autostart. also, I try a lot but don't get any possible solution for put application into the running state like shown into the image.
Is it possible to run android application from android application? For example, i have a button in application 1 and when i press that button i want application 2 to start. I'm developing application in react-native.
I tried with Linking component but I'm getting this error "No Activity found to handle Intent". So i tried to edit AndroidManifest.xml, also without much success.
Thanks in advance.
Yes through Intent we call Activity of another application like below Intent by passing Application Package name and its class name with full package name .
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.example", "com.example.MyExampleActivity"));
startActivity(intent);
Allowing Other Apps to Start Your Activity
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 am trying to make a small application that can launch an application, not usually shown in the app drawer. This application is generated by the system and is carrier specific. It belongs to the package com.android.stk - for those of you who don`t know it is the SIM Toolkit application. The SIM Toolkit application itself can not be launched, but when I insert my sim card, it creates a carrier specific application - In my case: Dialog Services, which can be run to make changes to sim settings.
The problem is that the package name for the Dialog Services app is still com.andorid.stk . All I want to do is open up that app. Is there any way to do this... Possibly search for all apps within com.android.stk and selecting or launching that one...
I am relatively new to Android dev, so All help is appreciated.
You can launch any installed application whose package name is known:
Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.andorid.stk");
startActivity( LaunchIntent );
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.