Our Javascript Client API is easy to understand. It allows integration with various device capabilities.

Our Client includes the following:
- ITAnyplace.js
- index.html
- persist-all-min.js
- persist.js
- taffy.js
- taffy-min.js
- style.css
- dbdemo.js
ITAnyplace object
ITAnyplace object is defined in the ITAnyplace.js file. It is instantiated as itaObject and has the following functions:
- showMessage(title, desc,type)
- doAction(action,param1,param2,param3,param4)
- showBusy()
- hideBusy()
- switchDiv(newDiv)
- getXmlFromString(str, contentType)
- URLDecode(psEncodeString)
- URLEncode(plaintext)
Calling the Javascript API
To call native functions like camera, video, audio, GPS, Address book etc, access as follows:
- itaObject.doAction(action,param1,param2,param3,param4);
The actions that can be called are:
- camera : to take pics from camera
- gotoDefault : to open the default div, which is shown when app is first launched
- alert : to show alert
- vibrate : to vibrate the phone
- playSound : to play a sound clip
- pickImage : to pick image from gallery
- pickContact : to get the contact from address book
- gotPeople : list returned from the address book
- getLocation : to get GPS location
- gotLocation : to show the retrieved location
- getProductInfo : to get the device information.
- gotProductInfo : to show the information of the device
- getAcceleration : to get the acceleration info
- gotAcceleration : callback for acceleration result
- recordOrStop : to record an audio clip
- playOrStop : to play audio
- map : to show a location on a map
- sync : to sync the data with the server
- gotSyncResponse : response from server of sync call
- isNetworkReachable : to check if network is available
- gotNetworkReachable : result of isNetworkReachable call
- playVideo : to play a video
- launchExternalUrl : to launch a url in the browser.
- launchExternalUrlInSubView : to launch a url in subview
- hideSubView : to hide the sub view
|