رفعج دعس ميرم داجسلا دبع اينار يماس يلع

advertisement
‫‪ ‬مريم سعد جعفر‬
‫‪ ‬رانيا عبد السجاد‬
‫‪ ‬علي سامي‬
‫‪ ‬سمادير عبد العباس‬
‫‪ ‬ياسمين عبد االمير‬
‫‪1‬‬
Introduction of J2ME
Introduction of Mobile
Technology

The goals Mobile Technology
Connecting people
 Information sharing
 Internet access

3
Introduction of Mobile
Technology

Includes
Notebook
 Palmtops
 PDAs
 Mobile Phones
 Tablet PCs
 And more ...

4
Introduction of Mobile
Technology

The Internet Scenario for retrieving
information in a wireless network
Web Servers
Base
Station
Internet
Wireless Network
Request :
Response :
5
Introduction of Mobile
Technology

Mobile Networking
GSM, GPRS, EDGE
 1G, 2G, 2.5G, 2.75G, 3G and 4G
 IEEE802.11
 InfraRed and Bluetooth

6
Introduction of Mobile
Technology

GSM


Global System for Mobile
Communications, one of the leading
digital cellular systems. Data speed
for GSM is 9.6 kilobits.
EDGE

Enhanced Data GSM Environment.
EDGE is a faster version of GSM
wireless service. EDGE enables data
to be delivered at rates up to 384
Kbps on a broadband.
7
Introduction of Mobile
Technology

GPRS

General Packet Radio Service, a
standard for wireless communications
which runs at speeds up to 115
kilobits per second.
8
Introduction of Mobile
Technology

First Generation (1G)


Analog system designed for voice only
communication. 1G systems are almost
extinct now,
Second Generation (2G)

Use GSM and IS-95 CDMA technologies
• Allows users to communicate with different codes

Still designed for voice communication
9
Introduction of Mobile
Technology


Third Generation (3G)
 UMTS and CDMA-2000, are used. UMTS is
broadly deployed in Europe and CDMA-2000
is being deployed in North American and
parts in Asia
 Higher data transmission rate (up to 2Mbps)
which allows video conferencing
Forth Generation (4G)
 Combined the technologies of Wireless local
area network and 3G
10
Introduction of Mobile
Technology

IEEE802.11
Wireless Local Area Network
 802.11a, 802.11b and 802.11g
 Allows 54Mbps data transmission
speed (even 108Mbps is provided in
the market)

11
Introduction of Mobile
Technology

InfraRed
Short range data transmission
technology
 Normally used as remote controller
 Data rate is around tens kbps
 Line of sight transmission, hence the
space between two InfraRed Devices
should be clear

12
Introduction of Mobile
Technology

Bluetooth
Commonly used for hand-free
earphone
 Short range data transmission –
around 10 meters
 Data rate is up to 1Mbps
 Do not have light of sight requirement

13



The button (or project menu item) “Build”
causes the source files to be compiled.
Although it is called
“Build” it doesn’t actually produce a jar file. The
emulator can work without a jar file. If you need
to
generate the jar-file use the project menu item:
“Package -> Create Package”. The previous
directory listing
14
Using “Build” to compile
the project




was after a build but before a “create package”
so there is a manifest file, a deployment file,
compiled class
files, but no jar file.
This section explains how you can use
alternative “screens” in one MIDlet. This is very
important because
the area of the display is so small it is not
possible to get much on the display so that to
do other jobs
15
Using “Build” to compile
the project






sometimes requires a separate screen.
The basic strategy is to build different Forms for
the different tasks that the program wants to do
and
then switch between them using commands.
The switching is easy, just use the setCurrent
method on the
one and only display, so:
display.setCurrent (editForm);
will cause the MIDlet to show the edit form
16
Using more than one Form
This section explains how you can
use alternative “screens” in one
MIDlet. This is very important because
 the area of the display is so small it is
not possible to get much on the
display so that to do other jobs
 sometimes requires a separate
screen.

17
Using more than one Form
The basic strategy is to build different
Forms for the different tasks that the
program wants to do and
 then switch between them using
commands. The switching is easy,
just use the setCurrent method on the
 one and only display, so:
 display.setCurrent (editForm);
 will cause the MIDlet to show the edit
18
form.

Ticker


The Ticker class implements a tickertape, or a
piece of text that runs continuously across the
display. A ticker can be attached to one or more
of the four screens discussed earlier, namely:
Alert, TextBox, List, and Form. To create a
ticker object, use the Ticker constructor:
public Ticker(String str);
19
There are a few points to
note about a ticker:



No method calls are provided for starting and
stopping the ticker.
The ticker string scrolls continuously. In other
words, when the string finishes scrolling off the
display, the ticker starts over at the beginning of
the string. It may help to add some spaces at
the end of the ticker string so the message
ends do not appear tied together.
The direction and the speed of the scrolling are
determined by the MIDP implementation
20
DateField



A DateField object is an editable component for
representing calendar date and time information
that can be placed on a Form object. It can be
configured to accept date or time information, or
both. A DateField object can be created using
one of the following two constructors:
public DateField(String label, int mode);
public DateField(String label, int mode,
TimeZone timeZone);
21
DateField

The first constructor is used to create a
DateField object with the specified label and
mode. This mode can be specified providing
one of the static fields: DateField.DATE,
DateField.TIME, or DateField.DATE_TIME. The
DateField.DATE input mode allows you to set
date information, DateField.TIME allows for
clock time information (hours and minutes), and
DateField.DATE_TIME allows for setting both.
22
DateField

i.
ii.
iii.
iv.

The DateField object has the following methods
to access the properties added onto the Form
object
public Date getDate( )
public int getInputMode( )
public void setDate(Date date);
public void setInputMode(int mode);
To display a date field, first create a Form
object, and then use the append( ) method of
the form to add the date field.
23
Software Technology for
Mobile Device

There are many terms about mobile
application development
Windows Mobile
 Symbian
 Embedded Visual C++ and .Net
 J2ME

24
Software Technology for
Mobile Device

Windows Mobile


Windows Mobile is Microsoft's software
platform for Pocket PCs and Smartphones.
Windows Mobile extends the familiarity of
the Windows desktop to personal devices.
Windows Powered mobile devices include
Pocket PC, Pocket PC Phone Edition,
Smartphone, and Handheld PC
25
Software Technology for
Mobile Device

Symbian

Symbian is like an Operation System
on mobile phone. It provides the
required low level functions for
application development
26
Software Technology for
Mobile Device

Embedded Visual C++ 4.0 and .Net

Programming language and related
libraries that allows programmer to
develop applications on Windows
Mobile platform
27
Software Technology for
Mobile Device

J2ME (Java 2, MicroEdition)



Normally used for less memory and low
processing power devices
A collection of packages and classes for
application development on mobile devices
We will use J2ME to develop applications in
this course
28
J2me libraries

J2ME Polish is a suite of tools and
technologies invented in 2004. It has
been downloaded up to a million times
until now and hundreds of companies
worldwide have purchased
commercial licenses (including
Huawei, Samsung, Nokia, Qualcomm,
and Vodafone).
29
The main features of J2ME Polish
include:




Lush: A UI toolkit that is highly flexible and that can be designed outside
of the application's source code.
Janus: A toolset for porting mobile application to different handsets and
different technology platforms. It also allows transcoding you J2ME
application to a Blackberry or Android app.
Touch: Technology for accessing server side content and
communicating with remote parties.
Trunk: A persistence solution that allows you to load and save complex
data with a single line of code.
30
Flemil


Flemil is a mobile application user interface creation
library for Java ME(J2ME) devices. Flemil stands for
Flexible Mobile Interface Library. As the name suggests
Flemil provides the application developer as well as the
user with flexibility to control how their application look
like.
Flemil offers more user friendly and intuitive widgets on a
device independent manner while utilizing the least
resources therefore leaving the user and the developer of
an application with a lot of resources for use with
business logic implemetation.
31
Features

Flemil offers a number of useful features on top of the
default ones of providing user input. These features
include theming, layout switching between landscape and
portrait, switching to fullscreen mode, popup windows,
tabs controls, nested menus and many more. All these
features are exposed to you in a straighfoward way
through the API which provides methods to access the
functionalities of the library. The best way to have an
experience of the features that Flemil gives is to watch a
demo of it running or by playing around with the
MicroEmulator demo live on this Website. Flemil will work
on any
32


device that has MIDP 2.0 and CLDC 1.0 or
higher for both cases (Any device created after
2002 most likely meets these features). Flemil
is targeted for all ranges of devices that has
support for J2ME, from simple phones with a
few kilo bytes of memory available to high end
phones with mega bytes of available memory.
Flemil adjusts itself to fit on the whole screen of
your application in a device independent way
therefore making sure that the application
utilizes as much as possible of the available
users device display area.
33
jMobileCore


jMobileCore library is powerful tool for creating J2ME
applications. jMobileCore provides support for developing
compact and rich Canvas-based GUI, fast data access,
reliable communications and simplifies creation of
multithreading midlet applications.
jMobileCore library is written on Java2 Mobile Edition
(MIDP1.0 and CLDC1.0) and using standard Sun J2ME
libraries. Some classes are using J2ME manufacturer's
extensions (from Nokia and Siemens) for better
performance and presentation. No other libraries and/or
frameworks are used.
34







jMobileCore library is targeted to work on any phone or
PDA device which supports J2ME (MIDP1.0 and
CLDC1.0). Today list of supported devices includes (but
not limits) phones:
· LG Electronics (like 5320),
· Nokia series 30/40/60 (ex: 6200, 3650, 6800),
· Motorola iDEN (ex: i85 ,i730, i860), Motorola T7xx,
· Samsung (like C100, S100/200/300),
· Siemens (like SL45, S65),
· SonyEricsson (like T6xx)
35
Major features of the
jMobileCore library



· GUI (Canvas-based) support including "core" part
(standard GUI controls: Label, TextField, TextPane,
TextArea, List, Menu, SoftButton etc.) and "extensions":
non-standard but useful phone-oriented graphic controls
(PropertyLabel, SplashScreen, DateField, TimeField,
CurrencyField, PhoneNumberField etc.)
· Data storage support: implementation of fields
(boolean, integer, string, binary), records, tables, keys
and indexes on the top of RMS
· Communications: implementation of general support for
HTTP and binary(over HTTP) data transfer
36

· Parallel processes support:
classes which allows simple
conversion of user tasks (classes)
to asynchronously working threads
37
LWUIT


LWUIT is a framework for cross platform mobile
development that was originally inspired by Swing but
took a lot of inspiration from SwingX and went much
further with themes & styles. LWUIT has a powerful GUI
builder/theme creator and provides a porting layer to
several platforms specifically J2ME/MIDP, Blackberry,
TV, JavaSE (Applets and Applications), Android and
others.
LWUIT allows a lot of power in configuring its theme and
has 3rd party themes mimicking native Android/iPhone
look and feels in the LWUIT incubator. LWUIT features
elaborate special effects and transitions and is highly
customizable, it supports all the common touch gestures
as well as feature phone none-touch UI's seamlessly.
38


LWUIT is 100% open source and free under the GPL with
classpath exception license which allows for both
commercial and none commercial deployments.
LWUIT4IO is an additional library for LWUIT recently
added to provide improved integration with filesystem,
storage, serialization, Networking etc. To this date there
is a large and thriving LWUIT community, there are many
operator grade deployments of applications based on
LWUIT within some of the biggest operators in the world.
39
J2ME Resources




http://newsofthefuture.net/index.php?/archives/
33-Evaluation-GUI-libraries-for-J2ME.html
Ben Hui's site has the best Bluetooth tutorials
and an extensive links section
Eclipse - is my favourite Java IDE. It's open
source, cross-platform and totally free.
Eclipse Plugins - a great resource for getting all
sorts of things to work with Eclipse.
40
41
42
Download