Android

From otaking wiki

Revision as of 23:41, 20 June 2009; view current revision
←Older revision | Newer revision→

Android is a software platform for mobile phones being developed by Google and the Open Handset Alliance.

Applications are written in Java, but compiled to another form of bytecode (optimized for memory efficiency), running in the Dalvik virtual machine. The GUI portions of the runtime happily have nothing in common with Swing or Java ME.

It's gonna be awesome. Its degree of awesomeness remains to be determined.

Contents

Links

The platform

  • Linux kernel
  • All applications are run as separate users.
  • Applications are written i Java and run in the Dalvik VM.
  • Applications are very modular.
    • Every screen is an Activity.
    • Move between screens by sending an Intent to the system.
    • The system displays an Activity which fulfills the contract for the Intent.
  • No Java ME support, but there is a third-party solution.
  • Plays Ogg Vorbis!

Dalvik

  • Dalvik executable files (DEX files) can be mmap:ed and used directly, unlike JAR files.
  • Slightly more compact (uncompressed) than compressed JAR files.
  • No JIT or AOT compilation, but they are investigating JIT for a future release.

Devices

Performance

A fairly thorough article at Ars Technica very diplomatically states that "some preliminary experiments by various developers indicate that Dalvik isn't necessarily faster than other comparable technologies" and that "there are still unanswered questions about the performance advantages of Dalvik's design".

The simple benchmark in the article gives the following results on various phones, showing that the iPhone is 100 times as fast as the HTC Dream and a humble K800 is 4 times as fast.

Phone Result
HTC Dream 922 ms
iPhone 9.5 ms
Sony Ericsson K800 250 ms

Another benchmark, comparing Android against Java ME on various other phones, gives similar results. Even the low-end Z530 is significantly faster than the Dream.

Phone Result
Nokia 6680 1016 ms
HTC Dream 4900 ms
Sony Ericsson K800 1600 ms
Sony Ericsson Z530 3160 ms
Sony Ericsson Xperia X1 710 ms

The performance advantage of the Java ME phones comes from JIT on the high-end phones (6680 and Xperia) and from ARM's Jazelle technology – which allows the processor to directly execute Java bytecode – on the others. Android engineers have said that JIT may be worth looking at in the future but is currently not on the road map.