Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to Add two android:name attributes to Application tag in Manifest file?

My Android application requires two application classes,one is volley AppController and another one is Analytics class.I am confused how to add both at a time.please help me and get me out of this.

like image 552
Hari krishna Avatar asked Dec 20 '22 00:12

Hari krishna


1 Answers

You need to implement Multilevel inheritance to resolve this scenario.

This is your scenario

public Lib1Application extends Application{

}

public Lib2Application extends Application{

}

public YourApplication extends Application{

}

How to resolve this?

public Lib1Application extends Application{

}

public Lib2Application extends Lib1Application{

}

public YourApplication extends Lib2Application{

}

finally in mainfest.xml

<application
        android:name="com.your.packagename.YourApplication"
        android:icon="@drawable/ijoomer_luncher_icon"
        android:label="@string/app_name"
 >
like image 54
Android Tutorial Avatar answered Apr 30 '23 11:04

Android Tutorial