Mobile Device Capabilities

Today I was thinking to get a good PDA. As I looked at NOKIA COMMUNICATOR 9210m found it interesting. Having a close look on functionalities and then just thinking of my Mobile I came to know some basic things regarding Device Capabilities and that is what inspire me to write this Article and as I am working with Mobile Internet Toolkit that make me inquisitive to know what actually this giving us to deal with this versatile characteristics. So lets analyze this.....

Let us start from the very Basic what is there that really make the Device different so here is some points which count on to Device Capabilities

  • Markup language (HTML, WML, cHTML,HDML)
  • Browser
  • Number of display lines
  • Cookie support

Now we will discuss one by one to them in a bit detail.

Lets take the Case of Markup language.

Now the Common standard of American and European Wireless Market WAP (Wireless Application Protocol) supports WML (Wireless Markup Language).

Take the case of Japanese Giant there the common name is I-mode  which works with cHTML (compact-HTML a subset of HTML) even there is a real good one goes J-Phone or Sky-Web which works with MML (Mobile Markup Language ) and HDML(HandHeld Device Markup Language) a fine work of Phone.com.

So when a Wireless developer comes up with programming  the peak to take care is all this before I even did myself changing my Application for different standards  and sometimes this will make me to work with sets as this is WML compliant.......this is cHTML.......and others that make many a times the concentration to divert from the functionality to the implementation issues.Here is the good solution is Mobile Internet Toolkit as these issue been internally taken care you had need not to deal with any of the Markup Language if you are through with .NET fundamentals so what you need to do for making you reach till Mobile Internet Toolkit.

Mobile Internet Toolkit is a part of .NET Platform which make the user to develop Wireless Applications with .NET.For running Mobile Internet Toolkit you should have installed .NET Framework Beta2 on your Machine even ASP.NET Premium will go on top of this there is a separate .exe comes of  just 1.84 Mb which you can easily get from here. That will make you up to make application for Mobile Devices.

Now we will come back to our basic discussion so how come it take care of  different Markup Language actually internally this has been done that whatever program you will write with this the output will be given Device Specific.

As this is a simple Program in  Mobile.NET(Let us call by this name looks more suited and catching).

<%@ Register TagPrefix="Mobile"Namespace="System.Web.UI.MobileControls"Assembly="System.Web.Mobile"%>
<%@ Page
Inherits
="System.Web.UI.MobileControls.MobilePage" Language="CS" %>
<mobile:Form id=Form1 runat="server">
<mobile:Label id=Label1 runat="server">
Hello, world!
</mobile:Label>
</
mobile:Form>

This is the same Hello World Program ,Trademark start up and we will see what code will be generated if we call this Program from a WAP Compliant Device it will be like this:

<%@ Register TagPrefix="Mobile"Namespace="System.Web.UI.MobileControls"Assembly="System.Web.Mobile"%>
<%@ Page
Inherits
="System.Web.UI.MobileControls.MobilePage" Language="CS" %>
<mobile:Form id=Form1 runat="server">
<mobile:Label id=Label1 runat="server">
Hello, world!
</mobile:Label>
</
mobile:Form>

And the same code been invoked on I-Mode device will generate the Code like this:

<html>
<
body>
<
form id="Form1" name="Form1" method="post" action="HelloWorld.aspx?
_ufps=635108115071488832">
<
span>Hello, world!</span><br>
</
form>
</
body>
</
html>

This is the terrific inbuilt power of Mobile Web Forms Control that generate markup language for different devices.

Now the second one is Browser Capabilities:

There are some devices capable of displaying Images in that also some can show colourful images while some can only show black and White.

The properties like whether the device can initiate a Voice Call, What is the preferred MIME type,What is the screenbit Depth ,whether stylesheet (An altogether new concept for Mobile Programming been there introduced in Mobile.NET a bit similas like Cascade Style Sheet).

These all issues are specific to the Browser or Device you are using so how to take care of these .In Mobile.NET there is something like MobileCapabilities Class which has Properties like:

  • CanInitiateVoiceCall Returns true if the device is capable of initiating a voice call. The default value is false.
  • CanSendMail Returns true if the device/browser supports sending mail, using the mailto URL scheme. The default value is true.
  • IsColor Returns true if the device has a color display. The default value is true.
  • PreferredRenderingMIME Returns the MIME type of the type of content preferred by the device. The default value is text/html.
  • ScreenBitDepth Returns the depth of the display, in bits per pixel. The default value is 8.
  • InputType Returns the type of input supported on the device. The default value is an empty string.

These are a few Commom Properties from the List of Properties been provided by this Class through which you can have a check of the Browser`s Capability  and can make full use of them.How these Properties will alter your Program .So here is the simple example for that .At the time you are displaying image how can you take care .....

<%@ Register TagPrefix="Mobile"Namespace="System.Web.UI.MobileControls"Assembly="System.Web.Mobile"%>
<%@ Page
Inherits
="System.Web.UI.MobileControls.MobilePage" Language="CS" %>
<mobile:Form runat="server" ID="Form1" NAME="Form1">
<mobile:Image runat="server" id="specificimage" AlternateText=
"There is no such Image Here">
<deviceSpecific>
<choice Filter="IsColor"
ImageURL="ColorOne.gif"/>
<choice Filter="Wml"
ImageURL="WBMPOne.wbmp"/>
<choice ImageURL="ColorBmp.bmp"/>
</deviceSpecific>
</mobile:Image>
</
mobile:Form>

This will take care of your need and display the image after Checking the Browser. IsColor Property and PreferredImageMIME  and will accordingly give the output.

Here we come on the Third Nature which can vary  in simple Terms Look and Feel .

Different Devices have different Form Factor . For example, devices have varying numbers of display lines, horizontal or vertical screen orientation.

If you been have idea of Card and Deck it does mean  that may be one device can held 45 words in a card and other can just 30 words.So when you are giving the Content to the device this is an important difference even to take care not much of scrolling .

There is a Property introduced in Mobile.NET named Paginate This property take care of  the output as per the screen specification you need to set it to true in the Form.

Now lets talk about the Fourth One Cookie Support.

Session Management is a must go through point in this M-Commerce age and the best one is using Cookie (There is a rich support for this in ASP.NET) but here burdening a minimal Memory device to burden with Cookie looks crude thus when writing a mobile web application, you should keep in mind that some mobile devices and wireless gateways do not support cookies.

To add support for these devices, you should configure your application to use cookieless sessions.

As per I find out the best is to use URL Redirect but that too in some places you should take care and if possible in such application whereever directing do mention the full Path.

Just for example

Don't mention it something like /MyApp/first.aspx  if in this folder only then also do mention the complete path as /MyApp/Second.aspx.In some devices it create Problem as I came to know.

And better to do all Session funda's at Application Server rather then on WAP Server  as some WAP Server doesn't take care the Session same way.

After these basic discussion in Programming Aspects one More  issue is there that is devices have different network connectivity, ranging from 9.6 KB cellular connections to 11 MB Wireless LANs.

Actually, we can't handle these issues but you Programmer should take care in the content that it neither be too heavy to be loaded so that it took a lot time and even nor the content is miserable to understand.

This is enough Material to get a real in Look for Device Capability Fundamental.

Up Next
    Ebook Download
    View all
    Learn
    View all