Sourabh Saldi
Sourabh Saldi

Reputation: 3587

define library activity in main project manifest file?

I have a library project where I define the activities common to two other applications now I want to define login activity which is common to both the applications in my library project to avoid duplicating the code and that login activity will be launcher activity for both the applications,So my problem is that how do I define the launcher activity from other(library) project in my main application manifest??

is it possible?

Upvotes: 0

Views: 777

Answers (2)

Sunny Kumar Aditya
Sunny Kumar Aditya

Reputation: 2846

You can add your library's activities in you manifest just like you add any other package's activities.

   <activity android:name=".someActivity" >
</activity>
<activity android:name="com.android.package1.VideoPlayer" >
</activity>
<activity android:name="com.android.libpackage2.LibActivity" >
</activity>    

Upvotes: 1

Ali Alnoaimi
Ali Alnoaimi

Reputation: 2317

defining the project as a library is done through "project.properties" file.

This is a sample of project.properties file of a library

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.

android.library=true
# Project target.
target=android-10

Upvotes: 0

Related Questions