George McKinney Adventures in Software Development

July 4, 2014

Create, Build & Install BlackBerry WebWorks 2 Mobile App via Command Line

Filed under: BB10,BlackBerry,Cordova — Tags: , , , — georgemck @ 12:25 am

With the coming release of BlackBerry 10.3, there is renewed interest in BlackBerry app development. This is a quick example of how to build and install the default BlackBerry 10 application that comes with WebWorks onto a mobile device.

WebWorks command line leverages Apache Cordova so many of the same commands work. Cordova requires Node.js. When you install the WebWorks SDK 2.0, it will come with Node.js. Get the WebWorks SDK at https://developer.blackberry.com/html5/download. I always install with administrator privileges.

Open up terminal or a DOS command prompt and make sure that you can type WebWorks and see that it is installed

webworks

WebWorks in the command line

WebWorks in the command line

Next you can create your mobile application project,

webworks create firstapp com.example.firstapp

and change to its project directory

cd firstapp

If you go a little further you will see the config.xml inside the www folder. This file gives instructions to the compiler when it builds your mobile app. To test this default application, you don’t need to change this. You can build the app with the following

webworks build

and this is what you will see:

Created a BB10 Mobile App Bar file

WebWorks in the command line

To install the application, you can change directory to where it built it and then install it from there. Your device may need a debug token to install, it will let you know if you do.

blackberry-deploy -installApp -password your_password_goes_here -device 169.254.0.1 bb10app.bar

Since I put my device in developer mode, the IP address it gave me was 169.254.0.1.

Install App by Command Line

Install App by Command Line

We can see installed app:

App Icon

App Icon

Just tap on it to open it:

App running

App running

So, pretty nice… Some extra thoughts: To install the app on a device, you will need signing keys. you can get them for free from BlackBerry: https://www.blackberry.com/SignedKeys/codesigning.html Be sure to register as a BlackBerry developer first, https://developer.blackberry.com which will attach your developer account with your BlackBerry ID; this can be the same one you use for BlackBerry Messenger!

Hope you enjoyed it. Have any comments, send me a message on my Twitter account, @georgemck.

December 26, 2013

Augmented Reality Mobile App Development

Filed under: Augmented Reality,BB10,BlackBerry — georgemck @ 3:39 pm

HTML5DevConf: George McKinney “Augmented Reality Mobile App Development”

October 26, 2013

Augmented Reality Mobile Apps in JavaScript

Filed under: Android,Augmented Reality,BB10,BlackBerry,Chrome Browser,Mobile,PhoneGap — georgemck @ 1:03 am

Hello,

On Oct. 22nd, 2013, I gave a presentation at the HTML5 Developers Conference in San Francisco, https://www.html5devconf.com/archives/oct2013/speakers/george_mckinney.html.

This is about JavaScript, Augmented Reality, mobile apps, PhoneGap, BlackBerry WebWorks and touched on Google Nexus devices and the Tizen OS.
There are many hyperlinks to click on to go to source code, demos and resources inside.

My presentation is viewable at the link below.

To navigate it, use the Arrow keys to go up, down, right, left.

AR Mobile Apps

To navigate it, use the Arrow keys to go up, down, right, left.

Thank you,
George

May 18, 2013

Mobile Augmented Reality App

Filed under: Augmented Reality,BB10,BlackBerry,Cordova — georgemck @ 10:51 pm

Sample project for creating Mobile Augmented Reality Mobile Apps for the BlackBerry 10 platform available at https://github.com/georgemck/BB10-WebWorks-Community-Samples-Augmented-Reality

Uses:
– BlackBerry WebWorks (App packaging)
– jQuery Mobile (Mobile UI)
– Three.js (WebGL)
– JS Aruco (OpenCV)
– getUserMedia (HTML5 spec)

Created a mobile AR app using Apache Cordova, https://cordova.apache.org, which is related to Adobe PhoneGap, http://www.phonegap.com. This mobile app uses the JS Aruco library, https://code.google.com/p/js-aruco. JS Aruco is a port of OpenCV, http://opencv.org, for JavaScript, https://www.uco.es/investiga/grupos/ava/node/26 It takes advantage of HTML5 browser capabilities getUserMedia (https://caniuse.com/stream) and WebGL (checkout Three.js, https://github.com/mrdoob/three.js) to enable desktop browsers to create augmented reality using JavaScript.

First, I used Google’s Chrome Browser to verify the web application worked on the desktop. This got me thinking about the recently released BlackBerry 10 phones and their heavily touted “better than desktop Chrome” mobile browser, and I thought I would give it a try. Heading over to one of the JS Aruco demos, https://inmensia.com/files/aruco/debug-posit/debug-posit.html, in the Z10′s mobile browser, it worked. I decided to take things a bit further and actually build a mobile app rather than use the website application. I used WebWorks which is the BlackBerry-engineered Cordova PhoneGap distribution with deeper integration with device capabilities than Cordova on BlackBerry mobiles. The result of the test was this video, http://www.youtube.com/watch?v=eb10iE…. Performance is a little slow and the video a bit hazy but I know it will perform better with some code optimization… (more http://www.georgemckinney.com/2013/05…)

Special thanks to:
– Juan Mellado https://github.com/jcmellado
– Mr.doob https://twitter.com/mrdoob
– Justin Lee deleted his account (https://twitter.com/triplez82)
– Yosun Chang https://twitter.com/yosun

Enjoy,
George @georgemck

May 17, 2013

Mobile Augmented Reality with HTML5 on BlackBerry 10

My friend @Yosun on Twitter of AReality3D asked me to create a mobile AR app using Adobe PhoneGap, http://www.phonegap.com, and the JS Aruco library, https://code.google.com/p/js-aruco. JS Aruco utilizes a port of OpenCV, http://opencv.org, for JavaScript, http://www.uco.es/investiga/grupos/ava/node/26. It takes advantage of HTML5 browser capabilities getUserMedia (http://caniuse.com/stream) and WebGL (checkout Three.js, https://github.com/mrdoob/three.js) to enable desktop browsers to create augmented reality using JavaScript.

I used Google’s Chrome Browser to verify the web application worked on the desktop. This got me thinking about the recently released BlackBerry 10 phones and their heavily touted “better than desktop Chrome” mobile browser, and I thought I would give it a try. Heading over to one of the JS Aruco demos, http://inmensia.com/files/aruco/debug-posit/debug-posit.html, in the Z10’s mobile browser, it worked. I decided to take things a bit further and actually build a mobile app rather than use the website application. I used WebWorks which is the BlackBerry-engineered Cordova PhoneGap distribution with deeper integration with device capabilities than Cordova on BlackBerry mobiles. The result of the test was this video, http://www.youtube.com/watch?v=eb10iEwDvvs. Performance is a little slow and the video a bit hazy but I know it will perform better with some code optimization…

A little background about augmented reality. I started experimenting with augmented reality back in 2009 using using the FLAR Toolkit, http://www.libspark.org/wiki/saqoosha/FLARToolKit/en, with Papervision3D, https://code.google.com/p/papervision3d, for demoing virtual fashion shows in LA. FLAR Toolkit enabled Flash developers to create browser-based experiences using 3D and the video stream from a computer’s web camera. This technology uses black-and-white markers for tracking. A pretty-cool way for developers playing around with computer vision.

Total Immersion, http://www.t-immersion.com, took this experience to a higher level when the company released its first Flash-based AR SDK for their industry-leading D’Fusion studio. This brought their hallmark markerless tracking ability using live video streams with excellent performance to corporate brands. Take a look at this project I worked on for Kraft using it, http://www.georgemckinney.com/2010/08/augmented-reality-august-2010. Unfortunately, the licensing cost of their solution kept it out of reach for most developers.

Fast-forward a couple years and now Flash is a less emphasized technology and being rapidly displaced by HTML5 on destkop and by native coding in mobile devices. Qualcomm released its augmented reality SDK for Android and iOS devices, Vuforia, for free which brings native and Unity 3D mobile developers the ability to create AR. Many brands have adopted this solution including American Apparel, http://www.qualcomm.com/media/releases/2012/06/27/vuforia-extends-image-recognition-cloud, for use with smartphone apps.

Mobile Augmented Reality with JavaScript can be considered another piece of the puzzle being filled in to replace Flash. With this success, I see many more applications that are leveraging the dynamic nature of JavaScript and the ease of use and device capabilities a modern phone provides. Congratulations to all the projects and teams involved here in breaking new ground.

December 28, 2012

Snake Eyes Dice

Filed under: BB10,BlackBerry — georgemck @ 2:04 pm

For the first BlackBerry BB10 smartphone, aka London, I packaged a little dice game using WebWorks. Total time was 4 hours because I was able to use open source code and images.
Special thanks to:
Dado and
Michael Eidson for them.

The marketing blurb about it: “When you play a game of chance and skill, no other game compares to dice…
Whether young or old, this fast-moving game will be sure to entertain and amaze when “snake eyes” appears!

The game is completely free, no ads or embedded tracking software! You can grab a copy of it here:
http://appworld.blackberry.com/webstore/content/20079408/?lang=en

Powered by WordPress