If I have two class of extended with Application Class. How do I handle the App? I have two Class. How do I manage the two Global Class in manifest. I have created two Module now I am integrating so it creating a problem for me.
-
Why do you need 2 classes like that? – phatnhse Jul 01 '17 at 10:23
-
In first class i have done Network parsing Work – Pushpendra Singh Jul 01 '17 at 10:25
-
in Second class i have done Cart Controller. Both should be Global so extended with Application class – Pushpendra Singh Jul 01 '17 at 10:25
-
Im not sure why do you have to devide into 2 classes, I think 2 activities can resolve almost issues. But please read this :https://stackoverflow.com/questions/19001644/how-to-handle-multiple-application-classes-in-android – phatnhse Jul 01 '17 at 10:28
-
If two class can't be extended then how do i implement. or how do merge this two different class. because both have different functionality – Pushpendra Singh Jul 01 '17 at 10:28
-
i have done this process ! but it does effect anything and error is thrown – Pushpendra Singh Jul 01 '17 at 10:30
-
@PushpendraSingh could we take a look at the code? – Coozgan Jul 01 '17 at 10:37
-
you have to post your code so that we can advise you how you can merge it. – Coozgan Jul 01 '17 at 10:39
2 Answers
if i have two class of extended with Application Class. How do i Handle the App?
Have one subclass the other. Or merge them together. Or delete one. Or delete both.
In first class i have done Network parsing Work. in Second class i have done Cart Controller. Both should be Global so extended with Application class
It is unclear if either of those things should be global in scope. Even if they should be global in scope, then neither of those things need to extend Application
. Have them be standard Java singletons.

- 986,068
- 189
- 2,389
- 2,491
Only the <manifest>
and <application>
elements are required.
They each must be present and can occur only once. Most of the other elements can occur many times or not at all. However, at least some of them must be present before the manifest file becomes useful.
If an element contains anything at all, it contains other elements. All of the values are set through attributes, not as character data within an element.
Elements at the same level are generally not ordered. For example, the <activity>
, <provider>
, and <service>
elements can be intermixed in any sequence. There are two key exceptions to this rule:
An <activity-alias>
element must follow the <activity>
for which it is an alias.
The <application>
element must be the last element inside the element. In other words, the </application>
closing tag must appear immediately before the </manifest>
closing tag.

- 3,349
- 1
- 19
- 28