Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Launch android apps within my application in Android?

In my application there is tab layout. and two tabs.

  • tab 1 - my app enter image description here
  • tab 2 - any outside android app (like Contacts, call dialer etc.. ) (i know how to launch outside application but its not running within my application (means tab will not display after launch )).

Thanks in advance

like image 557
Pratik Popat Avatar asked Dec 23 '11 06:12

Pratik Popat


People also ask

Can an Android app launch another app?

In android, we can lunch other applications using packing name. This example demonstrate about How to Launch an application from another application on Android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.

How do I start an activity in another application?

If both application have the same signature (meaning that both APPS are yours and signed with the same key), you can call your other app activity as follows: Intent LaunchIntent = getActivity(). getPackageManager(). getLaunchIntentForPackage(CALC_PACKAGE_NAME); startActivity(LaunchIntent);

Can an app use another app?

To take the user from one activity to another, your app must use an Intent to define your app's "intent" to do something. When you pass an Intent to the system with a method such as startActivity() , the system uses the Intent to identify and start the appropriate app component.


1 Answers

I may have misunderstood this, but unless you have created explicit intents (worked with the other app developer or created the other app you wish to embed) this will not be possible.

Each Android app runs in a sandbox: http://developer.android.com/guide/topics/security/security.html

Particularly:

Because Android sandboxes applications from each other, applications must explicitly share resources and data. They do this by declaring the permissions they need for additional capabilities not provided by the basic sandbox. Applications statically declare the permissions they require, and the Android system prompts the user for consent at the time the application is installed. Android has no mechanism for granting permissions dynamically (at run-time) because it complicates the user experience to the detriment of security.

Therefore this would not be possible. It seems misguided or malicious to begin with, but I would seriously reconsider your approach and rethink the benefits weighed against the unlikelihood of even being able to achieve what you ask.

like image 190
TryTryAgain Avatar answered Sep 28 '22 11:09

TryTryAgain