Current location: Brighton, UK

Feeding Android browsers accelerometer data via Flash

Posted on Saturday, September 17, 2011 @ 17:56 CET

In a forthcoming blogpost I'll talk about not only the awesome Flash on the Beach conference that just flew by but also the web-app we built for it at fotb.me.

In one of the many bar chats, I was talking to Paul King about our experience building it and he asked if we'd played around with the accelerometer data. I said we had, albeit briefly and I incorrectly stated that we had gotten it working on iOS, Android and PlayBook.

iOS 4.2+ devices support the DeviceMotion API and so does the PlayBook. The only gotchas is that instead of listening for the devicemotion event you have to hook into the window.ondevicemotion function itself for this to work on the PlayBook.

For Android phones I quickly threw together a SWF that would simply listen to a flash.sensors.Accelerometer instance and then send those over ExternalInterface to a JavaScript handler which then takes it from there.

This is an extremely basic example, but all the code is on GitHub so get it there or check the demo. Since the PlayBook supports both Flash and devicemotion a simple check is done so we don't get the data twice.

It should go without saying that if your Android phone doesn't have Flash installed then you get nothing.

- paulo

Comments:

1
Shazia Hussain writes:
Hi Paulo, i am the director of a specialist resourcing agency and we are recruiting on behalf of a Global Media Leading Giant. We have a number of Solutions Design/Architecture roles for this organisation. Competitive salary / benefits and the opportunity to work in a progressive and technology driven organisation in Central London.
If you are interested in discussing this role, please send me your e-mail ID & I will send you a full copy of the job description.
We are looking for people with extensive knowledge with print productions systems - especially DTI suite of products including DTI Content Publisher, DTI Advertising and DTI Circulation
Experience with a variety of Finance and HR systems including Agresso, iTrent and Successfactors
Good understanding of integration approaches including: ESB, Middleware and Web services
Experience of analysis, design and integration of multiple third party systems
Knowledge of Salesforce with other Service-orientated business services/solutions
Good understanding of Object Orientated development, including analysis, design and implementation
Previous experience working with content management systems, CRM and Data warehousing solutions
Good understanding of Web Technologies including SEO, SEM, Analytics.
Strong understanding / knowledge of working with large scale web platforms
Strong understanding of software development lifecycles in particular scrum, Agile, XP and waterfall is desirable
Infrastructure knowledge covering Unix, Linux, Windows, firewalls, Load Balancers, Data Centre topologies, virtualization technologies
Knowledge of application development technologies and frameworks such as MVC, .NET, Java, LAMP
Good understanding of industry best practices, techniques, tools and resources.
Extensive experience in creating software requirements specifications, interface specifications and data models.

Please contact me to discuss further; shazia@e-developergroup.com / 07595115808

Best Regards,

Shazia Hussain

# November 18, 2011 12:33 CET

2
Paulo Fierro replies:
Hi Shazia, I'm not sure this is the best place for a job ad. Good luck finding a candidate.

# January 05, 2012 00:49 CET

Post a comment:

You must have Flash and JavaScript enabled to post a comment.