Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Android 2
« Previous
Next »
Is it possible to write Android code using c/c++?
Options
- yes
- no
CORRECT ANSWER : yes
Discussion Board
Yes
The Native Development Kit (NDK) is a set of tools that allows you to use C and C++ code with Android, and provides platform libraries.
Sapna Ambadkar 03-16-2017 02:41 AM
Android
You can program in C/C++ using the Android NDK. You'll have to wrap your c++ codebase in a static library and load that through a Java wrapper & JNI.
The standard NDK does not support RTTI and a lot of the functionality of standard c++ is also not available such as std::string, etc. To solve this you can recompile the NDK. Dmitry Moskalchuk supplies a modified version of the NDK that supports this at http://www.crystax.net/android/ndk-r3.php. This modified version works on all Android phones that run on an ARM processor.
Depending on the kind of application you should decide to use Java or C/C++. I'd use C/C++ for anything that requires above average computational power and games -- Java for the rest.
Just pick one language and write the majority of your application in that language; JNI calls can decrease your performance by a lot. Java isn't that hard though -- if you know how to program in C/C++. The advantage of Java is that the application can run on any device running Android, where as NDK applications depend on the architecture it was compiled for.
@Amarbir Singh
Amar 06-12-2015 06:18 AM
How to write android prog. with c/c++
how to write android using c/c++ is it phonegap ????
i want to know.
Chirag 06-8-2015 09:12 AM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
PHP (39)
DHTML (10)
CSS (21)
MySQL (20)
VLSI (9)
XML (28)
UML (11)
HTML (19)
Fedora (61)
HTML5 (60)
Android (100)
Advertisement
▲