July 3rd, 2009
Android set to launch in Japan, 1.5 deployment "nearly complete"
The first Android-powered phone will launch in Japan on July 10th. New Japanese customers will have immediate access to free applications in the Android Market, with paid apps following sometime later. That’s according to a notice sent from Google’s Eric Chu to Android app developers late Wednesday. Bulgaria and Romania are on the target list after Japan, first with phones and free apps and then with paid apps.
In other news, Google says that the over the air roll-out of Android 1.5 (Cupcake) is “nearly complete”. And of course, all new phones come with 1.5 already installed. That means that Android developers can take advantage of 1.5 features such as Home screen app widgets without worrying about trying to support older versions.
(And in other, other news, I just put the finishing touches on an update of Hello, Android that features a new appendix on how to write app widgets in Cupcake. The update will be free to all owners of the PDF, mobi, or epub versions, and cheap for owners of the dead tree version.)
[ Follow me on Twitter at: @eburnette ]
Continue reading: Full text of the notice from Eric Chu >
June 25th, 2009
Program for Android in C/C++ with the Native Development Kit (if you dare)
Not a big fan of Java? Well, get over it, because that’s the primary and recommended way to write applications for Android devices. It’s portable and… what’s that? Android’s Dalvik Java VM not fast enough for you? Granted, it’s an interpreted engine and as of version 1.5 there’s no Just-In-Time compiler. But Dan promises… oh, can’t wait for the JIT to come out? Ok, ok, we’ll let you program in C if you’re really sure.
Introducing the Android Native Development Kit (NDK). With it, you can implement *parts* of your application using native-code languages such as C and C++. You’re familiar with the Java Native Interface (JNI), right? JNI lets you load a shared library and call C code from within Java. The NDK lets you compile and build those libraries for the ARM CPU chip used in all *current* Android devices.
The NDK provides:
- A set of tools and build files used to generate native code libraries from C and C++ sources
- A way to embed the corresponding native libraries into application packages files (.apks) that can be deployed on Android devices
- A set of native system headers and libraries that will be supported in all future releases of the Android platform, starting from Android 1.5
- Documentation, samples, and tutorials
Users downloading your program from the Market will not be able to tell whether or not you used native code. In fact, some apps already on the Market use it. However, native code is not for everyone. Google engineer David Turner writes:
Keep in mind that using the NDK will not be relevant for all Android applications. As a developer, you will need to balance its benefits against its drawbacks, which are numerous! Your application will be more complicated, have reduced compatibility, have no access to framework APIs, and be harder to debug. That said, some applications that have self-contained, CPU-intensive operations that don’t allocate much memory may still benefit from increased performance and the ability to reuse existing code. Some examples are signal processing, intensive physics simulations, and some kinds of data processing.
You have been warned. Stay away from the NDK unless you really need it. Try optimizing your Java code first. Try profiling. Acupuncture, cold compresses, anything but… what did you say? “Shut the…,” hey, there’s no need to be rude. Have at it.
June 24th, 2009
Eclipse Galileo release train now arriving at gate 3.5
Besides death and taxes, there is one other certainty in the life of a software developer: slipping schedules. Every year, though, Eclipse continues to defy that expectation by releasing a major new version in late June. Today, the Eclipse Galileo release train arrived exactly on time, for the 6th year in a row.

Galileo is a synchronized release of 33 separate projects all under the umbrella of the Eclipse Foundation. Over 380 committers from 44 different organizations participated to make this release possible.
Many of the projects in Galileo are tools for developers, for example the Java Development Toolkit, C Development Toolkit, Memory Analyzer, Web Tools, Subversion, and of course the Eclipse Platform (version 3.5). Others are more oriented towards end users such as the Business and Reporting Tools.
For 2009, a new category of projects has coalesced under the name “Eclipse Runtime Technology”. This includes Equinox (Eclipse’s implementation of the OSGi standard), the Eclipse Communication Framework, Rich Ajax Platform, Riena (modular business application platform), Swordfish (SOA framework), and EclipseLink (persistence services).
Another major focus of the 2009 release is modeling tools. New innovations in Galileo include Xtext (for creation of domain specific languages) and Connected Data Objects (distributed shared models with transactions).
“The release train continues to be a great achievement of the Eclipse community,” explained Mike Milinkovich, Executive Director of the Eclipse Foundation. “Galileo demonstrates that large distributed software development can be done on a predictable schedule. This predictability makes it possible for our user and adopter community to quickly adopt new releases from Eclipse.”
Eclipse Galileo with Eclipse Platform 3.5 is available immediately from the eclipse.org download site. This year, downloads should fly thanks to a partnership with Amazon Web Services. Package sizes range from 79MB to 367MB depending on what components you need.
Related articles:
June 16th, 2009
Mobile megahertz madness heats up
The competition is heating up in the market for smartphones and other mobile devices. Literally. As competitors try to leap-frog each other in performance we’re seeing a repeat of the desktop computer’s Megahertz arms race, only this time the palm of your hand. You might want to put on some oven mitts.
The story so far:
- January 2007: Apple introduced the iPhone and iPhone touch, running a Samsung ARM11 processor at 412MHz.
- September 2008: Apple bumped the speed of the iPod Touch to 532MHz.
- September 2008: T-Mobile announced the G1 (also known as the HTC Dream), running an Qualcomm ARM11 processor at 528 MHz. The HTC Magic uses the same processor.
- January 2009: Palm announced the Pre, which features a TI ARM Cortex A8 processor at 600MHz.
- June 2009: Apple struck back with the iPhone 3G S, running a Samsung ARM Cortex A8 processor at 600MHz.
- June 2009: Samsung announced the Jet, which it claims is the “fastest full touch handset on the market today”. It is clocked at 800MHz, and is probably based on the Samsung ARM Cortex A8.
Continue reading: Megahertz madness >
June 15th, 2009
Firefox 3.0.11 fixes 67 bugs including bookmark corruption
The latest update to Firefox addresses 67 bugs and enhancements, according to Mozilla. 23 bugs were marked as “critical” or higher. (Coincidentally this was the same number addressed by the 3.0.9 update in April.)
Nine potential security vulnerabilities were patched including 1 marked as “high” and 4 “critical”:
- MFSA 2009-32 JavaScript chrome privilege escalation (critical)
- MFSA 2009-31 XUL scripts bypass content-policy checks
- MFSA 2009-30 Incorrect principal set for file: resources loaded via location bar
- MFSA 2009-29 Arbitrary code execution using event listeners attached to an element whose owner document is null (critical)
- MFSA 2009-28 Race condition while accessing the private data of a NPObject JS wrapper class object (critical)
- MFSA 2009-27 SSL tampering via non-200 responses to proxy CONNECT requests (high)
- MFSA 2009-26 Arbitrary domain cookie access by local file: resources
- MFSA 2009-25 URL spoofing with invalid unicode characters
- MFSA 2009-24 Crashes with evidence of memory corruption (rv:1.9.0.11) (critical)
The new release addresses a problem that apparently affected a lot of people (bug 464486). If Firefox crashed or your machine died at just the right time, your bookmarks and history database could have been lost or corrupted. The earliest report I could find of the problem was on September 7th, 2008.
In the end, a 2 line fix to turn on full synchronous operation of the SQLite database used to store bookmarks was all that was needed. Although the fix was known in January, it wasn’t backported to Firefox 3.0 until recently because of concerns about how it might affect performance, especially on Linux. Further study showed, however, that performance was only slightly degraded on newer versions of Linux, and data integrity was deemed to be more important.
June 8th, 2009
Apple introduces the iPhone 3GS, drops price on 3G to $99
At today’s World Wide Developer’s Conference keynote, Apple announce a new, faster version of the iPhone: the iPhone 3GS. The S stands for Speed.
The new device is 2.1x faster to launch Messages, 2.9x faster to launch a big web page. It includes OpenGL|ES 2.0, and has 7.2MBps HSDPA built-in.
Besides the faster processor, the big draw for the 3GS is its new 3.0 megapixel camera. It features:
- Tap-to-focus - tap an item in the photo to focus on it. Resets the light balance too.
- Improved low-light sensitivity.
- Automatic macro photographs (10cm).
- Video capture, 30fps VGA.
- Videos show up in photo library. You can trim them, share via emal, MMS, YouTube, MobileMe.
The new 3GS also features voice control. You hold down the home button for a few seconds in any application. Commands that you can say start floating around on the screen. Say one of them and it happens. Examples: “Dial scott forestall”, “play the killers”, “play more songs like this”, “what’s playing now”.
Other features:
- Built-in digital compass.
- New accessibility settings.
- Nike+ support.
- Hardware data encryption.
- Improved battery life. 9 hours on WiFi, 10 hours watching video, 30 hours audio, 12 hours 2G talk, 5 hours 3G talk.
- Greener materials, packaging.
Price and availability:
The iPhone 3GS will be available in 7 countries on June 19th for $199 (16GB) and $299 (32GB). Both come in black and white. The old 3G will continue to be available, but at a lower price-point: $99. All prices are for AT&T new and qualifying customers and may vary on other carriers.
June 8th, 2009
WWDC 2009 live
It’s that time again: the annual Apple World Wide Developer’s Conference and its highly anticipated keynote address. Phil Schiller ran the show this year, and while he’s no Steve Jobs most observers agree that he did a pretty good job. Highlights include a revamping of the MacBook Pro line, the introduction this fall of Snow Leopard, and the announcement of a new, faster iPhone called the iPhone 3GS.
[Now that the keynote is over I've rearranged my updates in chronological order. Enjoy! -Ed]
9:21am: Welcome to live coverage of the 2009 Apple World Wide Developer’s Conference (WWDC). I will be your host this morning.
9:25am: WWDC 2009 is being held in Moscone West, the same location as the Google I/O conference.
9:30am: WWDC, of course, is a bit more closely watched.
9:33am: Judging by the posters it looks like the Mac will get some love this time around, in the form of Snow Leopard, 64-bit support, Grand Central, and OpenCL.
9:50am: Ever notice that WiFi becomes useless in a crowded room?
9:57am: Gizmodo live site bites the dust - Ars and Engadget still up.
10:00am: It’s showtime!
Continue reading: Phil Schiller takes the stage >
May 29th, 2009
Google Wave: Catching the Big One
Google unveiled a new online communications tool Thursday at its annual Google I/O Developer’s Conference. Called “Google Wave“, the new system sets its sights pretty high: replacing email, instant messaging, wikis, blogs, and static documents. If anybody can do it, it just might be Lars Rasmussen, creator of the wildly popular Google Maps application.
“We tried to imagine what email might look like if it were invented today,” said Lars during a keynote address to a packed house of developers. And what an imagination it is. After a masterful series of demonstrations, Lars and his team received a standing ovation that even Steve Jobs would be envious of.
Observing this from the front row I could tell he was moved and energized by the reaction. Heck, *I* was moved and energized by it, as you could probably tell if you followed my twitter feed.
So what is Google Wave?
Read the rest of this entry »
May 27th, 2009
Google I/O: Mastering the Android Media Framework
This afternoon at Google I/O 2009 Dave Sparks gave the most technical presentation of the conference so far when he delved into the details of the Android Media Framework. Here are my notes from the talk.
Design Goals of the Media Framework include:
- Simplify application development
- Share resources in multi-tasked environment
- Provide a strong security model
- Leave room for future growth
The typical stack for a media function call is pretty complex:
DVM proxy > JNI > Native proxy (C++) > Binder Proxy > Binder Native > Native Implementation
Thankfully you don’t need to make many calls to the framework. Using a native proxy will allow developers to call media from native games in the future.
May 27th, 2009
Google I/O: Coding for better battery life
Jeff Sharkey, recently hired by Google, presented an interesting session this afternoon called “Coding for Life - Battery Life, That Is”. In it, he offered several practical tips for Android developers to prolong the life of their users’ batteries.
All apps need to work together to be good citizens and conserve the limited battery power available on today’s mobile devices, according to Jeff. Here are some typical battery capacities:
- HTC Dream: 1150mAh
- HTC Magic 1350mAh
- Samsung i7500: 1500mAh
- compare to Asus EEE PC: 5800mAh
Most users report under a day’s worth of battery life on the HTC Dream (T-Mobile G1), so where does all the power go?
Waking up in the background when the phone would otherwise be sleeping costs a lot. For example, if an app wakes up every 10 minutes to update, and takes about 8 seconds to update, that’s 350mA. Cost during a given hour: 5mAh resting, plus 6 updates an hour is another 4.6mAh updating. So basically that app cut your battery life in half. On top of that, just one app waking up can trigger a cascade of other apps that try to pile on and do their updates as well.
Bulk data transfer costs a lot. For example a 6MB song costs up to 45mAh on EDGE because it takes 9.1 minutes * 300mA. Moving between cells/networks is another cost because of radio ramp up and BroadcastIntents. Parsing textual data, and doing regex without JIT also contribute.
So what can developers do to improve the situation?
The first way is to be smarter about networking. Check network connection, wait for 3G or WiFi. Check connectivity.getBackgroundDataSetting() (new in Cupcake). Use an efficient data format and parser (XML > JSON > Protobuf; tree parser > steam parser). And use GZip for text data whenever possible. Android GZip libs use native code.
The next way is to look at foreground apps. Wakelocks are costly if forgotten. Pick the lowest level possible, and use specific timeouts to work around unforseen bugs. Use android:keepScreenOn to ensure correctness. Recycle Java objects, especially complex objects. - Use coarse network location - it’s much cheaper. Avoid floating point math, and use a slower accelerometer rate.
Next, consider your background applications. Services should be short-lived; these are not daemons. Each process costs 2MB and risks being killed/restarted as foreground apps need memory. Otherwise keep memory usage low so you’re not the first target. Trigger wake-up through AlarmManager or with <receiver> manifest elements, and call stopSelf() when finished.
Android 1.5 (Cupcake) introduced inexact repeating alarms (the setInexactRepeating() method) which lets the system batch up your update with others to minimize the number of wakeups the system has to do in a given time period.
in the Q&A session, Jeff shared some other insights. One that stuck out for me was that changing the screen brightness didn’t affect battery life all that much. At the lowest brightness, the LCD backlight drew about 70mA, but it only drew about 110mA at its highest brightness. With factory defaults it takes about 90mA.
Ed Burnette is a professional developer and author of several articles and books about computing including Hello, Android: Introducing Google's Mobile Development Platform. For disclosure of Ed's industry affiliations, click here or to view his full profile click here.
Subscribe to Dev Connection via Email alerts or RSS.
SponsoredWhite Papers, Webcasts, and Downloads
- Why Isn't Server Virtualization Saving Us More? A Few Small Changes May Dramatically Increase Your Efficiency VMware Ever wonder why your company isn't saving more from its server virtualization? Making a few small changes could dramatically increase your efficiency. Download Now
- The Impact of Virtualization Software on Operating Environments VMware Today's use of virtualization technology allows IT professionals to ... Download Now
- VMware Infrastructure: A Guide to Bottom-Line Benefits VMware Frustrated by the high cost of maintaining or building ever-larger data centers? Get the facts you need to formulate your Virtualization Action Plan. Download Now
Recent Entries
- Android set to launch in Japan, 1.5 deployment “nearly complete”
- Program for Android in C/C++ with the Native Development Kit (if you dare)
- Eclipse Galileo release train now arriving at gate 3.5
- Mobile megahertz madness heats up
- Firefox 3.0.11 fixes 67 bugs including bookmark corruption
Blogs From Our Sponsors
Most Popular Posts
- Program for Android in C/C++ with the Native Development Kit (if you dare)
- Eclipse Galileo release train now arriving at gate 3.5
- Mobile megahertz madness heats up
- Apple introduces the iPhone 3GS, drops price on 3G to $99
- Firefox 3.0.11 fixes 67 bugs including bookmark corruption
- WWDC 2009 live
Top Rated
- Apple introduces the iPhone 3GS, drops price on 3G to $99+14 votes
- WWDC 2009 live+8 votes
- Firefox 3.0.11 fixes 67 bugs including bookmark corruption+7 votes
- Program for Android in C/C++ with the Native Development Kit (if you dare)+7 votes
- Mobile megahertz madness heats up+4 votes
- Eclipse Galileo release train now arriving at gate 3.5+4 votes
- How to pick an open source license (part 2)+1 vote
Archives
Favorite Links
ZDNet Blogs
- All About Microsoft
- The Apple Core
- Between the Lines
- BriefingsDirect
- Collaboration 2.0
- Community, Incorporated
- CRM 2.0: The Conversation
- Dev Connection
- Digital Cameras & Camcorders
- Ed Bott's Microsoft Report
- Emerging Tech
- Enterprise Web 2.0
- Forrester Research
- Googling Google
- GreenTech Pastures
- Hardware 2.0
- Home Theater
- iGeneration
- Irregular Enterprise
- IT Facts
- IT Project Failures
- Laptops & Desktops
- Lawgarithms
- Linux and Open Source
- Managing L'unix
- The Mobile Gadgeteer
- On Sustainability
- Rational Rants
- The Semantic Web
- Service Oriented
- Smartphones and Cell Phones
- Social Business
- Software & Services Safari
- Software as Services
- SOHO Networking
- Storage Bits
- Team Think
- Tech Broiler
- Technology and the Global Supply Chain
- Tom Foremski: IMHO
- The ToyBox
- Virtually Speaking
- The Web Life
- ZDNet Education
- ZDNet Government
- ZDNet Healthcare
- Zero Day
White Papers, Webcasts, and Downloads
- Building the Virtualized Enterprise with VMware Iinfrastructure VMware VMware virtualization software has been adopted by over 120,000 enterprise ... Download Now
- Advanced Java Memory Analysis with JProbe Quest Software Memory issues in Java applications can cripple performance and cost your ... Download Now
- Why Isn't Server Virtualization Saving Us More? A Few Small Changes May Dramatically Increase Your Efficiency VMware Ever wonder why your company isn't saving more from its server virtualization? Making a few small changes could dramatically increase your efficiency. Download Now





