Sunteți pe pagina 1din 13

Netaji Subhas Institute of Technology

Winter Training report


On

EasyNote
Mobile phone as a notebook and blackboard

Submitted By:Vikas Kashyap


117/EC/07

Contents

Acknowledgement
Certificate
Mobile Application Development
Java ME or J2ME
Easynote as your notebook
Basic Structure of the Midlet and Functionalities
The screen flow diagram
The control flow diagram
Description
Future Prospects
Reference

Acknowledgement
I am very grateful and indebted to professor D V Gadre for lending me all possible
help in development of the project EasyNote : Mobile Phone as notebook and as
a blackboard.

Vikas Kashyap

Mobile Application development


Developing for mobile handsets is a schizophrenic experience on one side there is the neverending stream of innovations and new technologies, on the other side it can take a painfully
long time until new technologies are actually used by the end customers. Point in case is for
example the mobile internet which took more than 10 years until it is now at last used
frequently!
The most important issues for mobile application developers still are fragmentation and
distribution. The size of RAM varies from a maximum of 512MB in modern phones to 12MB in
average phones shipped 3 years ago. Same goes for processor speeds which vary from few MHz
to 1 GHz. The screen resolution varies from 128x166 to 480x640. If fragmentation in Hardware
was not enough there exists a plethora of operating system with a little to choose amongst
them. Some of the common operating Systems for mobile phones are :-

Java 2 Micro Edition (J2ME or JAVA ME)


Around 80% of all mobile handsets shipped in 2009 support the mobile Java standard (J2ME /
Java ME), so Java is by far the most widely distributed application environment. In contrast to
many other environments, J2ME is a standard rather than a product, which can be
implemented by anyone (who pays Oracle the corresponding license fees that is).
Standardization is the strength of J2ME but at the same time it is the source of many
fragmentation problems. On many handsets with embedded operating systems, J2ME is the
only way to realize client side applications.
J2ME is divided into configurations (CLDC 1.0, CLDC 1.1 and CDC), profiles (MIDP 1.0, MIDP 2.0,
MIDP 2.1), and optional APIs (JSRs), which provide specific information about APIs and different
families of devices. A configuration is designed for a specific kind of device based on memory
constraints and processor power. It specifies a Java Virtual Machine (JVM) that can be easily
ported to devices supporting the configuration. It also specifies a strict subset of the Java 2
Platform, Standard Edition (J2SE) APIs that will be used on the platform, as well as additional
APIs that may be necessary. Device manufacturers are responsible for porting a specific
configuration to their devices.
Profiles are more specific than configurations. A profile is based on a configuration and provides
additional APIs, such as user interface, persistent storage, and whatever else is necessary to
develop running applications for the device.
Optional APIs define specific additional functionality that may be included in a particular
configuration (or profile). The whole caboodleconfiguration, profile, and optional APIsthat
is implemented on a device is called a stack. For example, a possible future device stack might
be CLDC/MIDP + Mobile Media API.
MIDP applications are called MIDlets, a continuity of the naming theme begun by applets and
servlets. MIDlets are developed on regular desktop computers although MIDlet itself is
designed to run on smaller devices, using any of the various toolkits available through many
vendors, some famous of them being Java ME SDK3.0 , Net Beans mobility pack, Eclipse,
Springer SDK, etc. The MIDlets when completed are bundled into Jar and Jad files and deployed
on the mobile phones. Jar file is a compressed archive containing all the compiled class files and
resource files. Jad file describes the jar file.
There also some third party products to augment J2ME,viz.
LWUIT: A swing inspired UI framework.
J2ME Polish: design using CSS or HTML.
Mewt: Uses Xml for creating UI.
TWUIK: A powerful rich media engine.

EasyNote as your notebook


Everything in life is transitory, and so is memory. Even a person with excellent memory requires
a pen and notebook to jot down few lines of importance. How many times has it happened that
we have misplaced a single paper note on which we have jotted down some important info to
be used later? How many times have we been caught without pen and/or paper and have to
ask for it from the colleagues? Life is made of moments and many a times some we miss out on
some valuable and memorable moments due to such problems. In fact, notes give us the
chance to revisit some of the nostalgic moments of our life just as pictures do. Whatever
knowledge we have today of human evolution and ancient cultures is based on the notes of our
forefathers. In todays world of multitasking and busy schedule, notes not only enable us to
manage our day to day life in a better organized way but also foster our relationships as they
helps us remember anniversaries and important moments of others life also. World would not
have been same without even a small petty note. EasyNote is just a step in augmenting the
power of notes and scribbling. EasyNote is a mobile application written in Java ME which
enables you to use your touch screen mobile phone as a rough notebook.
The Need

Most of the mobile phones today come with inbuilt notepad application which allows one to
store notes in text format. However, as history stands proof, symbolic language is much more
informative than textual language, EasyNote enchases on this fact. EasyNote allows user to use
symbolic language rather than textual to store their notes. Users can use whole of their phone
screen as canvas and draw anything with any color composition and store the screen as a PNG
image that can be used in future just as any image is used with full control to the user.

Basic Structure of the Midlet and Functionalities


The whole application is divided into basic parts: The Notepad : If the user wants to use just the textual format he can use the notepad
option of the application which allows the information to be saved as a text file which
can be reused by any device.
The Canvas : This is the highlight of the application which allows user to use his phone
screen as per his wishes. Anything of various color combination can be drawn on the
screen and saved as a Portable Network Graphics (PNG) Image. The saved image then
can be used as desired by the user as he uses normal images.
The Package and Classes
 PNGEncoder Package: This is a third party open source package which contains classes to
convert RGB byte array into PNG images. The Encoder class of the package takes the RGB
array and its size as a parameter and returns an instance of the created PNG image. The
RGB data sent is in integer format and 1 dimensional array. The size of the Image is around
four times the size of the array. Since, its a third party package only its constituent classes
are presented without going into details : Adler32
 Deflate
 Encoder
 JZlib
 Statictree
 Tree
 Zstream
 Note Package: This package contains the whole application except the image creation from
raw RGB data part, which is covered by the PNGEncoder package. This package is the heart
and soul of the application. All GUI are handled by classes of this package only. The
constituent classes and their functions are discussed in detail in the following sections.
 EasyNote the Midlet: It acts as the controller of whole application. All data flow
between two classes happens through this class only. Every screen change happens
through this class only. It contains an object of each of the classes of the package. Its
the only midlet of the application hence the lifecycle of this midlet is pretty much the
life cycle of whole application. The application starts as well as exits with this midlet.
Also, the application is known by the Midlets name.

 SplashScreen: This is the opening/welcome screen of the application. It displays the


application name and the developers name. If uninterrupted by any event this screen is
visible till 3 seconds, however, if a user wishes to run it for lesser time he can just press
any key or tap the touch screen to interrupt the running of this class and skip the
remaining time duration of this class.
 DrawScreen: This class controls the canvas screen. All drawing takes place inside this
class. This extends the Canvas class of lcdui package and overrides its paint method. This
is the first screen thats shown after the SplashScreen and understandably the most
happening screen and class. There are two algorithms used for drawing in this class. In
the first algorithm complete screen is redrawn after every touch event yielding a better
continuity at the cost of speed and memory while the other redraws only the pixel
which has an touch event registered yielding much faster response and utilizing
comparatively lesser memory. The class makes use of pointerPressed and
pointerDragged methods of the lcdui package for handling pointer events. Each pointer
event changes the color information of the pixel on which the event has occurred. This
class contains a Boolean variable which controls whether to draw full screen or only a
pixel in case of second algorithm.

 SaveClass: This class handles the file operations. All inputStreams and outputStreams
are handled by this class. The images and the text files are saved in this class. The class
uses JSR 75 the file connection API for accessing the external memory. There is file
browser embedded in class which browses for the directory to store the files. Users
have to browse for the desired only once during the execution of the application after
first attempt same directory is used for storing all the upcoming files.

 OptionScreen: As the name suggests this class controls the colors of image. At present
there are some predefined color options instead of a color mixer option for both
background and the foreground. User can change both background and foreground
color on the same screen. There can be many foreground colors in an image but only
one background.

 Notepad: Now this one is for the primitives. Those who dont want to use the symbolic
notes and instead want to continue with their text format, a notepad is provided whose
size grows as the number of characters increase. User can write alphanumeric
characters as well as the special characters supported by the phone. The text is saved in
a text file which again can be accessed from anywhere and can be used as desired.

The Screen Flow Diagram

SplashScreen

DrawScreen

OptionScreen

Notepad

Credits

Help

The Control Flow Diagram

Description

CLDC 1.1
MIDP 2.0
Touch Screen phone
JSR 75(For File connections)
Size of Standard J2ME version jar file = 84KB

Future Prospects
One of the main reasons behind development of this application was to serve the common
relationship between blackboard and a notebook. This application can easily be extended to
pair the mobile with a projector wirelessly and use the mobile screen as a blackboard. The
benefits of this technology will be immense with the ability to save the blackboard data.
Teacher can store the data on their phone and wont have to rewrite it all again next time in
next class, while they can also share it with students who might have missed the lecture and
hence maintain the continuity of lectures for students.

References

Mobile Developers Guide to the Galaxy 5th Edition


Beginning J2ME: From Novice to Professional, Third Edition : SING LI AND JONATHAN
KNUDSEN

ScreenShots

S-ar putea să vă placă și