PhoneGap iOS app "deviceready" - start recording and resume

I use PhoneGap to create my own iOS app. The application implements the iOS scheme, so that it can be called from Safari mobile, such as myapp: //? Parameters. The activity of the application depends on the input parameters, I read them, handling the event "deviceready".

The problem is that after the initial execution the application remains in the background, and any subsequent calls (from the browser) do not start another "deviceready", and as a result I can not get the new parameters.

Any ideas? Thank!

+3
source share
3 answers

Did you manage to trigger the resume event at the end?

- :

window.addEventListener('load', function () {
    document.addEventListener('deviceready', onDeviceReady, false);
}, false);

function onDeviceReady() {
    document.addEventListener('resume', onResume, false);
    document.addEventListener('pause', onPause, false);
    document.addEventListener('online', onOnline, false);
    document.addEventListener('offline', onOffline, false);
}

function onResume() {
    alert('resume');
}

function onPause() {
    alert('pause');
}

function onOnline() {
    alert('online');
}

function onOffline() {
    alert('offline');
}

, , - , , , . , , !

+4

, , .

, URL ( ), handleOpenURL() . , .

function handleOpenURL(invokeString) {
  // do something with the invoke string
}
0

All Articles