Releases: GeoTecINIT/nativescript-task-dispatcher
v3.1.1
This release contains no breaking changes
Due to the new task async start (await lock), task invocation event could be empty while calling cancel method right after running a task. This release contains a fix to this problem.
Full Changelog: v3.1.0...v3.1.1
Multiple instances of a task running sequentially + Max timeout fixes
What's Changed
- feat: able to run same task multiple times sequentially by @agonper in #51
- fix: alarm-based task execution timeouts are no longer top-unbounded by @agonper in #52
Full Changelog: v3.0.1...v3.1.0
v3.0.1
Full support for Android 12 and NativeScript 8
This release includes full support for Android 12 and NativeScript 8.
Warning: This release contains breaking changes
To be more specific:
- Migration to the latest version of the scoped nativescript-couchbase plugin, which under the hood uses CouchBase Lite 2.8. This means that you'll have to increase your min SDK number to 22 (Android Lollipop 5.1). If you need to work with older Android versions, you must stick with the v2.x of this plugin, which still works with NS8 although it does not benefit from its latest optimizations.
It also includes the following features:
- Full Android 12 (target SDK 31) support. More specifically, all PendingIntent creations have been updated to work with mutability flags. A permission to set exact alarms is requested by default (check if your application's aim falls under the acceptable use cases for making use of them before targeting this SDK). Additionally, we also provide the basic logic to request the missing exact alarm permission in case it gets revoked by the user or the system.
- Improved traceability tools, concretely, better usage of ApplicationSettings to track when an alarm gets scheduled and when does it fire. Mainly intended for diagnostic purposes.
Finally, this release also includes many security fixes.
Summary of PRs included in this release
- Fix application settings timestamps by @matey97 in #30
- Bump follow-redirects from 1.13.3 to 1.14.7 in /demo by @dependabot in #31
- Bump log4js from 6.3.0 to 6.4.0 in /demo by @dependabot in #32
- Bump follow-redirects from 1.14.7 to 1.14.8 in /demo by @dependabot in #34
- Bump karma from 5.2.3 to 6.3.16 in /demo by @dependabot in #35
- ci: bump CI dependencies versions by @agonper in #38
- Upgrade to TS 4.5 by @agonper in #39
- Migrated to scoped couchbase plugin by @agonper in #40
- Ns8 migration + basic Android 12 support by @agonper in #42
- Android 12 exact alarm permissions + fixes to battery savings permission request by @agonper in #43
Full Changelog: v2.0.1...v3.0.0
Improved sticky notification icon options
This release does not contain any breaking changes
With this release we bring better sticky notification icon options. Concretely, it allows some degree of customisation:
- If Android version is 5 or above, the plugin will search for a drawable named:
ic_stat_notify_silhouette
, and will use it if available. - If that condition is not met or the drawable does no exist, it will try to use a drawable named:
ic_stat_notify
.
Otherwise, it will use the app icon as it was doing before.
We follow the same defaults that the @nativescript/local-notifications does, making the compatibility between the two seamless.
We don't allow yet to set a custom icon. We think that the options we offer will suffice almost all the posible use cases. But, anyway, if you need to specify a custom icon for a certain reason, please, feel free to open an issue to discuss about the details of your request.
NativeScript 7 Support
This release introduces support for NativeScript 7.
It is not backwards compatible with NativeScript 6.
However, it does not introduce any API breaking changes. Bumping version to v2 after NS7 migration is the only thing that is needed.
Other minor bug fixes:
- When a task was returning a single Date object as a result, it was not being properly serialized inside output event data
Fix event data serialization with undefined object fields
This release introduces no breaking changes
Bug fixes:
- Undefined fields contained in event data were being removed by the built-in serializer. serialize-javascript has been replaced with devalue to avoid this issue. Care has been taken in keeping deserialization compatibility, so it is safe to rollout this update at runtime.
Special thanks to @matey97 for discovering the issue.
Documentation release
This release contains no code updates
Changes:
- The documentation to help with disabling battery optimization on non-stock Android devices has been updated
Special thanks to @matey97 for his contribution
Fix alarm cancel and trigger time drift
This release introduces no breaking changes
Bug fixes:
- When two tasks were going to be executed by the same alarm trigger and one of them is cancelled before that happening, the alarm was rescheduled without needing it, thus delaying the execution of the other task(s)
- The amount of time passed between the alarm trigger and the execution of each task (~100ms, depending on the device) was not being taken into account while updating planned task's last execution time. This was inducing a time drift over time
Fix Android wakelocks and notification strings configuration
This release does not introduce any breaking changes
Bug fixes:
- Android wakelock not being acquired on certain phones due to small broadcast receiver uptime
- Foreground service notification channel was demanding notification strings even when not in use