pbernasconi / chrome-cordova

A chrome extension to mock Cordova plugin data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation?

cfjedimaster opened this issue · comments

Can you please document how this exactly works? I tried it on a camera demo. It never prompted me to select a picture, so I'm assuming the mock does... something automatic (what it does should be documented of course). The file URI returned by the plugin didn't work when entered in the DOM. So perhaps the mock only supports the base64 version - if so - again - it should be documented.

Agree with you completely. This project was done as more of a proof of concept, until I actually got it to work well. I'll be building it up in the next few weeks and it will most definitely have detailed documentation. Thanks for your suggestions @cfjedimaster.

In response to the Camera plugin, it only provides base64 for now. In the future however, the extension should interpret the options given in the getPicture() call and output the right image format.

Any other suggestions would be great.

Would you be able to roughly describe how the other ones are mocked? For example, motion, what kind of data will it return?

All of the plugins can be found in the src/plugins/ folder, which should be relatively self-explanatory at the moment (at least until I have docs up).

The device motion mock produces preset integers like so:

        var data = {
            x: -4.434294622159458,
            y: 19.345115933827113,
            z: -14.282339264520889,
            timestamp: (new Date()).getTime()
        };

Note: the watchAcceleration doesn't work right at the moment.

Ah - I have to read then. Bah. ;) Ok, thanks. :)

On Thu, Dec 11, 2014 at 4:10 PM, Paolo Bernasconi notifications@github.com
wrote:

All of the plugins can be found in the src/plugins/
https://github.com/pbernasconi/chrome-cordova/blob/master/src/plugins/
folder.

the device motion mock produces preset integers like so:

    var data = {
        x: -4.434294622159458,
        y: 19.345115933827113,
        z: -14.282339264520889,
        timestamp: (new Date()).getTime()
    };

Note: the watchAcceleration doesn't work right at the moment.


Reply to this email directly or view it on GitHub
#3 (comment)
.

Raymond Camden, Web Developer for Adobe

Email : raymondcamden@gmail.com
Blog : www.raymondcamden.com
Twitter: raymondcamden