Tuesday, 17 September 2013

is it possible to declare two application in AndroidManifest

is it possible to declare two application in AndroidManifest

the manifest is like this:
<manifest
<application
android:name=".MyApplication1" >
<MainActivity
...
</application>
<application
android:name=".MyApplication2" >
<MyService
android:process=":remote" />
</application>
actually, i want to fix a issue like this: if I declare service MyService,
which runs in a private process, whthin MyApplication1, then two instances
of MyApplication1 will be created, which means the initialization in
MyApplication1 will be done twice. So, i wanna to init a separate
application when MyService is to be launched by declaring MyService in a
separate application MyApplication2 as shown above in the manifest. But
unfortunately, it doesn't work as i think: MyService can not start at all.
have i omitted something, or made a fundamental mistake to try doing so?

No comments:

Post a Comment