Government // Mobile & Wireless
News
6/6/2012
08:41 AM
Todd Ogasawara
Todd Ogasawara
Slideshows
Connect Directly
Twitter
Google+
RSS
E-Mail
50%
50%

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.
Previous
10 of 18
Next


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.

Previous
10 of 18
Next
Comment  | 
Print  | 
More Insights
Register for InformationWeek Newsletters
White Papers
Current Issue
InformationWeek Tech Digest - August 27, 2014
Who wins in cloud price wars? Short answer: not IT. Enterprises don't want bare-bones IaaS. Providers must focus on support, not undercutting rivals.
Flash Poll
Video
Slideshows
Twitter Feed
InformationWeek Radio
Archived InformationWeek Radio
Howard Marks talks about steps to take in choosing the right cloud storage solutions for your IT problems
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.