WML Interview Questions and Answers

Wireless Markup Language is a language for presentation of text from Web pages on cell phones and personal digital assistants. WML is part of the Wireless Application Protocol that is being proposed as a standard.

WML Interviews are getting tough these days as the technology grows faster. To get through the WML interview one needs to update him/herself in a regular manner. Having said that, just before the interview, it is very important to have a quick glance of the reputed WML questions and answers to make yourself comfortable during the interview process. This is where DoAnswers.com helps you in renewing yourself on WML and various other technologies interview preparation.



Next >>

 

1. Can I display bitmap images?

The Mobile Browser v3.0 and higher supports the display of bitmap images in monochrome (1-bit) BMP format. Mobile Browser 4.0 and higher also supports WBMP format. For simplicity, you can publish your image files in BMP format, and the Mobile Access Gateway Server will automatically convert them to WBMP format if necessary. Images are specified using the IMG element. Please refer to Chapter 4 of the SDK Developer's Guide for more information. Note that not all phones are capable of displaying bitmap images. In these cases, the Mobile Browser ignores the image content and displays the "ALT" text for the image.


2. How do I branch my application for HTML, WML, and HDML browsers?

Before returning the appropriate content type, you should first determine whether or not the client is a standard Web browser or a phone. If it is a phone, you can then determine if it is running Mobile Browser v3.0 or earlier, in which case only HDML is supported. Here is an example (in Perl) that demonstrates how to evaluate and branch on the HTTP ACCEPT header: #!/usr/local/bin/perl $acc = $ENV{"HTTP_ACCEPT"}; if ($acc =~ "wml"){ if ($acc =~ "hdml;version=3.0"){ print "Location: http://www.mysite.com/index.hdml\r\n\r\n"; } else { print "Location: http://www.mysite.com/index.wml\r\n\r\n"; } } else { print "Location: http://www.mysite.com/index.html\r\n\r\n"; } Note that more sophisticated apps may choose to branch and customize content based on the browser vendor and/or version number, Mobile Access Gateway version number, or physical device capabilities. This information is also available in the USER_AGENT and X_UP_DEVCAP* headers. For example code, please refer to the SDK example application: /examples/scripts/whoami.cgi


3. How do I determine the subscriber's phone number or physical location?

You can't. For privacy reasons, the Mobile Access Gateway Server / WAP Gateway does not pass the user's phone number or physical location to the application. If you want this information, you must ask the user to enter it manually (e.g. Prompt for a postal code to get the user's location). WAP is working on defining a standard implementation for applications to access this information in a future version of the WAP specification. However, even when this becomes a standard, it is expected that the user will be asked for permission before the WAP browser allows any private data to be passed to an application.


4. How do I dial a phone number from my application without requiring the user to enter the number?

The following examples show how to dial the US number "650-817-1400" in both WML and HDML from within the US. In both cases, the call is dialed when the user presses the "accept" softkey labeled "Call": WML < do type="accept"> < go href="wtai://wp/mc;6508171400"/>< /do> HDML < ACTION TYPE="ACCEPT" TASK="CALL" NUMBER="6508171400"> NOTE: When dialing international numbers, you should include the "+" symbol and escape it with the string "%2B", for example: < go href="wtai://wp/mc;%2B16508171400">


5. How do I make my application play audio files like WAV and MP3?

You can't. Streaming audio files are currently not supported by WAP. The reason for this is because of the physical constraints of today's wireless networks, which preclude streaming media from being delivered in a practical and efficient manner. This is expected to change with the "next generation" wireless packet data networks.


Your Ad Here

6. How do I override the Mobile Browser's caching behavior and force a cached deck to be reloaded from the server?

When the user navigates to a deck that was previously loaded in the cache, the Mobile Browser first checks the deck's time of expiration ("max age" or "TTL"). If the deck has expired, then the browser will reload the deck from the server. Otherwise, it reloads the deck from the cache. The default time of expiration is 30 days. You can set a deck to expire for a specified amount of time (in seconds). You can also set a deck to expire immediately if you want the browser to always reload the deck from the server. This is useful when a deck contains highly volitile information (e.g. stock quotations). For example: WML < head> < meta forua="true" http-equiv="Cache-Control" content="max-age=0"/> < /head>... HDML < HDML VERSION="3.0" TTL="0">... WARNING: Setting a deck's time of expiration to "0" should be used with extreme caution! The negative side-effect of doing this is that the deck will always be re-fetched from the server even if the content has not changed. This can severely degrade the user's perception of your application's performance. Also note that the Mobile Browser will ignore expiration and will always reload a deck from the cache if the user navigates to the deck in the backwards direction (i.e. via the "prev" task). It will also ignore expiration if you goto any card in the current deck. Mobile Browser 4.0 (and higher) allows you to force a deck's expiration to be revalidated when navigated to in the backwards direction, by specifying the "must-revalidate" meta tag.


7. How do I provide context-sensitive help for my application?

The Mobile Browser supports the HELP user action. In some cases, the HELP action maps to a physical key on the device. In other cases, the user must select the HELP function from the built-in Mobile Browser menu to invoke the HELP action. Here is an example of programming the HELP action to display a context-sensitive help card:WML < do type="help"> < go href="#helpcard"/> < /do> HDML < ACTION TYPE="HELP" TASK="GO" DEST="#helpcard">


8. How do I uniquely identify the end-user so I can store persistent user data on my server?

The Mobile Access Gateway Server always sends the end-user's subscriber ID in each HTTP request to your Web server. The data (along with some other environment variables) is stored in the HTTP request header. You can capture the subscriber ID and then save it in your database to uniquely index any persistent data associated with that user. For an example (in Perl) of how to capture the subscriber ID, please refer to the following SDK example application: /examples/scripts/whoami.cgi Using the subscriber ID is also explained in Chapter 3 of the SDK Developer's Guide included with the SDK.


9. Multiple DO elements with same name causing complie error when going through certain gateway versions?

Answer: The presence of two DO elements in one card which have the same name will cause a complie error depending on the MAG version you are connecting through. This will render fine up to MAG 5.0.1 but due to requirements for WAP 1.2 certification will cause the complie error in MAG 5.1 and beyond. "Two or more do elements with the same name must not be present in a single card or in the template element. (Note: An unspecified name defaults to the value of the type attribute.)"


10. What do I need to do to my code to ensure it displays correctly going through the leading WAP Gateways?

The WAP Specification has left some room for interpretation with regards to internationalization. This has resulted in some differences in how international content is handled by the leading WAP Gateways and which developers should be aware of. Openwaves Mobile Access Gateway uses existing web standards and adheres to the internationalization protocols as set out in the HTTP and XML specifications. These dictate that to facilitate internationalization the encoding attribute should be added to the XML declaration of your document with the relevant Charset for the characters it includes. Eg: < ?xml version="1.0" encoding="ISO-8859-1"?> However the Nokia gateway will also render the international characters even if the encoding attribute and relevant Charset is not present in the XML declaration of a document containing international characters. Therefore to ensure that your application is globally accessible and international characters are displayed correctly though *both* the Nokia and Openwave gateways, the developer must include the encoding attribute and appropriate Charset in the XML declaration. The code below incorporates the XML declaration with the relevant Charset to display the French characters that are in the code. This approach will correctly display the French characters through both the Openwave Mobile Access Gateway and Nokia gateway. < ?xml version="1.0" encoding="ISO-8859-1"?> < !DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> < wml> < card id="card1" title="Voila Horoscope"> < p> Choisissez votre signe: < select> < option onpick="bel.wml">Bélier < option onpick="tau.wml">Taureau < option onpick="gem.wml">Gémeaux < option onpick="can.wml">Cancer < option onpick="lio.wml">Lion < option onpick="vie.wml">Vierge < option onpick="bal.wml">Balance < option onpick="sco.wml">Scorpion < option onpick="#card2">Plus < /select> < /p> < /card> < card id="card2" title="Voila Horoscope"> < p> < select> < option onpick="sag.wml">Sagittaire < option onpick="cap.wml">Capricorne < option onpick="ver.wml">Verseau < option onpick="poi.wml">Poissons < /select> < /p> < /card> < /wml>


Your Ad Here

Next >>

 
Databases Questions and Answers
 
DB2 Interview Questions and Answers
IMS Interview Questions and Answers
MYSQL Interview Questions and Answers
Oracle Interview Questions and Answers
PL/SQL Interview Questions And Answers
Quel Interview Questions and Answers
SQL Interview Questions and Answers

 
 
.NET Interview Questions and Answers
 
ASP Interview Questions and Answers
C# Interview Questions and Answers
Visual Basic Interview Questions and Answers
 
J2EE Interview Questions and Answers
 
Enterprise Java Beans (EJB) Interview Questions And Answers
Hibernate Interview Questions And Answers
Jave Messaging Service (JMS) Interview Questions And Answers
Jave Server Faces (JSF) Interview Questions And Answers
Java Server Pages (JSP) Interview Questions And Answers
Servlets Interview Questions And Answers
Spring Framework Interview Questions And Answers
Struts Framework Interview Questions And Answers
 
JAVA Interview Questions and Answers
 
Core Java Interview Questions and Answers
Java Platform, Micro Edition (Java ME) Interview Questions And Answers
JAVA GUI Interview Questions and Answers
Java Performance Tuning Interview Questions And Answers
JUnit Interview Questions And Answers
Remote Method Invocation (RMI) Interview Questions And Answers
Unified Modeling Language (UML) Interview Questions And Answers
 
Java Application Server Interview Questions And Answers
 
Tomcat Application Server Interview Questions And Answers
WebLogic Application Server Interview Questions And Answers
 
Mainframe Interview Questions and Answers
 
CICS Interview Questions and Answers
COBOL Interview Questions and Answers
IMS Interview Questions and Answers
JCL Interview Questions and Answers
REXX Interview Questions and Answers
TELON Interview Questions and Answers
VSAM Interview Questions and Answers
 
Object Oriented Language Questions and Answers
 
C Interview Questions and Answers
C++ Interview Questions and Answers
Eiffel Interview Questions and Answers
J2EE Interview Questions and Answers
JAVA Interview Questions and Answers
Sather Interview Questions and Answers
Small talk Interview Questions and Answers
 
Operation Systems Interview Questions and Answers
 
MS DOS Interview Questions and Answers
Unix OS Interview Questions and Answers
Windows Interview Questions and Answers
 
Scripting languages Interview Questions and Answers
 
Java Script Interview Questions and Answers
Practical Extraction and Reporting Language Interview Questions and Answers
PHP Interview Questions and Answers
VBScript Interview Questions and Answers
 
UserInterfaces Questions and Answers
 
Foxit Interview Questions and Answers
Glade Interview Questions and Answers
Tweak Interview Questions and Answers
 
WEB Technologies Questions and Answers
 
AJAX Interview Questions and Answers
HTML Interview Questions and Answers
WML Interview Questions and Answers
XML Interview Questions and Answers
 
Interview Tips And Some Common Questions
 
Behavioral Interview Questions And Answers


Your Ad Here