Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Java Micro Edition Platform & Android - Seminar on Small and Mobile Devices
1. Java Micro Edition Platform
&
Android
Seminar on Small and Mobile Devices
May 13th, 2008
Dejan Juric (djuric@student.ethz.ch)
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 1
2. Outline
● Motivation & Goal
● Java Micro Edition Platform
● Android
● Java ME vs Android
● Conclusion & Discussion
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 2
3. Motivation
● Number of mobile phone subscribers by
November 2007: 3.3 billion. (personal
computers: 1 billion)
● Problems with mobile devices:
– Heterogeneous: different form factors, features,
functions
– Resourceconstrained
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 3
4. Goal
● Allow customization of devices
– Download new services and applications from the
Internet
● Development of applications and services
– Deviceindependent
– Cost efficient
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 4
5. Java Micro Edition Platform
● Available on most current mobile phones
● Subset of the Java Platform
– for resourceconstrained devices
Java ME
Java SE
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 5
7. Java Micro Edition Overview
Profiles
Configurations
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 7
8. Java ME Configurations
● Configuration:
complete Java
runtime environment
– Defines the minimum
set of Java virtual
machine features &
class libraries
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 8
9. Java ME – Configurations CDC
● Connected Device
Configuration
– 32bit CPU, 2MB of
RAM, 2 MB of ROM
– Modified Java SE core
class libraries
– CDC 1.1 matches JDK
1.4 APIs
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 9
10. Java ME – Configurations CLDC
● Connected Limited
Device Configuration
– At least 160 kB of
nonvolatile memory
– At least 32 kB of
volatile memory
– Minimal host CLDC 1.1
java.lang
operating system or +java.lang.ref
kernel available java.io
java.util
May 13th, 2008 Seminar on Small and Mobile Devices javax.microedition.io
Dejan Juric (djuric@student.ethz.ch) 10
11. Java ME – CLDC
● Eliminated features
– Userdefined class loaders
– Thread groups and daemon threads
– Finalization of class instances
– Asynchronous exceptions
– Floating point types (since CLDC 1.1)
● Class file verification
– Offdevice preverification and runtime verification
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 11
12. Java ME Profiles
● Define a minimum set
of APIs available on a
“family” of devices
● Applications are
written for a particular
profile
– Portable across
devices that support
that profile
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 12
13. Java ME MIDP
● Mobile Information Device Profile
– Screen of at least 96x54 pixels
– Keypad, keyboard or touchscreen input
– 256 KB of nonvolatile memory
– 128 KB of RAM
– 8 KB of nonvolatile writable memory for persistent
data
– Twoway network connection
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 13
14. Java ME MIDP
● Mobile Information Device Profile – Building
Blocks
CLDC 1.1 MIDP 2.0
java.lang javax.microedition.lcdui
+java.lang.ref +javax.microedition.lcdui.game
java.io +javax.microedition.media
java.util +javax.microedition.media.control
javax.microedition.io javax.microedition.midlet
+javax.microedition.pki
javax.microedition.rms
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 14
15. Java ME – Development Process
Java Source
Compile
Java Class Files Application on Device
Preverification Deployment
Preverified Class Files JAR Package
Packaging
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 15
16. Java ME – Development Tools
● Wireless toolkits:
– Sun Wireless Toolkits
– Motorola SDK for J2ME™
– Sony Ericsson J2ME SDK
● Development Environments
– EclipseME
– Netbeans Mobility
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 16
17. Java ME – MIDlet Demo
// Exceptions omitted for clarity
public class TestMIDlet extends MIDlet implements CommandListener {
private Form mMainForm;
public TestMIDlet() {
mMainForm = new Form("TestMIDlet");
mMainForm.append(new StringItem(null, "Hello, MIDP!"));
mMainForm.addCommand(new Command("Exit", Command.EXIT, 0));
mMainForm.setCommandListener(this);
}
protected void destroyApp(boolean arg0) {
}
protected void pauseApp() {
}
protected void startApp() {
Display.getDisplay(this).setCurrent(mMainForm);
}
public void commandAction(Command arg0, Displayable arg1) {
notifyDestroyed();
}
}
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 17
18. Java Micro Edition
● Questions?
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 18
19. Android
● Software platform and
operating system for
mobile devices based
on the Linux
operating system
● Developed by Google
and the Open
Handset Alliance
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 19
20. Android Open Handset Alliance
● Vision: “... accelerate innovation in mobile and
offer consumers a richer, less expensive, and
better mobile experience.”
● Members (more than 30):
– Google, HTC, NTT DoCoMo, China Mobile, T
Mobile, Motorola, Samsung, Intel ...
– Swiss members: Esmertec, Noser
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 20
22. Android Runtime
● Dalvik: It's not a Java virtual machine
● Every Android application runs in its own
process within its own instance of the Dalvik
VM.
javac
Java Source Java Class Files
dx
Dalvik Executable
Files (.dex)
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 22
23. Android – Application Framework
● Views: User Interface
● Content Providers: Access & share data
● Resource Manager: noncode resources
(graphics, external strings ...)
● Notification Manager: custom alerts in status
bar
● Activity Manager: Manages life cycle of
applications
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 23
24. Android – Activity & Intent
● Activity: single, focused thing that the user can
do
● Intent: abstract description of an operation to be
performed
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 24
25. Android – Life cycle Activity
● Activity can be killed!
● We have to store the
state
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 25
26. Android Development
● Software Development Kit:
– Eclipse Plugin
– Command line tools
● Dalvik Debug Monitor Service (ddms)
● Android Debug Bridge (adb)
● Android Asset Packaging Tool (aapt)
● Android Interface Description Language (aidl)
– Emulator
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 26
27. Android Demo
● Demonstration with SDK and emulator
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 27
28. JavaME vs Android – Developer's
Perspective
● Java ME ● Android
+ Security model + Security model
+ Works on many + Optimized for
devices smartphones
On mobile phones: + Seamless integration
Integration into into system
system not seamless API: more complicated
Too many APIs than Java ME
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 28
29. Java ME vs. Android General
● Java ME ● Android
+ Lots of devices + Opensource
already available + Defines unique
Fully controlled by Sun software stack for
(Licensing!) mobile devices
Formal specification No devices available
process (slow) No standards are used
(e.g. VM, IDL ...)
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 29
30. Conclusions
● Rapid growth in the mobile market expected
● Wireless devices getting more powerful
– More features
– Better connectivity
● Both technologies could play a big role in the
future
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 30
31. Discussion
● Questions?
May 13th, 2008 Seminar on Small and Mobile Devices
Dejan Juric (djuric@student.ethz.ch) 31