CoreMobile is a native extension to easy access to core mobile features (e.g gyroscope) in a seamlessly way on iOS and Android. It has an advanced Gyroscope API, which monitors the device’s built-in gyroscope, in combination with hints from its other available sensors, to compute accurate orientation readings. The API and results are exactly the same, whether the game is running on iOS or Android. The measurement is made using synchronous access to the device’s current roll. The local notifications API allows a developer to send a message to the current user only after a given delay.
The network connection monitoring can determine if the internet connection is available using a single function call. In case real-time updates are required, it’s possible to listen for the connection being lost or gained with one simple event. The vibration API adds tactile feedback to games by triggering the vibration on the user’s mobile phone. Finally the native UI provide native modal dialogs to alert the user to an important event, ask a question, collect simple input, or get login information.
Sample
function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void; function cancelAllLocalNotifications():void; function cancelLocalNotification(id:int):void; function create():CoreMobile; function futureTimeSeconds(secondsFuture:Number):Number; function getDeviceMotionData():DeviceMotionData; function isDeviceMotionAvailable():Boolean; function isNetworkReachable():Boolean; function isSupported():Boolean; function scheduleLocalNotification(id:int, timeSeconds:Number, title:String, message:String, alertLabel:String = null, extraData:Object = null):void; function showModalConfirmationDialog(title:String, message:String, buttonLabel:String):CMDialogDispatcher; function showModalCredentialsDialog(title:String, message:String, confirmButtonLabel:String, cancelButtonLabel:String = null):CMDialogDispatcher; function showModalInputDialog(title:String, message:String, confirmButtonLabel:String, defaultPrompt:String, cancelButtonLabel:String = null):CMDialogDispatcher; function showModalYesNoDialog(title:String, message:String, yesButtonLabel:String, noButtonLabel:String):CMDialogDispatcher; function startMonitoringDeviceMotion():void; function stopMonitoringDeviceMotion():void; function vibrate(duration:Number = 1):void;
Does this allow for getting gyroscope data as a background process, so when the phone locks, or changes app?
I couldn’t find that info on the docs. Try asking the guys at @milkmangames.
Can you post up the gettingstarted.pdf provided with the extension?
I don’t have that PDF, Anthony. I could not find that file on the extension page either.