Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate multiple apps into one using Android Studio

Tags:

android

I'm working on a project where I've to integrate two Android apps into a single app, using Android Studio IDE.

For example, I have App_A and App_B; these two Android apps are from two separate vendors. Now I've to integrate App_B inside App_A. Hence there would be a single AndroidManifest.xml file (of App_A) with MainActivity (launcher) and a single apk would be generated.

So far, I've imported App_B as a module inside App_A. Now, I can run each module separately. But I've to create a single apk file comprising of two modules.

I've searched in different Android forums in the Internet and so far I've not found any suitable solution.

First of all, I want to know whether it's possible to integrate two Android apps from two different vendors into a single Android app. If it's possible then please provide a solution to this issue. Also it would be a great help if you can send me your suggestions, ideas or any links regarding this issue.

Thanks & regards,

Debu

like image 443
Debu Avatar asked May 08 '15 08:05

Debu


People also ask

Can we have multiple apps in one Android Studio project?

Yes, it is possible. As the existing answers showed, it's quite straightforward to create additional application module in the same Android Studio project.


2 Answers

Yes you can do that:

  1. Import the third party app's source code as a separate library module.
  2. Modify the dependencies section of your Main module's build.gradle file to include the third party module as a dependency like this:

    compile project(':your_module_name_here')

like image 181
Asif Mujteba Avatar answered Oct 14 '22 04:10

Asif Mujteba


You can launch other apps activities from your main app. It's the same as integrating facebook, you declare com.facebook.LoginActivity in your manifest. In Project_A manifest file declare activity from Project_B. FB eg:

 <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 eg:

compile('com.facebook.android:facebook-android-sdk:3.23.1')
like image 39
Tadas Valaitis Avatar answered Oct 14 '22 02:10

Tadas Valaitis