views:

574

answers:

2

Hello! This is my first S/O question, please be gentle!

I'd like to know more about porting C applications to native ARM for use on Android devices.

I can make simple programs using the prebuild toolchain which comes with the source, but how can I use this toolchain with applications which are more than one file and require configure and make?

Thanks so much! Rich

+1  A: 

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

Basically, you create a shared library like you normally do, wrap it with JNI and call it with native methods from Java.

Reflog
+1  A: 

At Google I/O they talked about introducing an "NDK" -- native development kit -- that should simplify the process of creating applications that use native (C) code.

It's worth noting a couple of things before you go too far down this route:

  1. The NDK will provide limited functionality. It will be primarily intended to offer a way to run extremely time-sensitive code natively, but won't have access to the full system, nor will it provide an alternative application development model (you'll still need to write most of your app for Dalvik).
  2. You can write native apps without the NDK, but you won't be able to distribute them to end-users using the conventional APK application package supported by the app store. It's really only a viable option if your app is being distributed as part of the carrier / OEM build - and even then isn't recommended.
Reto Meier
the android market.. not the "app store"! :P
jeshan