Android Devs
Android Devs

Reputation: 125

How to Use Multiple "Application class" in android?

See below My Manifest.xml

I Already used ApplicationLoader.

<application
        android:name=".ui.ApplicationLoader"
        android:allowBackup="true"
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

<application
        android:name="org.abtollc.sdk.AbtoApplication"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name">

Now i want to use both application class in single project ? How its possible

org.abtollc.sdk.AbtoApplication is third-party libs.

Upvotes: 4

Views: 1276

Answers (4)

Zeeshan Khan
Zeeshan Khan

Reputation: 563

According to Android documentation manifest file with only one application element is valid.

Upvotes: 1

SaravInfern
SaravInfern

Reputation: 3388

Android application can handle only 1 application class,if you want multiple application class, you have to extend ApplicationLoader class from AbtoApplication class.

Upvotes: 1

Ugurcan Yildirim
Ugurcan Yildirim

Reputation: 6132

You simply can't. Try extending AbtoApplication from your application class.

Upvotes: 0

Egor
Egor

Reputation: 40193

It's not impossible, your ApplicationLoader must extend AbtoApplication in this case.

Upvotes: 2

Related Questions