1 Reply Latest reply on Jul 13, 2016 12:29 AM by VectorP

    Cannot display mobile view automatically

    Anh Han

      Hello,

       

      I created a html5 app, then build it with PhoneGap build. Everything is ok, except the screen is still in desktop view, not mobile view. Testing it on Chrome DevTool showing desktop view, but if I hit Refresh button (F5), then the view is changed to mobile.

       

      What should I do to ensure that the screen is automatically in mobile view?

       

      Thanks,

      Anh Han.

        • 1. Re: Cannot display mobile view automatically
          VectorP Level 4

          What should I do to ensure that the screen is automatically in mobile view?

           

          Several possibilities:

          1. Remove all other views. After all, you are building an app for a mobile device, aren't you?

          2. See what criteria you have to distinguish between desktop and mobile, then correct any errors.

           

          (Can't be any more specific, since you haven't told us anything about the mechanism:

          - what does desktop view and mobile view consist of? Separate html pages? Separate CSS files?

          - are you using any javascript libraries to get the job done, like Bootstrap?

          - how do you determine which view should display? CSS media queries? Javascript browser sniffing? The results of a plugin call? Something else?)