Is it possible to have access to the network after the pause event in the PhoneGap iOs application?

The My PhoneGap application should give the server a websocket message (to update the connection status) when the pause event is captured.

Android

There is no problem with the Android device using this piece of code:

document.addEventListener("deviceready",function(){
    document.addEventListener("pause", function() {
        socket.emit('changeStatus', 'incative');
    });
    document.addEventListener("resume", function() {
        socket.emit('changeStatus', 'active');
    });
}, false);

Ios

In iOS, this is another fish maker. Indeed, the official PhoneGap documentation of the pause event :

iOS Quirks

, Objective-C, , , , . , console.log( ) API PhoneGap. , ( ).

, ", Objective-C, ", ? , iOS, "changeStatus" "" .

: phonegap iOs ""?

+4
1

, - iOS. , . , , .

, . , , ? , . , , ping .

0

All Articles