Opening an Android application in another

I am trying to open another, already installed Android application in another, with the click of a button. The new application should be open in a portion of the screen in the calling application.

Currently, my code creates a new intent and launches the called application. the calling application disappears. Here is my code:

b.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub PackageManager pm = getPackageManager(); Intent intent = pm.getLaunchIntentForPackage("com.ritwik.camera"); startActivity(intent); } }); 

Ideally, it should open as part of the same screen, not paying attention to the parent (calling) application. How to do it?

+6
source share
3 answers

When you run Intent to run another application (i.e. because you are launching or replacing the main menu), you really ask the android to run the application defined with a specific package (or one that satisfies some specific restrictions, for example, the ability to process images, videos, etc.), without any hints or links to the actions contained in it (as well as the possibility of obtaining any ...).

Therefore, I do not think that what you are trying to achieve is possible with the current version of the OS (unless some vendor offers an extension for this, see the comment from Pratik).

+3
source

As far as I know, this is NOT possible. You can only start new activity, but you do not control it.

EDIT: Some devices offer this feature using Cornerstone or similar structures, but I have not seen an opportunity for developers to use this for their applications.

+1
source

The new application should be open in a portion of the screen in the calling application.

This is not possible in the regular user interfaces of third-party applications.

AFAIK, a split-screen function (Adaptive UI) is supported with Android 3.0 onwards.

This has nothing to do with embedding a third-party application interface into your own.

So, I did not understand what you wanted to say, "this is not possible with the current version of the OS"

It is not available on any stock version of Android released before March 26, 2013 at 9:50 am ET.

Some device manufacturers, such as Samsung, have expanded the capabilities of Android with multiple windows. However, control of these windows rests with the user and the (modified) OS. If there is nothing in their S-Pen SD file, you have no way to launch another window.

Android also has RemoteViews , which is a means of transferring a simplified interface between processes. Using this, one application can embed RemoteViews published by another application. For example, you see this with application widgets on the home screen. However, both applications should be written with this in mind, for example, an application that publishes an AppWidgetProvider for placing an application widget on home screens.

+1
source

All Articles