Accessibility
Mohinish Basha Shaikh

Mohinish Basha Shaikh

linkedin.com/in/mohinishbasha

Table of Contents

Created:
9 February 2009
User Level:
Intermediate
Products:
Flash Lite

Build a YChat! Instant Messenger application using Flash Lite for mobile devices

More than ever before, people are using handheld devices—such as cell phones and PDAs—to connect to the Internet and communicate electronically with others. In this article, I have provided step-by-step instructions for building a robust instant messenger application with Flash Lite technology. The instant messenger client application interacts with the IM Chat server to display and deliver chat content on a mobile device. I have developed the YChat! Instant Messenger client using Flash Lite 2.1. It is a Yahoo messenger chat client, which uses a proxy server developed using a Java Servlet to communicate and interact with the Yahoo IM Server.

This article will highlight how to create a rich user interface and integrate common chat features, such as user authenticated login, custom status settings, retrieval of buddy list information, sending and receiving chat messages and dynamically displaying data on a mobile phone using Flash Lite technology. It also demonstrates how easy it is to send and receive information from the server and how to retrieve information from the server using XML. I'll also describe the process for transferring files from the YChat! client to the server with the help of the KuneriLite Plug-in.

I've provided all of the code necessary for this application in the sample files linked below. Please feel free to modify the code and implement more features to build your own custom chat client. This YChat! Instant Messenger application has been successfully and extensively tested on a Nokia N95 device, but it may also work on other cell phones, as long as you address any memory constraints.

Requirements

To make the most of this article, you'll need the following software and files:

Flash CS4 Professional

Adobe Device Central CS4

Optional:

Sample files:

Note: The sample files include the complete source code and documentation for the YChat! Instant Messenger client and the YChat! IM web proxy.

Prerequisite knowledge

Prior experience developing with Flash is advised, but this article is geared towards new and intermediate users of Flash Lite. This article will also help developers familiar with J2ME and BREW get up to speed with using Flash Lite for mobile devices. Experience working with Java Servlets is helpful for understanding the YChat! IM web proxy code.

Specifications

The YChat! Instant Messenger application is an instant messaging client using Flash Lite 2.1 that targets Nokia N95. The Nokia N95 handset includes built-in support for Flash Lite. When this application is deployed, Flash Lite 2.1 or higher is required to run the code. The YChat! Instant Messenger mobile client application uses a YChat! IM web proxy developed using Java Servlets over the jYMSG library to communicate with Yahoo IM Server.

Additional software installation

In addition to the requirements listed above, I recommend installing the following software to deploy the sample project provided in this article:

  1. Flash CS4 Professional: to develop Flash Lite 2.1 applications
  2. Device Central CS4: to test the application with the Nokia N95 emulator

  3. Java JDK/ J2EE SDK: to build, test, and deploy Java EE 5 applications
  4. Eclipse 3.4 J2EE: to debug and run the YChat! IM Web proxy code
  5. Apache Tomcat 6.0 (or higher): to deploy the YChat! Web IM proxy
  6. Nokia S60 C++ MR SDK: to build applications for the S60 platform
  7. KuneriLite Plug-in: to upload files and facilitate packaging
  8. Nokia PC Suite: to copy files and install .sis files on a Nokia phone
  9. Flash Local Content Updater: to break the Nokia Security model and add file I/O and network access permission to the SWF in order to test the application on actual phone

About the author

Mohinish Basha Shaikh is a Flash Lite enthusiast. He has recently graduated and holds a MS in Computer Engineering from San Jose State University. Prior to Adobe Flash Lite he has also worked with J2ME and is very passionate about mobile technologies. Presently, he is working at Datapipe Managed Global IT Services as a Unix Administrator. He is also certified in RHCE and SCJP. He can be reached at mohinish_ce [at] yahoo [dot] com.