Here are a few ways to detect if the user is coming from a mobile device. Used for redirection, different interfaces, or special cases.
Javascript:
PROS: Most common solution.
CONS: Many mobile devices don't support Javascript or users turn it off.
<script>
var isMobile = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/);
</script>
Navigating the Mobile App Development Landscape
While we all wait for multi-column layouts with CSS3 to become standard across all browsers, we have to put our faith in js to help us solve our column problems. Here are two things I like to use.
Columnizer
Phonegap is based on HTML5 and Javascript, and allows you to get access APIs of mobile devices.
Phonegap API doc shows enable mobile device APIs, such as Acceleromter, Camera, and so on.
http://docs.phonegap.com/en/1.1.0/index.html
However, if you are planning to make an Android application with integrating Sproutcore and phonegap, you definitely want to get access functions that you create in Android.
Phonegap supports plugins to enable this feature for both iOS and Android.
http://wiki.phonegap.com/w/page/36753496/How%20to%20Create%20a%20PhoneGa...
Recent JS Plugin Issues
1. CurvyCorners
Discovered another rounded corner plugin that uses CSS3. CurvyCorners reads your styles and applies rounded corners with no js function calls. All you need to do is download the curvycorners.js file and apply it to your site. Then in your CSS add:
Over the last of couple weeks we’ve been working on a mobile site/app, with a very standard layout: a location bar fixed on the top, a menu fixed on the bottom and the content being printed in between. I thought this would be a walk in the park until I realized that Safari on the iPhone doesn’t support scrolling inside divs, and “position:fixed” doesn’t really behave like it does on desktops.
Mark your calendars! We're happy to announce the first meet up for the SproutCore Vancouver user group will be hosted here at the Appnovation office on Tuesday, July 26th starting at 6pm. For our inaugural meeting we have Luis Sala (Strobe) and Tom Dale (Strobe/SproutCore Core Team) slated to present.
