facebook

Can MobiOne be used to create mobile websites?

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #347217 Reply

    Mike Felker
    Participant

    MobiOne is amazing for creating apps, but can it be used to create full mobile websites?

    I would not need to deploy to android or IOS, but I would need to figure out the code to auto-send users to the mobile site if they are using a phone (tablets should just use the main site since they are much larger).

    Thanks for any help.

    Mike

    #347218 Reply

    Mike Felker
    Participant

    The answer is YES and NO.

    I uploaded the files in the www folder to my web server and navigated to it using my PC. It seemed to work fine. I then used my Android phone to navigate to it using my mobile browser. On the Android, however, although the page does come up, none of the buttons work at all. The map control does not work either.

    It did work on my iPad, however. Strange.

    Is there any way to have all the controls actually work on android phones so that I could use MobiOne as a mobile website builder? I have other software, but MobiOne works better than any of the others.

    If you want to try it out on your mobile device and see if it works, let me know if it does or not:

    http://www.tampabaybusiness.org/tb3app/TB3App.html

    Mike

    #347221 Reply

    Mike Felker
    Participant

    Now I’m really confused. I tried my own link above from my Android phone and it worked fine. Weird.

    Anyway, assuming it does indeed work for all devices, how would my website auto detect a cell phone versus a tablet versus a computer and route the user to the mobile phone version only?

    #347226 Reply

    Brandon
    Member

    I have done several mobile sites with M1 without any probelms.

    I used soemthing like this:
    function detectmob() {
    if(window.innerWidth <= 800 ) {
    //go to mobile url
    }
    }

    I no longer do webapps though, due to the various problems with iOS.

    #347297 Reply

    Mike Felker
    Participant

    function detectmob() {
    if(window.innerWidth <= 800 ) {
    //go to mobile url
    }
    }

    Where do I add this on my web page? Before or after the [head], or is this inside the app?

    Mike

    #347299 Reply

    Brandon
    Member

    Its not the one I actually use. Here is what I use, right before the closing head tag (</head>):
    http://detectmobilebrowsers.com/

    Click the Javascript to download the code

    #347300 Reply

    Mike Felker
    Participant

    I found a great way to do this – very VERY close to what you suggested:

    Place this in the HEADER section of your website landing page:

    <script type="text/javascript">
    <!--
    if (screen.width <= 699) {
    document.location = "YOUR-MOBILE-SITE.com";
    }
    //-->
    </script>

    Mike

    #347397 Reply

    shahin
    Member

    I start a web browser in my app and the newly build page wants to close itself with window.close(), this works in a normal desktop browser, but it does not close in MobiOne. Any idea how a page can close itself when initiated in app?

    #347420 Reply

    Brandon
    Member

    If this is a native app I believe the best way is the PhoneGap API:

    NOTE: This is from the PhoneGap docs and has not been tested by me

    
    var ref = window.open('http://apache.org', '_blank', 'location=no');//open your browser window
    
    ref.close(); //call when you want to close the window opened with above code
    
    
    A full example closing the page after 5 seconds:
          var ref = window.open('http://apache.org', '_blank', 'location=yes');
             // close InAppBrowser after 5 seconds
             setTimeout(function() {
                 ref.close();
             }, 5000);
    
    
Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Can MobiOne be used to create mobile websites?

You must be logged in to post in the forum log in