Category Archive for: Detecting Device Capabilities

The first part of this chapter was all about identifying devices and adding capabilities, and with that out of the way, I can turn to the different ways in which you can use the capabilities data in an application to adapt to different devices. Avoiding the Capabilities Trap I am going to start by showing you…

Setting a custom capabilities provider overrides the 51degrees. mobi data, so I have to comment out the statement in the global application class that sets up the Kindle Capabilities object from the previous section. Listing 7-10 shows the commented- out statement. Listing 7-10. Disabling the Custom Capabilities Provider in the Global.asax.cs File Displaying Additional Properties The final…

The 51degrees data is most easily installed through the NuGet package called 51Degrees .mobi, but I don’t use this option because the package installs extra features that go beyond device capabilities and get in the way of features such as ASP.NET display modes (which I detail later in this chapter). Instead, I prefer to download a .NET…

ASP.NET uses the user-agent string sent as part of the HTTP request to identify a client. As an example, here is the user-agent string that Chrome sends when it is emulating an iPhone 5: You may see a slightIy different string because tile version number of tile browser or tile operating system may change. To populate tile…

The starting point for adapting to different devices is to access their capabilities. In this section, I show you how ASP.NET provides information about different devices and how you can customize and improve this information that is available. Table 7-2 puts the process of detecting device capabilities into context. Table 7-2. Putting Detecting Device Capabilities ill Context…

I am going to create a new project called Mobile for chapter, following the same approach that I have used for earlier examples. I used the Visual Studio ASP.NET Web Application template, selected the Empty option, and added the core MVC references. You should be familiar with the process by now; but see Chapter 6 if you…

Just a few years ago, the world of web clients consisted of browsers running on desktops and browsers running on mobile devices. The desktop browsers offered the best support for HTML, CSS, and JavaScript and made their requests over fast and reliable network connections. The mobile browsers had limited support for the web standards, made requests over slow…