views:

3425

answers:

7

Hi,

Does anybody know the answer to the following questions?

  1. Is it possible for device manufactures can develop native C++ applications on an Android platform?

  2. How can I develop my own native C++ application / library that has an upper layer Java front-end / API on an Android platform?

Thanks, Munish

+3  A: 

It is possible, but it's not supported. Native code requirements may vary significantly from one Android system to the next; unless you are working on very low-level infrastructure, it is best to go the Java-source-to-Dalvik-VM route for portability. And of course, you'll likely be tied to the very phone you wrote your native code for, though if you integrate it into Android it may be accepted and maintained for all platforms the system intends to support.

Michael Trausch
A: 

If you are a device manufacturer, of course. You can essentially do whatever you want.

miracle2k
A: 

Well Android tend to have a normal Linux in the bottom, so writing Linux apps should be possible if you only can get the code in there... (but often you can't, since the phone is locked at that level)

So the answer would be:

  1. Yes, but it depends
  2. Yes, but it depends
Johan
A: 

This article explains it quite well: http://davanum.wordpress.com/2007/12/09/android-invoke-jni-based-methods-bridging-cc-and-java/

Reflog
A: 

Google has released a Native Development Kit (NDK) (according to http://www.youtube.com/watch?v=Z5whfaLH1-E at 00:07:30).

Hopefully the information will be updated on the google groups page (http://groups.google.com/group/android-ndk), as it says it hasn't been released yet.

I'm not sure where to get a simple download for it, but I've heard that you can get a copy of the NDK from Google's Git repository under the donut branch.

Marc
+5  A: 

Official announcement and download links:

Introducing Android 1.5 NDK, Release 1
Posted by David Turner on 25 June 2009 at 10:30 AM

Many of you have been asking for the ability to call into native code from your Android applications. I'm glad to announce that developers can now download the Android Native Development Kit from the Android developer site.

http://android-developers.blogspot.com/2009/06/introducing-android-15-ndk-release-1.html

crashmstr
A: 

this blog entry explains how to do native programming on android: http://rxwen.blogspot.com/2009/11/native-programming-on-android.html hope it helps.

Raymond