Skip to content

Stop on app terminate

mehdi sohrabi edited this page Apr 11, 2020 · 1 revision

Stop on App Terminate

By Ibrahim Soliman

Add android:stopWithTask="true" as follow:

<service android:name="rekab.app.background_locator.LocatorService"
            android:permission="android.permission.BIND_JOB_SERVICE"
            android:exported="true"
            android:stopWithTask="true"/>

        <service android:name="rekab.app.background_locator.IsolateHolderService"
            android:permission="android.permission.FOREGROUND_SERVICE"
            android:exported="true"
            android:stopWithTask="true"/>
Clone this wiki locally