Last post Oct 23, 2013 01:26 AM by kobruleht
Oct 22, 2013 09:00 AM|kobruleht|LINK
In ASP.NET MVC4 application
is used to dedect mobile devices. It also contains views with .Mobile as part on view name for mobile devices. Application is browser application which renders different views in browser on mobile and non-mobile devices.
51 degrees mobi module from http://51degrees.codeplex.com/ free version is also installed. If Motorola MC2180 mobile computer/handheld scanner is used to log on to application, is is not dedected as mobile device:
.Mobile views are not executed, usual views appears.
How to force it to be recognized as mobile device ? Device is running Windows CE 6.0 and it contains Motorola Rhoelements RHOS custom browser which returns version string as
Mozilla/5.0 (Windows CE 6.0) AppleWebKit/534.51 (KHTML, like Gecko) MotorolaWebKit/184.108.40.206 Safari/534.51
Application should in Mono and in ASP.NET 4. jquery is used. jqueryy-mobile is used in mobile views.
Oct 22, 2013 03:55 PM|smirnov|LINK
If you know that Request.Browser.IsMobileDevice is not reliable in your case and you particulary interesting in Motorola, then why not to do something like this
var useragent = Request.UserAgent;
var isMotorola = false;
if (useragent != null)
isMotorola = true;
if (Request.Browser.IsMobileDevice || isMotorola )
Oct 23, 2013 01:26 AM|kobruleht|LINK
MVC4 uses *.Mobile.cshtml views automatically for mobile devices.
How to force it to use those views for this device also ?
51degrees.mobi does this is some way and it sets also IsMoblieDevice true if it dedects it.