How to use the cordova.fireDocumentEvent function in cordova

To help you get started, we’ve selected a few cordova examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bunsenbrowser / bunsen / bunsen-ang / src / cordova.js View on Github external
if(arguments.length === 2) {
                    msg.pendingResult.result = arguments[1];
                } else {
                    // The plugin returned a multipart message
                    var res = [];
                    for(var i = 1; i < arguments.length; i++) {
                        res.push(arguments[i]);
                    }
                    msg.pendingResult.result = res;
                }

                // Save the plugin result so that it can be delivered to the js
                // even if they miss the initial firing of the event
                lastResumeEvent = msg;
            }
            cordova.fireDocumentEvent(action, msg);
            break;
        default:
            throw new Error('Unknown event action ' + action);
    }
}
github arcoirislabs / cordova-plugin-mqtt / www / CordovaMqTTPlugin.js View on Github external
exec(function(cd){
            switch(cd){
                case "connected":
                    args.success(cd)
                    cordova.fireDocumentEvent("connected");
                    break;
                case "disconnected":
                    args.error(cd)
                    cordova.fireDocumentEvent("disconnected");
                    break;
                case "failure":
                    args.error(cd)
                    cordova.fireDocumentEvent("failure");
                    break;
            }
        }, function(e){
            console.error(e)
github apache / cordova-js / lib / webos / platform.js View on Github external
onSuccess: function (result) {
                    console.log("subscribe:result:"+JSON.stringify(result));

                    if (!result.isInternetConnectionAvailable) {
                        if (navigator.onLine) {
                            console.log("Firing event:offline");
                            cordova.fireDocumentEvent("offline");
                        }
                    } else {
                        console.log("Firing event:online");
                        cordova.fireDocumentEvent("online");
                    }
                },
                onFailure: function(e) {
github larruda / ciandt-tt / platforms / android / assets / www / cordova.js View on Github external
channel.join(function() {
        require('cordova').fireDocumentEvent('deviceready');
    }, channel.deviceReadyChannelsArray);
github katzer / cordova-plugin-badge / platforms / windows / build / windows / Debug / x64 / win10 / AppX / www / cordova.js View on Github external
channel.join(function() {
        require('cordova').fireDocumentEvent('deviceready');
    }, channel.deviceReadyChannelsArray);
github disusered / cordova-open / www / disusered.open.js View on Github external
channel.onCordovaReady.subscribe(function() {
    var prop = (event === 'error') ? event : 'data';
    payload[prop] = data;
    cordova.fireDocumentEvent(event, payload);
  });
}
github OrgCurrent / Android / platforms / android / assets / www / cordova.js View on Github external
channel.join(function() {
        require('cordova').fireDocumentEvent('deviceready');
    }, channel.deviceReadyChannelsArray);
github qualintitative / egoweb / app / node_modules / cordova-ios / CordovaLib / cordova.js View on Github external
channel.join(function () {
        require('cordova').fireDocumentEvent('deviceready');
    }, channel.deviceReadyChannelsArray);
github apache / cordova-js / lib / blackberry / plugin / java / platform.js View on Github external
var pause = function() {
            cordova.fireDocumentEvent('pause');
            manager.pause();
        };
github larruda / ciandt-tt / platforms / ios / CordovaLib / cordova.js View on Github external
channel.join(function() {
        require('cordova').fireDocumentEvent('deviceready');
    }, channel.deviceReadyChannelsArray);