Launch android Apps From My Android Application - android

I want to list and launch the apps installed on my android device from my android application. Is this possible?

you should try this code
Intent intent = getPackageManager().getLaunchIntentForPackage("com.android.package");
startActivity(intent );

Related

Package names for Phone app on Huawei phones

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);

Is it possible to load and run APK file inside Android Apps programmatically?

in App A, i have UI Box. Is it possible to load App B (APK) then load and run it into the UI Box ?
so, its like run App B with frame from App A.
I would say it is not possible to install another application from one application as android made a sandbox for each application and prevent it from touching to other applications.
NOTE: you can invoke an android package installer via Intent.
File apkFullPath = getFileStreamPath("name_of_downloaded_app.apk");
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(apkFullPath), "application/vnd.android.package-archive");
startActivity(intent);
Hope this will help and solve your problem.
You cannot run an apk without instsalling it first. What you can do is start intent for installing it and then use it as you wish.
Read this ans to start intent for installing an apk:
Install apk programmatically

Is it possible to run android application from android application?

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

Android - Open running services page(in developer options)

How can I open Running services settings?
Is it possible to open this page using Intent or Method invoke?
Running services
This only works on 5.1 and below.
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.settings", "com.android.settings.RunningServices"));
startActivity(intent);
Somehow on 6.0 this call opens the configure apps page showing title running services. May be there are some extra flags that need to be passed.

How to launch the third-party android applications I installed through Intent directly?

we can launch android market application from:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData("market://details?id=packgename");
startActivity(intent);
My question is how to launch the third-party android applications I installed through Intent directly? Do you guys have any ideas?
In order to do that, you need to find the following info for the application you want to start:
Package
Startup Class
You can obtain this info if you start third-party app regularly, and in the LogCat inspect the trace.
Then, you just fill in following intent with the info you obtained:
Intent startupIntent = new Intent();
ComponentName distantActivity = new ComponentName("com.third.exampleapp", "com.third.exampleapp.StartupClass");
startupIntent.setComponent(distantActivity);
startupIntent.setAction(Intent.ACTION_MAIN);
startActivity(startupIntent);
Please note that it is very bad practice to start standard Android system Intents this way.

Categories

Resources