Sunteți pe pagina 1din 37

Application Development for Mobile Devices Review

()

Application Development for Mobile Devices Review

1 / 30

Course Overview

Developing applications for mobile devices using Java micro edition (JAVA ME) Specifying the difference between mobile and desktop applications with practices Focusing on NetBeans with Mobility Pack and Java Wireless Toolkit

()

Application Development for Mobile Devices Review

2 / 30

Course Content

9 lectures
1 2 3 4 5 6 7 8 9

Developing for Mobile Devices Introduction to Java ME More on CLDC and MIDP Building GUIs Storing Data (Persistence) Communication with HTTP Graphics and Multimedia Games API and Animation Wireless and Bluetooth

()

Application Development for Mobile Devices Review

3 / 30

Review Notes

How does developing software for mobile differ from developing software for desktop PCs? Network connectivity System resources Input and output devices Security Nature of users and environment

()

Application Development for Mobile Devices Review

4 / 30

Review Notes

How does developing software for mobile differ from developing software for desktop PCs? Network connectivity System resources Input and output devices Security Nature of users and environment

()

Application Development for Mobile Devices Review

4 / 30

Review Notes

How does developing software for mobile differ from developing software for desktop PCs? Network connectivity System resources Input and output devices Security Nature of users and environment

()

Application Development for Mobile Devices Review

4 / 30

Review Notes

How does developing software for mobile differ from developing software for desktop PCs? Network connectivity System resources Input and output devices Security Nature of users and environment

()

Application Development for Mobile Devices Review

4 / 30

Review Notes

How does developing software for mobile differ from developing software for desktop PCs? Network connectivity System resources Input and output devices Security Nature of users and environment

()

Application Development for Mobile Devices Review

4 / 30

Review Notes

What are the architectures for mobile applications? Examples Standalone Thin client/server Fat client/server Peer to peer Note: What are the differences in technology between thin client and fat client?

()

Application Development for Mobile Devices Review

5 / 30

Review Notes

What are the architectures for mobile applications? Examples Standalone Thin client/server Fat client/server Peer to peer Note: What are the differences in technology between thin client and fat client?

()

Application Development for Mobile Devices Review

5 / 30

Review Notes

What are the architectures for mobile applications? Examples Standalone Thin client/server Fat client/server Peer to peer Note: What are the differences in technology between thin client and fat client?

()

Application Development for Mobile Devices Review

5 / 30

Review Notes

What are the architectures for mobile applications? Examples Standalone Thin client/server Fat client/server Peer to peer Note: What are the differences in technology between thin client and fat client?

()

Application Development for Mobile Devices Review

5 / 30

Review Notes

What is JAVA ME configuration? Design for a broad family of devices based on memory and processor power Consist of JVM + APIs Two configurations: CDC and CLDC (What the details of each?) What is JAVA ME profile? More specific device characteristics (e.g. user interface) Consist of APIs Multiple profiles: MIDP (What the details?)

()

Application Development for Mobile Devices Review

6 / 30

Review Notes

What is Java Technology for the Wireless Industry (JTWI)? A device that is JTWI compliant MUST support CLDC 1.0 or CLDC 1.1 + MIDP 2.0 + a set of additional APIs including Wireless Messaging + other device constraints e.g. minimum screen size What is Mobile Services Architecture (MSA)? MSA is an updated version that includes some newer APIs such as Mobile 3D graphics What is MIDlet? An MIDP application is called an MIDlet

()

Application Development for Mobile Devices Review

7 / 30

Review Notes

Draw and describe an MIDLet lifecycle? Lecture 3 plus some quick quiz How can MIDlet be deployed? MIDlets are deployed in MIDlet suites A MIDlet suite is a collection of MIDlets plus configuration information A MIDlet suite consists of an application descriptor (a JAD file) and a JAR file containing the MIDlet .class file(s) and a manifest file

()

Application Development for Mobile Devices Review

8 / 30

Review Notes

Explain security support on MIDP 2.0? MIDP 2.0 specifies a security architecture HTTPS support is mandatory Permissions needed for performing sensitive operations e.g. make a HTTP connection Protection domains to which MIDlets can belong Permissions attributes - MIDlets can specify what permissions they need in the JAD file Note: Explain protection domains and permissions in Lecture 3?

()

Application Development for Mobile Devices Review

9 / 30

Review Notes

What are differences between CLDC 1.1 and Java SE? No object finalization, no reflection No programmer access to native methods Simpler threading Fewer methods in the Math class No System.in, no file classes in java.io Far fewer collection classes in java.util e.g. no ArrayList, HashMaps, TreeSets etc No support features introduced with Java 5.0 such as for-each loops, generics etc

()

Application Development for Mobile Devices Review

10 / 30

Review Notes

What are two device-independent user interface building approaches? Abstraction: create a generic UI and allow the MIDP implementation to decide the details at runtime Discovery: write code to discover device details at runtime and tailor the UI accordingly Compare two approaches? Lecture 4

()

Application Development for Mobile Devices Review

11 / 30

Review Notes

Draw and explain class diagram for javax.microedition.lcdui.* Abstract classes: Displayable, Screen, Canvas Derived classes: List, Alert, Form, TextBox, GameCanvas Understand the details of each derived classes, e.g., a set of Form items

()

Application Development for Mobile Devices Review

12 / 30

Review Notes

What are the difference between optional APIs and core APIs? Describe three methods of storing data for MIDlets? Record Store (What the details?) File (What the details?) Personal Information Management (What the details?)

()

Application Development for Mobile Devices Review

13 / 30

Review Notes

Why do users need the ability to store data on a mobile device? So applications can work in an offline/occasionally connected mode Collect data offline then upload Download data then disconnect Store user preferences Databases of reference data Improve performance by reducing network roundtrips

()

Application Development for Mobile Devices Review

14 / 30

Review Notes

What are the limitations of Record Store? Fiddly to program API is unlike J2SE file or database handling No SQL support for querying data Do not even have the concept of "fields" within a record No built-in way to synchronise data with an enterprise database Note: Why would you use Record Store, File, PIM?

()

Application Development for Mobile Devices Review

15 / 30

Review Notes

What kind of connection types CLDC APIs support for? Sockets Datagrams Serial port Note: MIDP 1.0 only supported HTTP, MIDP 2.0 adds HTTPS

()

Application Development for Mobile Devices Review

16 / 30

Review Notes

Why most MIDlets uses a separate thread to control network connections? Because otherwise the GUI will freeze while the network connection takes place

()

Application Development for Mobile Devices Review

17 / 30

Review Notes

Draw and explain class diagram for javax.microedition.io.* Abstract classes: Connection, StreamConnection, DatagramConnection Derived classes: SocketConnection, ContentConnection, CommConnection, HttpConnection, HttpsConnection Note: java.io.* includes InputStream and OutputStream

()

Application Development for Mobile Devices Review

18 / 30

Review Notes

Why do users need to create a stateful session between MIDlet and server? For instance in a traditional shopping cart application users need to keep track of what have been already in the cart Explain how to make a stateful session using HTTPConnection? Using cookies Client and server exchange a session id during the session

()

Application Development for Mobile Devices Review

19 / 30

Review Notes

What does the Canvas class offer, that the Screen subclasses do not? Complete control over the screen Provides low-level access to the device screen and input facilities Means more control, but also more work, because we have to produce lower-level code Note: Understand how Canvas work in Lecture 7 (paint method, what to draw, where to draw, how to draw)

()

Application Development for Mobile Devices Review

20 / 30

Review Notes What are Player and DataSource? Player: reads data from the DataSource, processes the data, and renders the media to the output device (e.g. a speaker) DataSource: represents a media data source and encapsulates the protocol handling/transporting the data from its source to the Player How to play a multimedia file? The Manager creates Players from a given DataSource Users specify what content type and protocol for getting an appropriate Player Being able to generate simple tones, without having to create a Player Note: What kind of controls the Player class supports for?
() Application Development for Mobile Devices Review 21 / 30

Review Notes

What is animation? Simulation of movement How can users achieve animation on a Canvas? Change what is drawn in a fast sequence Change the XY position and redraw Change images in a fast succession Note: Changes need to quickly redraw the screen, thus using threads

()

Application Development for Mobile Devices Review

22 / 30

Review Notes

What are the advantages of the GameCanvas class? The GameCanvas class builds on the Canvas class (it is actually a subclass of Canvas) With GameCanvas you have control over exactly when the canvas is repainted No call to repaint() and having the environment call the paint() method for you Support the Double-Buffering technique with prepareGraphics() and flushGraphics() Note: What is the Double-Buffering technique?

()

Application Development for Mobile Devices Review

23 / 30

Review Notes

Explain the Layers and LayerManager classes (Read LayerManager from Lecture 8) The Layer class enables you to create complete scenes by combining graphical content on different layers, e.g. have mountains in the background and a bird in the foreground Layer has location, size and visibility Layer is an abstract class, but there are two concrete implementations: TiledLayer and Sprite

()

Application Development for Mobile Devices Review

24 / 30

Review Notes

Explain and compare the TiledLayer and Sprite classes (Read Sprite Lecture 8) Implements the abstract class Layer Breaks a layer into cells (rows and columns), which are filled with tiles Tiles are created from a single image broken into equal-sized pieces When creating a tiled layer, it is necessary to specify the number of rows and columns, the image, width and height for each tile/cell Note: What is the collision between two sprites? How to detect the collisions? (Read Lecture 8)

()

Application Development for Mobile Devices Review

25 / 30

Review Notes

Why is Wireless Messaging necessary for mobile devices? What kind of messages Wireless Messaging APIs support for? A major use of mobile devices is the sending and receiving of short messages Java ME makes it possible to send or receive messages through the Wireless Messaging API (JSR205) Supporting three message formats: SMS Short Message Service, CBS Cell Broadcast Service (enables broadcast of messages to a group of mobile phones, MMS Multimedia Message Service) Optional APIs

()

Application Development for Mobile Devices Review

26 / 30

Review Notes

What are some of the advantages of SMS? Cheap and easy Message is not lost if the receiving phone is unavailable because of being sent through a store-and-forward network

()

Application Development for Mobile Devices Review

27 / 30

Review Notes

What are two ways in which messages can be received? Using a blocking receive() method: this method blocks a thread until an incoming message is received or the connection closed Using a non-blocking listener callback: a MessageListener is implemented and registered. When a message is received, the notifyIncomingMessage() method is called

()

Application Development for Mobile Devices Review

28 / 30

Review Notes

Explain some characteristics of Bluetooth? Bluetooth allows connecting to devices (mobile phones, PDAs, PCs, peripheral devices) which are in short range Using radio connectivity technology Using for Personal Area Networks (PAN) Networks are formed dynamically, not set up One master device can connect to seven slave devices Optional APIs

()

Application Development for Mobile Devices Review

29 / 30

Review Notes

Explain Bluetooth services in a Personal Area Network? Participating devices can offer services Participating devices can be clients of services Participating devices can do both at the same time Multiple services can be offered within the same PAN (even by the same device) Each service has a unique identifier, e.g., UUID (Universally Unique Identifier) Note: How Bluetooth services are created, registered, discovered in PAN? (Lecture 9)

()

Application Development for Mobile Devices Review

30 / 30

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