Docstoc

jil widget sdk user guide

Document Sample
jil widget sdk user guide Powered By Docstoc
					JIL Widget SDK User Guide

http://127.0.0.1:50701/help/topic/org.jil.ide.eclipse.help/docs/m...

Widget SDK Documentation >

JIL Widget SDK User Guide 1. Introduction
This document provides an overview of JIL’s mobile widget development environment. It describes how to use the SDK to create mobile widgets that conform to JIL’s specification, which are composed of HTML, CSS and JavaScript files. JIL’s mobile widget SDK offers an integrated environment which allows you to develop, debug and deploy your widgets. The editors in the SDK are customized to facility the code writing, with a handy debug tool. And you can also have a preview of your widget on the emulator.

1.1 Who Should Read This Document
First-time developers can learn what JIL’s mobile widget is and how to use JIL’s mobile widget SDK to create mobile widgets. Experienced developers learn how to speed up the widget development process.

1.2 Widget Overview
A JIL Widget is a composition of HTML, JavaScript and CSS combined as a package that is installed on the handset. The widget package is self contained. It includes all the support files that are needed by the widget. With this approach, the widget can become a complete standalone application that does not require any external resources. Any access issue in running a widget can be avoided. The HTML is based on standard HTML 4.0. It supports a rich set of JavaScript with JIL extensions. These extensions support integration with the handset device in the form of Messaging, PIM and Device information. It supports a rich set of robust Network Resource API's. It provides widget application access of device and network resources. With these capabilities, a widget can provide access to internet based data, information, and services. A widget can also provide access to existing enterprise applications. JIL Widgets allow you to develop applications that can be used on various handsets. These applications allow you to provide a simple and fast interface that resides on the handset. They are easy to create and can provide powerful capabilities. It is much more then a simple browser can provide. These applications have access to the handset resources such as the Contacts, Email and SMS system as well as other functions in the JIL Widget API. The JIL SDK enables you to create mobile widgets for the JIL enabled mobile handsets. These mobile widgets can then be loaded onto the handset. JIL Widgets are portable to run on any JIL enabled handset. You are no longer constrained to one handset manufacture or one operating system.

1.3 Contact Us
If you encounter bugs in JIL’s mobile widget SDK, you are encouraged to report them to JIL. You can also file enhancement requests to describe features you would like to see in future revisions of JIL’s mobile widget product or document. To file bugs or enhancement requests, please mail us at support@jil.org or information@jil.org

1 of 7

5/14/09 10:03 PM

JIL Widget SDK User Guide

http://127.0.0.1:50701/help/topic/org.jil.ide.eclipse.help/docs/m...

2. Getting Started
Developing widget application is quite simple with the JIL SDK. It is based on the industry standard Eclipse Software Development Environment. There is a JIL Widget Wizard to help you create your project in minutes. Using the JIL SDK tools to create the project and all required files quickly allows you to complete your project fast. The JIL SDK contains a handset emulator that helps you test and verify your widget. You can get your project started in minutes. In this section, we’ll guide you through the whole widget development process.

2.1 Setting up the environment
After downloading the SDK, store the archive to a suitable location on your machine. The SDK file are all in one package which contains documents, sample widget, emulator, and eclipse IDE with widget development plugins. Before installation, please take a monment to check software requirements as above. JDK is necessary for JIL SDK. If it is not installed on your machine, please go to Java SE Downloads (http://java.sun.com/javase/downloads/index.jsp). On Windows, double click on SDK achive icon to run setup application, and follow wizard steps to install SDK on your manhine. The default installation directory is on C: drive. You can change it on installation. After installation, eclipse IDE can be launched for widget development. You can further find JIL SDK shortcut icon in Program group and Desktop. On Mac, run below command to start JIL SDK setup application, and follow wizard steps to install SDK on your machine. The default installation directory is /Application path. $ java -jar jil_install.jar On Linux, run below command to start JIL SDK setup application, and follow wizard steps to install SDK on your machine. The default installation directory is your home directory. $ java -jar jil_install.jar Note: The SDK installation directory is set as "SDK Location" in Preferences > Widget. (Mac OS X: Eclipse > Preferences)

2.2 JIL 5 Minute Test Drive
Once you have the SDK installed, you can create a simple Hello World widget and run it in the emulator or on a handset in only a few minutes. Step 1 Create a GoGoWidget project Open JIL SDK, in the menu bar, select “File à New à Widget Project” to quickly create a widget project as illustrated in Figure 1.

2 of 7

5/14/09 10:03 PM

JIL Widget SDK User Guide

http://127.0.0.1:50701/help/topic/org.jil.ide.eclipse.help/docs/m...

Figure 1 Create a widget project Then give a name to your project, such as GoGoWidget. A new widget project will be created in your workspace by clicking “Finish”.

3 of 7

5/14/09 10:03 PM

JIL Widget SDK User Guide

http://127.0.0.1:50701/help/topic/org.jil.ide.eclipse.help/docs/m...

Figure 2 Create a GoGoWidget project Now you can explore the newly created widget by its file structure. By default, some rudimentary files will be automatically created with predefined template.

Figure 3 Widget file structure Those files are: · GoGoWidget.html – This file is the entry point to display your widget and define the general layout of your widget. · GoGoWidget.css – This file is used to tell the widget engine how you want your widget look like, such as the colors of each element, or font size. · GoGoWidget.js – This file defines what actions could be performed against your widget. · config.xml – This is the file that contains the meta information of your widget, such as, the name of the widget, who is the author, etc. Step 2 Coding your widget You can open the files by double-clicking them to write your own widget. In this example, we want the widget just simply display the text of “Go Go Widgets ” with a good-looking background picture. The code is illustrated in Figure 4.

4 of 7

5/14/09 10:03 PM

JIL Widget SDK User Guide

http://127.0.0.1:50701/help/topic/org.jil.ide.eclipse.help/docs/m...

Figure 4 Coding the widget Step 3 Run your widget on the emulator Now we have finished coding the widget, we can right click the widget project and select runàrun as widget project to launch the emulator.

Figure 5 Launch widget in emulator When the emulator is launched, your widget will be automatically loaded. You now can operator your widget in the emulator.

5 of 7

5/14/09 10:03 PM

JIL Widget SDK User Guide

http://127.0.0.1:50701/help/topic/org.jil.ide.eclipse.help/docs/m...

Figure 6 Widget running in the emulator Step 4 Play your widget on the real handset At last, you can find a well-packaged widget under the bin folder, with the file extension of “wgt”. Copy the file to your mobile phone which has the widget engine installed; you’ll be able to play the widget on your real device.

6 of 7

5/14/09 10:03 PM

JIL Widget SDK User Guide

http://127.0.0.1:50701/help/topic/org.jil.ide.eclipse.help/docs/m...

Figure 7 The deployable widget package You have now seen how simple it is to create a JIL widget. In only a few minutes, you have used the JIL SDK Wizard to create a project; ran the widget in the emulator; installed the widget on the handset device in development mode; and then executed it on the handset.

7 of 7

5/14/09 10:03 PM


				
DOCUMENT INFO
Shared By:
Tags: widget, user, guide
Stats:
views:193
posted:12/21/2009
language:English
pages:7
Description: jil widget sdk user guide