For any developer that is all set to develop for Mobile Devices, it is a great boon if the device can be tested in all aspects. For those that have developed with Objective-C must be aware that all Apple Laptops come with the Hard Disk motion sensor which with the help of software can allow you to wave your laptop and act as an accelerometer. Still, the Simulators are unable to make full use of the same.
Developers that are working with Corona SDK love the wonderful SDK but are all stuck at the point where they need to test how the code works with accelerometer. When I started off with CoronaSDK, I had the 30 day trial period at first. I had to get the License just so that I could upload my app to the device to test the accelerometer. Similarly, another developer, thought of an ingenious plan to take over the world, but the first step was to make the accelerometer to work with CoronaSDK simulator.
A few messages on the Corona forum boards, followed by a few more, and a few more. Till one day a surprise message from Matthew Pringle informed all CoronaSDK users that he had finally succeeded in creating an app that allowed the simulator to accept accelerometer data live from a physical device.
Priced at $9.99 from the iTunes store, this app works on the iOS device (iPad/iPhone/iPod touch) and if you drop the remote.lua file into your project, and in your main.lua, you need to initialise and start the remote server that will start streaming the data from the device to your project.
The best part is that when you compile and build and run the app on a device than a simulator, the data is not sourced from the device to the simulator, but directly from the device into the app. So you do not have to write any code to switch operations and/or disable the data source.
The application has been updated recently and has also included compass/direction data in addition to the already existing accelerometer data. The developer is also trying to work on touch events so that you can use the device for testing, but that could be in a future release, maybe the developer might drop it.
Keeping with the CoronaSDK tradition of simplicity, here's a peek of how simple it is to initialise and get data from the app.
-- Load The Remote
local remote = require("remote")
-- Start The Remote On Port 8080
remote.startServer( "8080" )
-- Start The Compass ( if you want to use it )
remote.startCompass()
-- Get The Latest Accelerometer Values
local function updateAccelerometer()
-- This Runtime Listener Is An Example Of How To
-- Access The Remote You Can Query remote.xGravity
-- Or Any Other Value From Anywhere In Your Application
local xGravity = remote.xGravity
local yGravity = remote.yGravity
local zGravity = remote.zGravity
local xInstant = remote.xInstant
local yInstant = remote.yInstant
local zInstant = remote.zInstant
local isShake = remote.isShake
-- Only Use If Compass Activated And Running v1.1 Or Later
local magnetic = remote.magnetic
-- Print xGravity To Terminal
print( remote.xGravity )
end
-- Add Enter Frame Listener
Runtime:addEventListener( "enterFrame" , updateAccelerometer )
Summary
Software : Corona Remote
Version : 1.2
Publisher : Matthew Pringle
Website : http://www.coronaremote.com/
Platform : iOS 3.1 or higher
Price : $9.99
iTunes App Store : http://itunes.apple.com/us/app/corona-remote/id412625210?mt=8#
And we have a copy of Corona remote for one lucky winner, all you need to do
1. Follow @whatsin4me
2. Retweet "Win a free copy of Corona Remote, follow @whatsin4me and RT this msg."
or
head over to our Facebook page and like our page at http://www.facebook.com/pages/ReviewMe/137640632964588?v=wall and post a comment under the review that you want to win a copy of this software.
Comments
Post a Comment