Saturday, September 04, 2010
Categories
Author:Marian D.Created:11/10/2009 5:02 PM
 

Starting with version 3.0.7 (for DNN 5.x) and 2.0.6 (for DNN 4.x) mobiNuke is exposing a rich set of mobile device capabilities available to be used by module or skin developers.
It is possible now to know for example, dimension of the screen, maximum colors accepted, if JavaScript or video streams  are supported.

image

 

To get these capabilities in your code, include a reference to DataQ.mobiNukeLibrary in your project and follow the example in this sample code:

 Dim context As System.Web.HttpContext = HttpContext.Current
 'get the capabilitiesGetter from the context scope.
 'if this device is not mobile device, it will not be present
 If context.Items.Contains("wurlf") Then
 
 Dim wurlf As DataQ.Modules.mobiNuke.capabilitiesGetter = Nothing
                    wurlf = context.Items("wurlf")
 
 'write a set of most usefull capabilities
                    Label_SelectedCapabilities.Text = "<h3>Selected Set of<br> Device Capabilities</h3>"
 
                    Label_SelectedCapabilities.Text &= "model_name=" & wurlf.getCapability("model_name") & "<br>"
                    Label_SelectedCapabilities.Text &= "mobile_browser=" & wurlf.getCapability("mobile_browser") & "<br>"
                    Label_SelectedCapabilities.Text &= "has_qwerty_keyboard=" & wurlf.getCapability("has_qwerty_keyboard") & "<br>"
                    Label_SelectedCapabilities.Text &= "ajax_support_javascript=" & wurlf.getCapability("ajax_support_javascript") & "<br>"
                    Label_SelectedCapabilities.Text &= "cookie_support=" & wurlf.getCapability("cookie_support") & "<br>"
                    Label_SelectedCapabilities.Text &= "resolution_width=" & wurlf.getCapability("resolution_width") & "<br>"
                    Label_SelectedCapabilities.Text &= "resolution_height=" & wurlf.getCapability("resolution_height") & "<br>"
                    Label_SelectedCapabilities.Text &= "colors=" & wurlf.getCapability("colors") & "<br>"
 
 'write all capabilities
                    Label_AllCapabilities.Text = "<h3>All Device Capabilities</h3>"
 Dim is_wireless_device As Boolean
                    is_wireless_device = wurlf.getCapability("is_wireless_device")
 Dim deviceCapabilities As Hashtable = wurlf.getAllCapabilities()
 For Each capName As String In deviceCapabilities.Keys
                        Label_AllCapabilities.Text &= capName & "=" & deviceCapabilities(capName) & "<br>"
 Next
 End If

 

To illustrate this new feature, I created a very simple module that displays these capabilities. You must have mobiNuke installed in order for this to work. You can download the sample code from here

For the complete list of capabilities, click here.

Starting with version 3.0.7 (for DNN 5.x) and 2.0.6 (for DNN 4.x) mobiNuke is exposing a set of mobile device capabilities obtained through WURLF library.

Read More »

Before mobiNuke version 3.0.6 I used to maintain a mobile version of HTML module as part of mobiNuke. Starting with 3.0.6 this is no longer happening. The problem is that when you upgrade, pervious files are still there, and it may throw some errors.

 

There are two options:

1. Uninstall old mobiNuke version and choose to delete files. Then install the new version.

2. Install the new version of mobiNuke over the old one, and delete this folder: [website]\DesktopModules\mobiNuke\desktopmodules\html

Privacy Statement  |  Terms Of Use
Copyright 2010 by Data Quadrant, Inc.