I am instantiating an application object in the manifest file as below.
<application android:name=".MyApp"
android:icon="@drawable/add_icon_with_oval"
android:label="@string/app_name"
android:process="com.test.myprocess"
android:allowBackup="false">
I am starting a service from my application which is running in another process. This service is also declared in my manifest file as below.
<service
android:name="com.test.package.MyService"
android:permission="some.permission"
android:process="com.test.anotherprocess" >
</service>
The problem that I am seeing here is that MyApp is instantiated twice, one for my process, com.test.myprocess and another instance for com.test.anotherprocess.
Is there is a way that I can prevent creating MyApp for com.test.anotherprocess