Detecting mobile phones & their screen sizes.??
-
Hello I am developing a mobile web application in which, I want that the application should first which phone it is asking request & then detecting the size of the screen & once it have all the thing detected it should display the web pages according to the size of the screen. so here can anyone help me in developing this application as i am new to it or can guide me if anything wrong in this working of application ?? we want to use ASP & WML together. so is it possible ?? or can any one help with coding with this application?? even anyone can give suggestion on this post.. reply to this post asap..!! regards Aditya chavan
-
Hello I am developing a mobile web application in which, I want that the application should first which phone it is asking request & then detecting the size of the screen & once it have all the thing detected it should display the web pages according to the size of the screen. so here can anyone help me in developing this application as i am new to it or can guide me if anything wrong in this working of application ?? we want to use ASP & WML together. so is it possible ?? or can any one help with coding with this application?? even anyone can give suggestion on this post.. reply to this post asap..!! regards Aditya chavan
Please take a look at http://51degrees.codeplex.com. It is an ASP.NET open source module which detects mobile devices and provides auto redirection to mobile optimized pages when request is coming from mobile device. It makes use of WURFL mobile device database. For redirection there is no need to modify existing ASP.NET web application pages. Sample web.config configuration for mobile device detection based on MobileDeviceManufacturer property.Both WURFL capabilities and ASP.NET Browser properties can be used with the property attribute.
<redirect firstRequestOnly="false"
mobileHomePageUrl="~/Mobile/Default.aspx"
timeout="20"
devicesFile="~/App_Data/Devices.dat"
mobilePagesRegex="/[Apple|RIM|Nokia|Mobile]/">
<locations>
<location url="~/Apple/Default.aspx">
<add property="MobileDeviceManufacturer" matchExpression="Apple"/>
</location>
<location url="~/RIM/Default.aspx">
<add property="MobileDeviceManufacturer" matchExpression="RIM"/>
</location>
<location url="~/Nokia/Default.aspx">
<add property="MobileDeviceManufacturer" matchExpression="Nokia"/>
</location>
</locations>
</redirect>