Sunday, October 14, 2012

Qt Sensors from Qt Mobility arrived on BlackBerry 10

TITLE_IMAGE


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!

gameplay3d engine v1.5 Released

For those unfamiliar, gameplay is an open-source and cross-platform C++ game framework that we have contributed out along with the community on github. Lately it has really been picking up steam in the 3D indie communities. Our focus in creating the gameplay3d framework was to deliver a high-quality, minimalistic 3D game framework that helps game studios understand our platform better. People have been looking into the source code of the framework (library, tools and samples) and it has been helping people understand the details on how to easily go cross-platform and how to easily include BlackBerry with very little efforts.


New features

  • Linux support (tested on Ubuntu 12.04 LTE 64-bit)
  • Linux development environment (via CMake or CodeBlock 10 IDE)
  • Vehicle physics support (via new PhysicsVehicle and PhysicsVehicleWheel classes)
  • Gamepad support for Xbox360, PS3 and Bluetooth® HID controllers on desktops systems.
  • Touch gesture support for tap, swipe and pinch.
  • Configurable multi-sampling anti-aliasing support.
  • New gameplay-tests app for easily learning basic engine features.
  • New public community forums directly off the website at www.gameplay3d.org/forums
  • File formats documentation for game.config .scene, .material, .animation, .physics, .particle
  • Visual Studio Plug-in (beta) support for BlackBerry PlayBook 2.0 and BlackBerry 10.

The ‘next’ branch features for v1.6, v1.7

  • AI path finding with navigation meshes
  • Terrain and Water
  • Asset Pipeline improvements
Go on and test it!!!!!

Wednesday, July 25, 2012

Cascades How to: Using new Camera API


With the release of the BlackBerry® Native SDK Beta 2 comes the Cascades™ Camera API. If you want to see it in action, check out the spiffy Photobomber sample app available in the BlackBerry Jam Zone and onGitHub. You can just import it, compile it, install it on your BlackBerry® 10 Dev Alpha and go.
However, there are a couple of set-up gotchas in the current beta you are going to run into if you are just trying to add Camera functionality to your own app. Luckily, they are pretty simple to get past, especially with me here telling you exactly what to do! Let’s quickly run through them.

1. QML Imports

In your QML file, right underneath the default:
import bb.cascades 1.0
you want to also add:
import bb.cascades.multimedia 1.0
This will let the QML editor know about the camera components so it doesn’t complain at you.

2. Include the Camera headers

This is pretty standard C++ stuff, but don’t forget to also import the headers into your C++ code. In your default app.cpp you will want to import at least this:
#include <bb/cascades/multimedia/Camera>
You may also end up needing a few others if you are doing more involved camera work in C++, like this:
#include <bb/cascades/multimedia/CameraSettings.hpp>
#include <bb/cascades/multimedia/CameraTypes.hpp>

3. Register the Camera in C++

In your default app.cpp file, right before the call to:
 QmlDocument *qml = QmlDocument::create("main.qml");
Add:
 bb::cascades::multimedia::Camera::registerQmlTypes();
If you don’t do this, the Camera components won’t actually get loaded and you’ll get an error. This is also why you imported the Camera header file, if you are doing the rest of the camera work in QML.

4. Link to the Multimedia Libraries

Right now the linker isn’t quite set up properly to connect your app to some of the new libraries added in R6. For now, you’ll want to manually open the <appname>.pro file and add the following line:
LIBS   += -lcamapi -lscreen  -lbbsystem  -lbbcascadesmultimedia –lzxing
Not all of those are strictly necessary (for example, the zxing library will only be helpful if you want to connect to ZXing to do some custom barcode scanning. We’ll talk about how to do that in a future blog post), but it’s not going to hurt, and the names of the libraries are not terribly discoverable on your own.
You’ll note there is no LIBS line by default in your .pro file. I like to add mine below the CONFIG line, though I’m not sure it really matters.

5. Done!

That’s it, you’re all set up! Now you can use the Camera API to your heart’s content. If doing so results in your app taking a lot of pictures, don’t forget you can use the Invoke Framework to let your users easily share them. It’s a snap.

Hello world!


Welcome to my new blog! My primary goal is to create simple but useful place where I’ll share my thoughts, findings and the overall experience with the latest BlackBerry 10 platform.
End for now…