• No results found

Mobile Application Development

N/A
N/A
Protected

Academic year: 2021

Share "Mobile Application Development"

Copied!
9
0
0

Loading.... (view fulltext now)

Full text

(1)

Mobile Application Development

Deployment

Development Process and Portability

Christoph Denzler

University of Applied Sciences Northwestern Switzerland Institute for Mobile and Distributed Systems

Learning Target

You

know of what steps the deployment process

consists for a MIDlet application

are aware of the fragmentation problems in the

J2ME market

can apply some strategies to this problem

know how to develop and deploy the same

(2)

Deployment IMVS, Ch. Denzler 3

Development & Deployment

Compiling Packaging Deploying

Porting

Device Fragmentation Design for Portability

Overview : Development & Deployment

Editing javac preverify jar obfuscate copy on Webserver download .jad download .jar install & verify run (KVM) enter URL Cell Phone Service Provider Internet Development Installation

(3)

Compiling

javac -bootclasspath

../../lib/cldcapi10.jar; ../../lib/midpapi20.jar

-d tmpclasses -source 1.3 -target 1.1

src/hello/HelloMIDlet.java

bootclasspath loads requested libraries source indicates language compatibility target indicates byte code compatibility d destination folder is tmpfolder

Deployment IMVS, Ch. Denzler 5

Preverify

preverify -classpath ../../lib/cldcapi10.jar;

../../lib/midpapi20.jar -d classes tmpclasses

classpath lists necessary libraries

-d destination folder

Verifies byte code.

(4)

jar cfm bin/Hello.jar bin/MANIFEST.MF

-C classes .

cfm: creates a jarfile with the given manifest. Note m

and f must be in the same order that jarfile and manifest appear

-C: directory with the compiled and preverified

classes

Deployment IMVS, Ch. Denzler 7

Obfuscation

java -jar ../../bin/proguard.jar

-libraryjars ../../lib/cldcapi10.jar;

../../lib/midpapi20.jar

-injars bin/Hello.jar -outjar /deploy/Hello.jar

-keep "public class * extends

javax.microedition.midlet.MIDlet "

ofuscates all injars and produces an outjar does not obfuscate terms in -keep

Minimize memory footprint by

(5)

Installation

OTA (over the air)

.jad file is downloaded and its content will be

presented to the user.

User decides to proceed.

.jar file is downloaded and application will be

installed.

Direct transfer from PC (usually only Windows)

Either wireless (Bluetooth, IrDA)

USB cable

Deployment IMVS, Ch. Denzler 9

Development Process & Tools

1. Develop the source code files.

Any texteditor

2. Compile the source code files into bytecode classes.

Standard Java Compiler (javac)

3. Pre-verify the bytecode classes (Off-Device Pre-verification) midlet classes must be verified prior to distribution to guarantee that

they don´t perform any illegal operations.

Reason: limitations of the virtual machine used in mobile devices

J2ME toolkit (WTK, JME SDK)

4. Package the bytecode classes into a Jar-file with any additional resources and a manifest file.

Java archive (jar) tool

5. Develop a Java Application Descriptor file (Jad-file) to accompany the Jar-file.

Generated and/or using texteditor

6. Test and debug the midlet.

(6)

Deployment IMVS, Ch. Denzler 11

JAR Manifest

MIDlet-Name: Hello World MIDlet-Version: 1.0.0 MIDlet-Vendor: LOGIQUEST

MIDlet-Description: Hello World Demo MIDlet-Icon: img/hello.png

MIDlet-Data-Size: 0

MIDlet-1: Hello, img/hello.png, hello.HelloWorld

MicroEdition-Profile: MDIP-1.0 MicroEdition-Configuration: CLDC-1.0

Java Application Descriptor (JAD) MIDlet-Name: Hello World

MIDlet-Version: 1.0.0 MIDlet-Vendor: LOGIQUEST

MIDlet-Description: Hello World Demo MIDlet-Icon: img/hello.png

MIDlet-Data-Size: 0 MIDlet-Jar-Size: 1251 MIDlet-Jar-URL: hello.jar

User-defined entries can be read with the MIDlet method String getAppProperty(String key)

JAD file properties

JAD File Content

MIDlet-Name MIDlet-Version MIDlet-Vendor

MIDlet-<n> for each MIDlet MIDlet-Jar-URL

MIDlet-Jar-Size

The MIDlet-<n>property specifies the name of the MIDlet and an icon (for selecting the MIDlet to be run), and the name in the JAR file of the class which
(7)

Deployment IMVS, Ch. Denzler 13

Packaging MIDlets

One or more MIDlets are packed in a “MIDlet Suite”:

Java class files, other resources (images etc.) and a Manifest, in

a JAR file,

A Java Application Descriptor (JAD) file describing the MIDlets

(and largely repeating the Manifest), in the form of Java properties (key: valuepairs)

The JAD file allows the device’s application manager to

decide whether the MIDlets can be executed on the device.

Porting and Testing Application

Porting and testing applications is very time

consuming since there are differences between

different phone models such as:

Screen size Memory Processor Bugs Operator problems Specification divergence

(8)

Deployment IMVS, Ch. Denzler 15

Mobile device fragmentation limits mobile application

adoption and thereby Carriers’ ARPU (average revenue per user) growth

Different hardware Different API support

Different standards: MIDP, DoJa, BlackBerry, etc. Different interpretations of standards

Device bugs

Example: Design problems

The mobile Java standard only allows limited

design of applications, unless every detail is

drawn by the application itself

Standard implementations do not allow to influence

the CI and look and feel of the application

Adapting designs to different environments or

customers is difficult

Design changes require changing the source code of

(9)

Deployment IMVS, Ch. Denzler 17

Java ME: De-fragmentation

The problem

More than 600 J2ME device types

It is expensive to develop, test and sign, deliver and maintain Ever increasing operational costs

Commercial "failure" of the J2ME platform

The solution:

De-fragmentation

Possible due to increased capabilities of the devices Improved programming techniques

References

Related documents

While NFCs were increasingly involved in investment in financial assets (see Figure 1), deriving an increasing share of their income from financial sources (see Figure 2), and

This paper proposes a new class of FSs, which can be see as an ex- tension of SVNLs, named SVN2TLs, they can satisfactorily re flect im- precise, incomplete, and inconsistent

Microsoft Application Compatibility Toolkit ACT A tool that determine compatibility of current applications with Windows 10 before an upgrade Multitouch?. You use a set will

This paper deals with checking the compatibility of the Web Application with the Cloud Service composition and to build a Virtual Machine (Instance) for Deployment and

The CE marking on Fuji Electric products indicates that they comply with the essential requirements of the Electromagnetic Compatibility (EMC) Directive 2004/108/EC

This indicates that the server uses version 1.0 of HTTP in its response, and a status code of 200 indicates that the client's request was successful and the requested data will

• Device compatibility - ensure mobile app's compatibility and functions across multiple devices of different screen sizes, resolutions and hardware.. • Ensure mobile app turns

MAESTRO’s limit state analysis capability computes a number of different stiffened panel collapse failure modes, local member failure modes, and hull girder ultimate strength.