Skip to content

Releases: GeoTecINIT/nativescript-task-dispatcher

Fix Android's alarm manager cancel action

23 Nov 12:49
Compare
Choose a tag to compare

This release is a patch which introduces no breaking changes

Under some situations Android Alarm was not being cancelled on request. Alarm's Manager code has been updated to overcome this situation.

Special thanks to @matey97, for spotting and fixing the bug.

Addressing main limitations

09 Nov 17:31
Compare
Choose a tag to compare

Warning! This release no longer supports Android 4.3 Jelly Bean and bellow. The min SDK has been bumped to 19 (Android 4.4 - KitKat)

This release is aimed to fix certain integration problems of our plugin with other libraries and apps, along with addressing some main limitations of the plugin:

  • Support for parallel task execution, based on a trigger event.
  • Support for tasks to be run on the foreground in the middle of a task chain.
  • Support for any-time bellow 15 minutes tasks execution.

We were using NanoSQL to persist the state of our plugin. NanoSQL uses a global singleton object to interact with the underlying databases, but it can only interact with one at once. This does not scale well when the application uses multiple SQLite databases managed by NanoSQL, leading to crossed calls between databases.

That is why we have decided to replace the NanoSQL dependency with a Couchbase Lite plugin.

What does this means for you? When updating to this version of the plugin, your production apps will lose their state momentarily. This only affects human activity recognisers, that will loose track of the latest activity. The plugin will operate as usual once the user changes the activity, keep this in mind to control possible duplicate events that could arise at the moment of the migration.

New features:

  • Now an event can trigger the execution of two or more tasks to be executed in parallel 🏃
  • Now if at some moment the app is going to require to schedule tasks below 15 minutes windows, the user will be asked to disable battery optimisations from the very beginning. Previously, it was by the time the concrete task with that requirement was going to be planned ⏲️
  • Having a task that requires to run in the foreground in the middle of a task chain is no longer a limitation. The task graph browser is used to detect dependencies between tasks and a whole new foreground checker has been implemented to check for foreground execution up in the task chain ⏭️
  • Testing API has been improved to reduce setup code when testing custom tasks in depending apps / plugins

Improvements:

  • Demo application task graph has been updated to harness parallel execution possibilities 😎
  • Demo application now prints application task graph upon load 🤓
  • Demo's home screen has been updated to point to looking at the logs to see how the plugin works 📱
  • Improve task error logs with a complete stack trace
  • Logging traceability has been improved to identify where child events are being spawned, both in event-based and scheduling-based triggered tasks

Bug fixes:

  • NanoSQL dependency was preventing smooth integrations with other plugins and apps using the same dependency, now Couchbase Lite is used instead.
  • A bug in the internal event manager has been caught and controlled for now, must be watched 👀

Improve event data consistency

20 Oct 13:55
Compare
Choose a tag to compare

This release fixes two bugs found when working with complex event data:

  • When a task was producing a data array as a result of its execution, the data array was being turned into an object, hence loosing key array functionalities.
  • Dates were being formatted when they were being included inside an external event's payload.

To overcome these two problems, proper data serialization has been implemented via the use of serialize-javascript.

Task parameters hotfix

29 Sep 17:07
Compare
Choose a tag to compare

This release fixes two problems that were preventing developers to use task params:

  • Task graph loader was not properly propagating task parameters to the task planner.
  • Task store was identifying similar tasks with different parameters as equal tasks, thus leading to unexpected behaviors when a task was being used twice with different parameters.

Better interoperability and stability improvements

20 Jul 12:39
7da0a99
Compare
Choose a tag to compare

This release does not introduce any breaking changes

Bug fixes:

  • Plugin's database name is strictly transmitted to nSQL before each query to avoid possible conflicts with other plugins or the persistence of the host application itself.
  • Task cancellation was not generating a task chain finalization event, leading to the event-driven scheduler remaining un-killed until the end of the scheduler timeout.
  • Tasks are no longer prepared in parallel, meaning that if two tasks have the same preparation requirements one will fix the other instead o trying to prepare the two in parallel, thus improving app's user experience.
  • Android task scheduler has been protected with a mutual execution lock, this prevents unexpected behaviors while canceling and scheduling tasks in parallel (e.g. due to coincident event triggers).

Enhancements:

  • Event based task scheduler now extends its execution a few seconds after task finalization, thing that prevents the OS to start and stop the service repeatedly when multiple events raise close in an overlapping time window.
  • Plugin's logger now logs error stack trace, if available.
  • Plugin now uses native current time acquisition. This could lead to the scheduler being more accurate, speaking in terms of time.

Android task scheduler + event-based execution

04 Jun 09:31
Compare
Choose a tag to compare

This is the first stable release of NativeScript Task Dispatcher.

It allows to schedule tasks in Android starting from a minute or more time. Tasks can be both scheduled once or in a recurrent manner.

Tasks can also be triggered in reaction to another task result or an external event. This can happen while the app is visible or meanwhile is in the background.