This PR will add the option autoRunOnMyPackageReplaced field to the ForegroundTaskOptions. By default this value will be set to false, so it is always optional for the user to use the feature.
This feature has been created because when the App using the foreground service is (auto)updated from the store, the foreground service is shut down. This is not the desired behaviour for some apps. Now it is possible to listen to the MY_PACKAGE_REPLACED intent. This intent is fired when the app which is using the foreground service is updated.
Refactors:
the bootReceiver has been mad more generic to react to multiple intents and can be easily updated in the future.
The new intent receiver does not depend on a String value when checking for intents but uses the Intent class value.
This PR will add the option
autoRunOnMyPackageReplaced
field to theForegroundTaskOptions
. By default this value will be set to false, so it is always optional for the user to use the feature.This feature has been created because when the App using the foreground service is (auto)updated from the store, the foreground service is shut down. This is not the desired behaviour for some apps. Now it is possible to listen to the
MY_PACKAGE_REPLACED
intent. This intent is fired when the app which is using the foreground service is updated.Refactors:
String
value when checking for intents but uses theIntent
class value.