Skip to content

Addressing main limitations

Choose a tag to compare

@agonper agonper released this 09 Nov 17:31
· 140 commits to master since this release

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 👀