I am starting an android service using,
startService(getApplicationContext(), MyService.class);
I have correctly defined my service in AndroidManifest. Now, I am calling above code from Application create.
Case 1: Calling above code from Application onCreate()
- I see that Application.onCreate() gets called two time. One is the desired App create and other happens when startService is called.
Case 2: Calling above code from Activity in application
- Same behavior as case 1.
Is this intended behavior?
My Android Manifest Code as requested:
<service
android:exported="false"
android:enabled="true"
android:name=".MyService"
android:process=".MyService">
</service>