jQueryMobile + PhoneGap

http://view.jquerymobile.com/master/demos/

jQuery Mobile is a touch-optimized HTML5 UI framework designed to make sites and apps that are accessible on all popular smartphone, tablet and desktop devices.

For technical info, visit the API documentation.

A sample PhoneGap App using jQuery Mobile

Features:
– Ready-to-deploy
– Built on phonegap-1.4.1 and JQuery Mobile 1.0.1
– Easy to customise code base
– Custom theming for jQuery Mobile
– Google Fonts API for custom fonts
– 180+ lines of CSS which can be customised to your desired look and feel
– Minimal use of images by utilising CSS3
– Internet connection check before displaying every screen. Handy if you plan to use a REST API that connects to a web server
– 4 pages, ready to add your own content

Device API【Accelerometer】

The simulator has limitations when it comes to device sensors such as the accelerometer and the camera.

1. Accelerometer

The Accelerometer provides feedback for the devices motion across all three axes. In PhoneGap, there are, getCurrentAccelerationwatchAcceleration and clearWatch; 
There are also some arguments to pass through on the Accelerometer method: accelerometerSuccessaccelerometerError and accelerometerOptions.

navigator.accelerometer.getCurrentAcceleration(accelerometerSuccess, accelerometerError);

// Update acceleration every 3 seconds

    var options = { frequency: 3000 };

    watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options);
 we pass in a frequency option into the watch method. This is in milliseconds, so every 3 seconds that method will be fired again, and on success we will update the HTML of an element with the ID of the accelerometer.

 

PhoneGap 跨平台大集合

1. what PhoneGap actually is?

The challenge was to put together a framework that would allow web developers to use HTML, CSS, and JavaScript to code applications that could take advantage of the native functionality of the mobile device, such as the Camera, Storage, and GeoLocation features.

The PhoneGap currently supports the Accelerometer, Camera, Compass, Contacts, File, Geolocation, Media, Network, Notifications (Alert, Sound, and Vibrate) and Storage device APIs. There is full support for all of these features in the newer iOS Devices (3GS+) and Android.

2. what you can use it for?

PhoneGap is an open source platform that allows you to create cross-platform mobile applications with HTML, JavaScript, and CSS. In order to interact with device hardware, PhoneGap provides a JavaScript API that will interface with features such as the on-board camera, GPS, and accelerometer. Even though PhoneGap is great for developing cross-platform applications, the code for developing applications while targetting one platform or another will vary.

Now, we need to add some permissions to the manifest file to ensure that PhoneGap will run correctly:

        <uses-permission android:name="android.permission.CAMERA" />
        <uses-permission android:name="android.permission.VIBRATE" />
        <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
        <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
        <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
        <uses-permission android:name="android.permission.READ_PHONE_STATE" />
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission android:name="android.permission.RECEIVE_SMS" />
        <uses-permission android:name="android.permission.RECORD_AUDIO" />
        <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
        <uses-permission android:name="android.permission.READ_CONTACTS" />
        <uses-permission android:name="android.permission.WRITE_CONTACTS" />  
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />  
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
生活在西班牙

自己动手丰衣足食

BlueAsteroid

Just another WordPress.com site

Jing's Blog

Just another WordPress.com site

Start from here......

我的心情魔方

天才遠私廚

希望能做一個分享各種資訊的好地方

语义噪声

西瓜大丸子汤的博客

笑对人生,傲立寰宇

Just another WordPress.com site

Where On Earth Is Waldo?

A Project By Melanie Coles

the Serious Computer Vision Blog

A blog about computer vision and serious stuff

Cauthy's Blog

paper review...

Cornell Computer Vision Seminar Blog

Blog for CS 7670 - Special Topics in Computer Vision

datarazzi

Life through nerd-colored glasses

Luciana Haill

Brainwaves Augmenting Consciousness

槑烎

1,2,∞

Dr Paul Tennent

and the university of nottingham

turn off the lights, please

A bunch of random, thinned and stateless thoughts around the Web