I got this to work on dropbox's API and also on my own API created with Apigility (PHP framework for creating API's).
It will only work on a native Android (or presumably iphone too) app, as it needs to plug directly into the low level webview in phonegap. I think it will also work using the appery.io tester app on android.
Thats important. I dont think it can work on a browser on the desktop.
Maybe I can create a generic version of what I got working and export that for everybody to use..