java - How does this Android newbie use the Android NDK and C++ code in an Android app? -


i java web developer; i, essentially, write jsp applications. comfortable environment linux, ok on windows. know little android app development, , know nothing c++.

i have been tasked writing android app. android app, itself, isn't daunting, here gets complicated. company has couple of pre-existing widgets written in c++ want me include android app. stand-alone windows applications, have source code.

what need know is, can use android ndk utilize c++ code in android app? can use pre-existing c++ code in android app , call functions classes in java? can compile whole kit , caboodle single android app functionalities of original code, , pre-existing widgets?

like said, know nothing c++, have no idea started. have done reading on android ndk, since have no c++ experience, , very little android experience ( tutorials on http://developer.google.com/ ), don't know files should import project.

thanks

you have not mentioned framework c++ code uses, important. in general case, may bare win32 api qt.

android ndk gives pure c++ (in fact, stripped-down, without e.g. std::string) without ui libraries/frameworks available on windows. if c code complex without accessing ui, meaningful port it; if controls ui, imho useless. you cannot port mvc controllers between frameworks, have rewrite everything.

there qt port android, not think suitable (you did not mention qt first of all). qt large , complex, , learn @ once.

there xamarin/mono android, c# far have heard.

you have find out if framework used in project has been ported android. if yes, might use port, if no, have rewrite ui.

even if framework has been ported, there possibility spend less time re-creating ui scratch , using c++ stuff reference model trying learn , configure 3rd-party stuff. (this depends on amount of code.) ui anyway not suitable phones.

you not have use windows android development, works under linux. (and linux more friendly, linux guy: under linux can grep logcat output, linux terminal more user-friendly windows command line box (can resized mouse , font size changes keyboard shortcut), , .sh better .bat).


Comments