0

This is my first Android library that I'm working on. I had initially built it like a regular Android app. Later, I created a new module and transferred all the source code to the module from the main app. Now, I've successfully created an .aar file and imported it a a library inside another test project. Now, this new project of mine contains a button. On clicking it, I want to launch the main activity of the library project. Usually, we use intents to launch activities, however they are supposed to be defined in the manifest. However, I don't think that that's the case with library projects. How should I deal with this?

Vivek Malhotra
  • 751
  • 2
  • 7
  • 17

1 Answers1

0

You can add manifest into your library and you can declare an activity there. Both manifests should be merged by the android gradle plugin into one final manifest which will be included in final applicaion.

You can read more detailed explanation in this SO answer: Android Library Manifest vs. App Manifest

Or can check android developer documentation for manifest merger

Josef Adamcik
  • 5,620
  • 3
  • 36
  • 42