facebook

Phonegap example

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #333384 Reply

    abhall98
    Participant

    I am looking at incorporating the iPhone camera in my app
    I believe that MobiOne does not support camera directly but the camera can be acessed through the PhoneGap API’s
    I have downloaded the PhoneGap Kit and am wanting to know how to include it in the App
    I have tried including then file cordova-2.2.0.js in the files but this does not appear to work
    I keep getting an error with the navigator.device.capture.captureImage(captureSuccess, captureError, {limit: 2}); call and the document.addEventListener(“deviceready”, onDeviceReady, false); does not appear to work

    Do I need to compile this through PhoneGap to get it to work?

    Does anyone have a simple example of how to get this to work

    I have include my appliication source

    Attachments:
    You must be logged in to view attached files.
    #333394 Reply

    support-michael
    Keymaster

    @abhall98

    Some notes on using the phonegap api in your mobione app

    0) Cordova/PhoneGap versions supported by MobiOne App Center Builder –
    PhoneGap 1.1: MobiOne 2.2 and earlier
    Cordova 2.1: MobiOne 2.3M1 and greater

    1) phonegap.js is automatically weaved into main html file during app build time
    – you can override this by including your own version of phonegap.js but it must be in sync with the Cordova/PhoneGap version

    2) add your deviceready callback to the documentReadyHandler() function found in your project’s <prj>_custom.js
    – the framework calls documentReadyHandler as part of onload

    #333398 Reply

    abhall98
    Participant

    Thanks wayne
    Tried a build with 2.2.0 and got an undefined error when referencing device.uuid
    used 2.1.0 and tried navigator.device.uuid – still undefined but also got error

    code segment ( called from [Get UUID button]

    function getUUID(){
    alert(“UUID = ” + navigator.device.uuid);
    }

    Exception building contova.JS:globals
    Reference Error
    cant find variable org for key “exec”

    when loading for first time

    #333401 Reply

    WaylandDavis
    Member

    I think it’s strange, but I’m using MobiOne 2.2.3 without the M1 and I have successfully used the PhoneGap applications as listed in 2.2.0 without a problem so far. I’ve only done it on the iPhone 4s with 6.01 IOS and the iPad 2 with the 6.01 IOS on it.

    I can call the camera, take a picture, display it in an image and later, I can recall it from the CameraRoll and then use some other tools to draw on the image. All of it seems to work relatively well. I haven’t tried sending the image to another server yet, but that’s on my testing list. Also, I am planning to build an app using the Media section to capture and playback audio. I plan on building an app that attaches audio to certain tags on images and then the audio can be played back by clicking on the images.

    I’ve attached a zip file with my project for anyone who wants to look at it. Don’t forget, you have to Build and IOS App and install it on the iPhone 4s or iPad with 6.01 to test it.

    Hope it helps.

    Wildwex

    Attachments:
    You must be logged in to view attached files.
    #333403 Reply

    abhall98
    Participant

    Excellent
    Downloaded and complied using MobiOne 2.3 and Cordova 2.2
    Ran fine on iPhone 3GS using iOS 5.1

    Thanks for the good work
    Should be useful to a lot of people

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Phonegap example

You must be logged in to post in the forum log in