Monaca Onsen UI Discord Chat Github Repo

Monaca Viewport

  • Hello,

    I work for a client who has a PhoneGap Build mobile app that I have not developed.

    The application owns Monaca Viewport. Before I touched the application Monaca View port was set like this:

        function update(scale) {
            document.getElementById("useragent").textContent = navigator.userAgent;
            document.getElementById("scale").textContent = scale || "none";
            if (monaca.viewport.isAndroid()) {
                document.getElementById("device").textContent = "Android";
            } else if (monaca.viewport.isPCBrowser()) {
                document.getElementById("device").textContent = "PC";
    			width : 1080,
    			onAdjustment : update

    and the display was correct.

    I added the phonegap push plugin plugin with the following version:

    	<plugin name="phonegap-plugin-push" spec="~1.10.0" source="npm">
    			<param name="SENDER_ID" value="..." />

    Now the display is not done correctly, how is it done? How to cure it ?

    Thank you Best regards

  • Monaca

    @Yohann3396 Monaca Viewport has been deprecated long time ago. Therefore, it might not work properly. For this reason, please use device.platform from Device plugin for the same purpose. Read more on Device Plugin.