user7960788
user7960788

Reputation:

Integrating 2 or more android project in 1 project

I just wanna ask if what is the simplest way to integrate two or more project.

For example I've done calculator android app and paint android app, now I want to create new project which is the allInOneApp . In the main activity of allInOneApp is a list of buttons. button for calculator, button for paint etc.

My idea for this is to copy paste all the classes and xml etc of the projects to allInOneApp and when I click the specific button it will intent to one of the projects. Is there any other way except copy paste.

Upvotes: 2

Views: 1497

Answers (3)

user8000126
user8000126

Reputation:

Making one of the application as a library should work.

This previous answer to a similar question might help you. https://stackoverflow.com/a/14979395/8000126

Upvotes: 0

Dhiren
Dhiren

Reputation: 159

You can create multiple modules for multiple projects and one main module to call all module's main activity.

Upvotes: 0

Marta Rodriguez
Marta Rodriguez

Reputation: 1944

You can create an Android Library with each project so you can have as dependencies in your new app, so from the buttons you just intent the activities from each library.

Tutorial: https://developer.android.com/studio/projects/android-library.html?hl=en

You can also upload to Maven Central or JCenter your libraries and just add the dependencies in your gradle file as you do with other libraries.

Upvotes: 1

Related Questions