function onDeviceReady() {
console.log('deviceready');
// set handler for the event
universalLinks.on('event_name', onULOpen);
};
function onULOpen(event) {
// handle the event
}
Internally, it will store the events, received from the native side; and then universalLinks.on(...) is called - send them to the callback. Basically, you are subscribing to the event through the plugins module.
This would definately be very useful! I am now working around the timing issue by setting event details in localstorage from index.html and then acting on it when the app has finished loading.
As stated in https://github.com/nordnet/cordova-universal-links-plugin/issues/3 - we need a module, that does something like this:
Internally, it will store the events, received from the native side; and then
universalLinks.on(...)
is called - send them to the callback. Basically, you are subscribing to the event through the plugins module.