Sensors on BlackBerry 10 Have Arrived!


Here’s a guest post from Adam Parco from our Sensor Algorithms & Services team – Ed.


Developing for BlackBerry® has never been faster or easier.  We have been working hard to give you the same experience when incorporating sensors into your game or application.  With the release of Beta 3, we have added complete support for sensors in Cascades™, leveraging the power of Qt Sensors from Qt Mobility.  QML gives you the unparalleled flexibility and simplicity of adding a sensor to your app in as little as 4 lines of code!

   Compass {
      active: true
      onReadingChanged: {
          console.log("Azimuth" + reading.azimuth);

Of course we still also support the C++ Qt Sensor API for those hardcore developers out there.  For more information on including and using sensors in your project check out the newly updated documentation here.

The device movement alarm is a great example on leveraging some of RIM®’s exclusive API extensions.  Use them to differentiate your app.  Look for the following APIs:

  • axesOrientationMode
  • accelerationMode
  • alwaysOn
  • skipDuplicates

By now you are probably screaming “Show me the code!”.  We have you covered and have created several examples that we want you to copy, paste, and mash up into your applications.  Show us what you can do!

Join the conversation

Show comments Hide comments
+ -