Mr.Hyde Mr.Hyde - 21 days ago 8
Java Question

how to have multiple application classes in seprated jars in one application in android

I have a Appp class that extend from Appliction and call Appp in manifest.

There is two another jar, that each author said call them in manifest as Application tag.

According to how to handle multiple application classes in android(how to handle multiple application classes in android) question, to have multiple application classes that extend from Application, we should extend some application class from another application class, and call upper class in manifest.

But in my case, i don't have sources, and just have jars. what can i do?!

Answer

The solution is you should extends one of your app classes from upper classes (that extended itself from application class or from some app class that extended itself from application class (these are in chain).

In question, you should make a appp class that extended from soomla, and then extend soomla from push, and then push from Application class and then set push class in manifest.

public appp extends Soomla{

}

public soomla extends Push{

}

public push extends Application{

}

In mainfest.xml :

<application
        android:name=".push"
        android:icon="@drawable/ijoomer_luncher_icon"
        android:label="@string/app_name">
Comments