The Register® — Biting the hand that feeds IT

Feeds

Google Android code goes native

Dalvik VM hugs C, C++

Regcast training : Hyper-V 3.0, VM high availability and disaster recovery

Android developers can now slip native code into apps written for Android-based devices using Google's new native development kit (NDK).

The Android 1.5 NDK, which was announced Thursday on the Android developers blog, doesn't actually allow developers to run completely native code on devices. Instead, it supports adding native code into apps written to run in Dalvik virtual machine (DVM) instances.

Specifically, the NDK lets 'droid devs execute parts of DVM-bound apps using native-code languages such as C and C++.

But there are drawbacks to this method - so much so that the announcement warns developers that the NDK isn't for everybody. "As a developer," the announcement reads, "you will need to balance its benefits against its drawbacks, which are numerous!"

The announcement also details some of the pros and cons - actually, in their ordering, the cons and pros - of using the NDK:

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.

The addition of the Android 1.5 NDK to the 'droider's arsenal indicates that the Android team is working to attract more developers to the platform - particularly Symbian developers, we would imagine, or possibly iPhone devs who have seen their hard work disappear into the horde of 50,000 apps now clogging the iTunes App Store.

If you're a developer with cojones of sufficient weight to wrestle with the obstacles outlined above, the Android team has set up a forum where you can swap notes with other native-code 'droiders. ®

Agentless Backup is Not a Myth

Latest Comments

Does anyone else feel uncomfortable about Android?

Android looks more and more like lock in to me. I feel the Linux world is not going to benefit much from Android, and Android is only going to benefit a little from Linux.

The best I can see coming out of it is that Dalvik turns out to be a better ./Net/Mono without the MS dangers. Which could only be a good thing, finally taking the Java dream of write once run anyway main stream. Being able to replace bottle neck VM code with native code can only be a good thing, it just needs to be able to be compiled on other platform as easily as possible.

Moblin looks more to my taste, full little Linux (including a X server), so can run anything I want, providing it compiles for ARM. If Dalvik is truly open, it could also run on Moblin.

0
0

Where's the news

Java - Has had the ability to interface with native libraries for a long long time.

ARM - Some ARM chips can actually execute Java bytecodes..

Big whoop.

0
0
Anonymous Coward

But I thought Dalvik was native

I'm sure I heard a nice man from Google call Dalvik "Native java", I missed what he said next because I was trying to get my head around that contradiction in terms.

0
0

More from The Register

Bjarne Again: Hallelujah for C++
Plus: Now officially OK to admit you never used STL algorithms
Interwebs taunt Sir Jony over Apple eye candy makeover
Hey Ive, Ive... add more unicorns, willya?
SCO vs. IBM battle resumes over ownership of Unix
Zombie lawsuit back and wants to suck the brains out of Linux
Red Hat to ditch MySQL for MariaDB in RHEL 7
So long, Oracle! Don't let the door hit you on the way out
Shy? Socially inadequate? Fiddling with your phone could help
App 'tells the brutal truth' about social inadequates' chatup lines
Java EE 7 melds HTML5 with enterprise apps
New release arrives with GlassFish, NetBeans support
 breaking news
'Office Facebook' firm Tibbr wants you to PAY for mobe-meetings app
Great idea. Punters won't cough for it though
 breaking news
The only Waze is Google: Ad giant tipped to gobble map app 'for $1.3bn'
Pac-Man-satnav-ish upstart in bidding war with Apple, Facebook
 breaking news
PM Cameron calls for modern, programmable computers! (We think)
IT education musings to G8 chiefs to mystify IT industry
Apple at WWDC: Sleek new iOS, death of the big cats, pint-sized Mac Pro
CEO Cook: 'The biggest change to iOS since the introduction of the iPhone'