facebook

PhoneGap Questions SOLVED

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

    WaylandDavis
    Member

    I have two PhoneGap questions:

    1. Does MobiOne implement all the features/functions of Apache Cordova PhoneGap 2.2? I’ve tried to get several things to work and never seem to know what can be used in the Test Center and what cannot. Native things like Camera, GPS, etc., I know don’t work, but what about LocalFileStorage and some of the other file handling functions?

    2. Is there a chance you could post a list of what PhoneGap features are currently supported?

    Thanks so much,

    wildwex

    #339583 Reply

    Brandon
    Member

    All of the phonegap features I have tried have worked fine. This includes the Camera, GPS, Storage,etc. They will not, however, work in the Test Center, they must be ran on an actual device. This seems to be where most people have the problem.

    #339585 Reply

    davidg
    Member

    I haven’t used all of them but I have used camera, vibrate and a few others.

    Here is what mobione says about it just in case you havent read it. http://www.genuitec.com/mobile/docs/usingCordovaAPI/usingCordovaAPI.html

    maybe the guide will help show you what part is causing the problem.

    #339596 Reply

    WaylandDavis
    Member

    Thanks guys for your prompt reply.

    I’ve been fighting PhoneGap 2.2 for the past week, trying to the LocalFileSystem working. (Note: This is not LocalStorage with the key:data structure), this part of the File API where you can create Directories move, copy files, etc. I need ability to take a photo and save it to a persistent file in the Apps sandbox and then list that file in a database for later recall. Also, I need the ability to take the Path from a photo selected from the SAVEDPHOTOLIBRARY and copy it to the new folder and list that photo in the local database (I use the LocalStorage for this with “photo01:”images/myfile.jpg”, “photo02:”images/myfileWednesday.jpg”, etc. and the database works fine.)

    But my getting the sample code from the 2.2 docs to work has not succeeded.
    I’ve tried to test it as simply as possible and put the following code into a test project:

    phoneui.documentReadyHandler = function()
    {
    $(“#m1-directoryListing-textArea1”).text(“Cows, Ducks, Pigs”);

    } // Cordova is ready
    //
    function onDeviceReady() {
    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
    }

    function onFileSystemSuccess(fileSystem) {
    $(“#m1-directoryTest-textArea1”).text (fileSystem.name);
    }

    function onResolveSuccess(fileEntry) {
    $(“#m1-directoryTest-textArea1”).text (fileEntry.name);
    }

    function fail(evt) {
    $(“#m1-directoryTest-textArea1”).text (evt.target.error.code);
    }

    I build it for my iPhone 4s (iOS 6.1.3) and it doesn’t do anything. In the test center, the debugger shows that “LocalFileSystem” is undefined.

    Any clues? would be greatly appreciated.
    wildwex.

    #339635 Reply

    Brandon
    Member

    You cannot use PhoneGap features in the test center. They must be ran/tested on a device to function correctly.

    #339681 Reply

    WaylandDavis
    Member

    Yeah, I know that the Test Center doesn’t test PhoneGap. I found a bit about the
    LocalFileSystem.PERSISTENT constant not being defined. I changed the constant to 1 and it worked.
    Apparently, it’s a bug in PhoneGap 2.2.

    Thanks,

    wildwex.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: PhoneGap Questions SOLVED

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