How to integrate multiple apps into one using Android Studio

I am working on a project where I have to integrate two Android apps into one application using Android Studio IDE .

For example, I have App_A and App_B; these two android apps are composed of two separate vendors. Now I have to integrate App_B inside App_A. Hence there will be one AndroidManifest.xml file (from App_A) with MainActivity (launcher) and one apk will be generated.

So far, I have imported App_B as a module inside App_A. Now I can run each module separately. But I have to create one apk file which is made up of two modules.

I have searched various Android forums on the internet and so far I have not found a suitable solution.

First of all, I want to know if it is possible to integrate two Android apps from two different vendors into one Android app . If possible, please provide a solution to this problem. It would also be very helpful if you could send me your suggestions, ideas or links to this problem.

Thanks and greetings,

Deb

+3


source to share


3 answers


You can launch other applications from the main application. This is the same as integrating facebook, you declare com.facebook.LoginActivity

in your manifest. In the manifest file Project_A, declare the activity from Project_B. FB, for example:

 <activity
        android:hardwareAccelerated="false"
        android:name="com.facebook.LoginActivity"
        android:theme="@style/Vinted.NoActionBar"
        android:screenOrientation="portrait"/>

      



Also don't forget to include Project_B in gradle, FB, for example:

compile('com.facebook.android:facebook-android-sdk:3.23.1')

      

+1


source


Yes, you can do this:



  • Import the source code of a third-party application as a separate library module.
  • Change the section of dependencies

    your main module build.gradle

    to include a third party module as a dependency on this:

    compile project(':your_module_name_here')

+1


source


If you just want to integrate App_A and App_B, just like your case, you can do this: select App_A and right-click

---> Open Module Settings

---> Modules

---> App_A

- → Dependencies

---> Plus

---> Module Dependency

---> select App_B

, and then OK

. But if you only want to export one APK

of the two Modules

, I'm afraid you have to add the activity&service&broadcast

thing AndroidManifest.xml

of App_B

to the App_A

manully category . and remove AndroidManifest.xml

from App_B

.

+1


source







All Articles