Government // Mobile & Wireless
08:41 AM
Todd Ogasawara
Todd Ogasawara
Connect Directly

Microsoft on{X} For Android: A Visual Tour

Microsoft--yes, Microsoft--has a new Android programming platform called on{x} and it's great. Developed by the Microsoft R&D team in Israel, on{x} lets anyone turn an Android phone into an uber event-driven notification gadget.
10 of 18

Unfortunately, the "Launch the music app when I am walking" script didn't work for my Android phone, a Nexus One. It's probably because the software underlying the modeOfTransport API call requires combination of an accelerometer and a gyroscope for determining when someone is walking--and the Nexus One does not have a gyroscope. So I decided to write my own script, above. on{X} code makes use of system triggers to create simple but potentially powerful and useful apps. I wanted a rule that would tell me when my phone's battery was fully charged. To do this, I wrote a script to make use of the "battery" API to trigger my code when a change in battery charge percentage is detected. My code checks if the battery is fully charged when a change occurs and then notifies me. Note that the code does not go into an endless loop when testing or if a charge is greater than 99% because the main trigger is the change of the battery charge level from 99 to 100%. The code inside of that trigger only gets executed when the charge level changes. The on{X} Web-based editor is very good. You can see from my screenshot that it provides syntax color coding. It also offers brace matching and syntax checking. It warned me I was missing a semi-colon.

10 of 18
Comment  | 
Print  | 
More Insights
Register for InformationWeek Newsletters
White Papers
Current Issue
InformationWeek Elite 100 Digital Issue, April 2015
The 27th annual ranking of the leading US users of business technology
Twitter Feed
InformationWeek Radio
Archived InformationWeek Radio
. We've got a management crisis right now, and we've also got an engagement crisis. Could the two be linked? Tune in for the next installment of IT Life Radio, Wednesday May 20th at 3PM ET to find out.
Sponsored Live Streaming Video
Everything You've Been Told About Mobility Is Wrong
Attend this video symposium with Sean Wisdom, Global Director of Mobility Solutions, and learn about how you can harness powerful new products to mobilize your business potential.