Just a quick brain dump today on the SharePoint mobile experience for those of us who still have to deal with 2010 (Yes, 2013 is so much better for this stuff) since this just came up and I realized I had not yet posted it. The question of reactive vs. adaptive design for a website I’ll leave for another day and the various frameworks you can use with SharePoint like bootstrap to give a single page the full mobile/desktop experience.
In any case, the mobility feature can be turned on or off per my post a couple years back: SharePoint 2010–Mobility Redirect Feature and this is nice, but the feature also has it’s own quirks with dealing with a publishing site, and in some cases even if you turn it off the site still detects mobile browsers and tries to redirect. So, there are two quick ways to disable SharePoint from detecting a mobile browser if you just don’t want to deal with it.
1. This is probably the most tried and true method, just update the compat.browser file found in the site’s App_Browser directory and change the capability of isMobileDevice to “false” for all items that have it set to true.
<capability name="isMobileDevice" value="false" />
That works well, seems like most people use it and move on. Advantages are that you can single out specific browsers and target the user experience, or flip back and forth with certain specific browsers. Bad news is that it can be overwritten when service packs get involved. Microsoft also recommends an iisreset /noforce after you change the file
2. This is a little nicer in the sense that it’s a change to the web.config so we can set up a WSP to do this for us (and it won’t get overwritten) and as it’s only a couple of lines in the web.config we can switch back and forth fairly easily in our test and QA environments. Bad news is of course that it uses the browserCaps element in the web.config. Deprecated in favor of the compat.browser file mentioned above, but interestingly still supported all the way up to the .NET 4.0 framework at this time. So, if you want to turn off mobile detection for a site, just drop this in the web.config file of the web application in the <system.web> node. Obviously, as this is a change to the web.config file, every time you change the file the web application will restart.
<result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
So just a few quick thoughts about mobile devices and SharePoint 2013 preview
Different mobile experiences! Nice that they give more preference to the mobile experience. We’ve gone from the default mobile view of one size fits all to device channels, allowing designers to render a publishing site in multiple ways by using different designs that are targeted to specific platforms. This allows us to author content once, and then map it to different devices through the use of different master pages, page layouts and style sheets targeted to different groups of devices. Imagine that we now get a different UX when accessing the system from a iPad or Galaxy tablet, another UX when using iPhone or Android phones, and yet another when using desktop. Interesting side note: The preview version also has something called “Focus on content”, when toggled on it strips away the chrome of the left and top navigation and shows just the content. Not sure how useful that will be in the long run, but it does expose a bit behind Microsoft’s thinking that it’s all about content.
Support for HTML5! The new contemporary view will render in HTML5, allowing us access to all those goodies that come with it. Assuming of course that the system is being accessed with IE9 (which comes with its own set of issues) Windows Phone 7.5, iPhone 4.0 and Android 4.0. Nice to move away from compatibility and take advantage of modern browsers.
Authentication in SharePoint and the OData model! For those of you familiar with Facebook, OAuth and OData are the way to go, and the preview comes with a new authenticator class that works with Windows Phone 7 users and support for ECMAScript that works with the Representational State Transfer (REST) services for those of us who don’t have WP7.
Location-aware apps! There is a new native field type class SPFieldGeoLocation for integration location and map functionality. Examples would be for companies with branches or stores to allow customers to quickly find the location that is closest to them on their mobile phone, no need to type in an address or ZIP.
And of course, for those of us who treat SharePoint like an application platform and are looking to build out a pure mobile site, the preview offers a Visual Studio template that will build out list applications for the Windows Phone. Examples would be for things like to-do list, inventory, tasks that can be manipulated and updated from WP.
I like what I see so far, I can definitely see some synergies for writing content once and viewing it on multiple devices in a friendly and device oriented surface.
It’s not great, but it is functional. You can get the mobile emulator here: http://msdn.microsoft.com/mobility/windowsmobile/downloads/emulatorpreview/default.aspx
SharePoint mobile sites can be accessed by appending an “/m” at the end of the URL. From this mobile landing page you can access the lists, libraries and list items on the site, just don’t expect any fancy UI or branding.
More information can be found on Martin Kearn’s blog posting.