Android service onCreate is called multiple times without calling onDestroy

I had the same problem when my service used the same process with activities(default). but no more problems when I made my service use another process. I edited my AndroidManifest.xml like below… (added android:process attribute)

<service android:name="kr.co.pkbio.binoo.CacheFileManagerService" android:process=":kr.co.pkbio.binoo.service"/>
<service android:name="kr.co.pkbio.binoo.ActivityStackManagerService" android:process=":kr.co.pkbio.binoo.service"/>

see http://developer.android.com/guide/topics/manifest/service-element.html for information.

Leave a Comment