Construct 2 - Browser "is online" does not work through Cocoon


I want to ensure if the user is online, before I could take them to the Multiplayer game layout.

I’m posting it here because through Cordova plugin, they are able to work with “is online” condition of Browser object in C2… Is there any similar plugin through Cocoon as well? or any other solution to this problem?




did you install the “Inappbrowser” plugin for your cocoon project? You find it at [your project] -> [Settings (gear icon)] -> [Plugins] -> [Core].



Hi Andy, Thanks for the reply… but yes the Inappbrowser plugin is already installed. And, the “Mobile Back Button Pressed” condition of the same browser object also works fine.

The “is online” condition works correctly on computer browser (preview) but not on mobile devices. On mobiles, this condition returns true always even when offline.



what webview engine are you using for your project? If it’s canvasplus, then the “is online” condition won’t work.
Maybe @Blue_Sialia @andoni.martin can add a similar condition to the “CocoonCanvasPlus” plugin?

For WebView+ it should work, as far as I know.
But if you want to use Multiplayer you need to use WebView, because Canvas+ do not support WebRTC.


closed #5

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.