Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Sample Application Demonstrating HTML5 and Accelerometer Integration in a WebWorks Application

by BlackBerry Development Advisor ‎07-12-2011 12:34 PM - edited ‎08-12-2011 01:27 PM (6,294 Views)

Background

Aura was initially demonstrated during Mobile World Congress 2011 as a proof of concept for HTML5 and accelerometer integration within a BlackBerry® WebWorks™ application.

 

The following was the demonstration given at MWC 2011.

 



 

How It Works

This sample creates a static 4-day forecast in Barcelona based on the current date and time. The key components of this application are:

 

index.html

The main landing page for the application which brings together our various CSS and JavaScript® components.

 

events.js

Handles the majority of initialization and user interaction.

 

rope.js

Contains the calculations to provide 'swinging' effects to items.

 

Integration with the accelerometer is also included here to expand on these effects during device movement.

 

window.addEventListener("devicemotion", function(event) {
		acc.x = event.accelerationIncludingGravity.x;
		acc.y = -event.accelerationIncludingGravity.y;
	}, true);

  

main.css and dock.css

Hold the styles for our main application and drop-down dock; respectively. Also contain definitions for a variety of animated transitions.

 

Supported Platforms

BlackBerry® Tablet OS. This sample has been specifically formatted for the BlackBerry® PlayBook™  tablet's display.

 

More Info

The entire Aura source for this application has been open sourced and made available on the WebWorks GitHub repository.

 

This sample can then be packaged using the BlackBerry WebWorks tools and deployed to a physical BlackBerry PlayBook. Alternatively, it can be hosted "as is" on a web server and viewed directly through a WebKit browser.

 

Contributors
Comments
by Developer on ‎07-15-2011 01:56 AM
Wow! Thanks guys. I'm really looking forward to playing with the code on this one!
Users Online
Currently online: 42 members 1,097 guests
Please welcome our newest community members: