• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps C to Android

docg

Lurker
I have some very simple Dos-based programs, written in plain vanilla C, that do little more than paint some lines on the screen and cycle colors. (I'm being modest -- actually the results are quite fascinating, imo.)

Is there some relatively simple straightforward way to port these programs to Android, and if so, what development tools would I need? Thanks.
 
Unfortunately there isn't an easy way that I'm aware of to convert C to Java. Java is an object oriented language which requires a different way of thinking/coding than structured C. Add to that Android which adds a lot of XML (among other things) to the mix and you have a tough conversion.

I'd suggest downloading the Java SDK, the Android SDK along with Eclipse and start digging around the web or Amazon for good books or tutorials.

I'm a C++ programmer by trade and am currently taking an Android App development course, so I'm still coming up to speed. It's not easy but with good instruction, you should eventually be able to reuse your painting algorithms in an app of your creation.

Good luck!
 
Thanks Rich. I read somewhere, though, that Android applications could in fact be written in C/C++ as well as Java. Is that an urban myth or is there something to it? Have you ever looked into that possibility?
 
In the course I'm taking they said it was possible to use C/C++ but never went into details. The problem there may be the lack of tools and support to do so. The integrated Eclipse/Java/Android SDK is pretty well supported. I spend considerable time on Google to get past problems so I see a lot of knowledge out there.

Like I said before, I'm really just starting down the app creation path. Maybe someone more knowledgeable can chime in and at least get you in the right direction.
 
There is the Android NDK that allows you to write routines in C and execute them from Java via JNI. My game engine, for example, is written almost entirely in C++. I use JNI hooks from java to start the event loop, handle input, etc...
 
Back
Top Bottom