Skip to content

Android API v3.0.0 Release

Compare
Choose a tag to compare
@mbientlab mbientlab released this 02 Mar 11:21
· 58 commits to master since this release

MetaWear Android API v3.0.0 has left the beta stage and is now officially released. The core flow of the API remains the same (i.e. library setup, interacting with modules etc.) and will feel very familiar for developers using API v2. The API as a whole, however, has been redesigned to:

  • Accommodate lambda expressions
  • Improve the DSL for constructing data routes
  • Use the Bolts Framework for managing asynchronous tasks

To get a grasp on how to use API v3.0.0, check out the API documentation, Android tutorials on GitHub, and source code for the sample app.

Breaking Changes

If you are new to using API v3, you can skip this section. Developers who have been using the beta releases should take a look at the changes listed below.

  • Appended Async to functions that return a Task object
  • Renamed a few interfaces
    • RouteElement -> RouteComponent
    • EulerAngle -> EulerAngles
    • ColorDetectorTcs34725 -> ColorTcs34725
  • Changed all data values to be in SI units
    • Gpio abs ref data and battery charge level are now float values in Volts (V)
    • Magnetic field strength represented in units of Tesla (T)
    • Illuminance data is now a float value in lux (lx)
  • Motion data producers retrieved through the motion function rather than one function per motion detection type
  • Created wrapper classes for each motion data type rather than putting them all under CartesianFloat
    • Replaced CartesianFloat with Acceleration, Angular Velocity, Magnetic Field
  • Serialization format changed
    • Developers using serialization will need to reserialize the MetaWearBoard state or remove cached states with the LocalBinder's clearSerializedState method