Please enable / Bitte aktiviere JavaScript!
Veuillez activer / Por favor activa el Javascript![ ? ]
Programming for Android in C/C++? - Q&A

Programming for Android in C/C++?

0 like 0 dislike
Good afternoon. Interested in this topic. Before that programmed exclusively for Windows in C/C++ + DirectX to develop simple 3D games. The development experience is, Mat. part of it too. But I would like to find something new, for example, in Android development. Android itself is close to me, for the device under that OS, but didn't write anything underneath like. Java alien to me, do not digest it (cavity, do not just throw tomatoes). So, the main question that is interesting to me: is it possible to write for Android without having to code Java (the Android NDK)? If Yes, what advise literature (English / Russian)? And what do I get from the exclusive use of C/C++, in addition to the complexities of implementation? For me it is important, in General, are the speed of application and minimizing the use of system resources.

Plan to develop applications with more functionality computing: scientific applications, sophisticated 3D games with great number of mathematical and physical calculations.
asked by | 13 views

5 Answers

0 like 0 dislike
Without resorting to Java code will not work. The Android NDK to write in C++ only parts of the application such as libraries. It is right on the main page it says: The Android NDK is a toolset that lets you implement parts of your app using native-code languages such as C and C++. For certain types of apps, this can help you reuse code libraries written in those languages.
answered by
0 like 0 dislike
The Android NDK is very poorly documented. It is necessary to take into account that different processor (armeabi armeabi-v7a x86) and there are small differences (small information here). It is also necessary to consider that normal writing and compiling the NDK better on Linux. It is also worth to note that NDK wealth of functionality also varies from version to version, so it depends on the specific device(manufacturers like to get into the core and standard libraries and reinterpret them). Without JAV's does not work, at least it will be. The GUI also still sad, we need a java or NativeActivity which again pipe using JNI.
In General, the literature on NDK too little, a lot of surprises, without java code, the maximum you can do something console that it's kind of convenient.
Glanced now seems to have appeared with the native UI framework for the NDK, for example
answered by
0 like 0 dislike
Now going to sleep quotes from the Internet ))

From the usual mobile applications, software, hi-tech industrial equipment – Qt is the basis of millions of devices and programs used around the world.

C++ retains a high level of compatibility across platforms and devices.
You can migrate existing C++ libraries for Android and Windows...

C++Builder is an award winning set of tools for rapid application development in C++ for native development for Windows, Mac and mobile devices, with expanded support for cloud and IoT.

... well, etc...
answered by
0 like 0 dislike
Inclined to believe that a programmer who can't stand one or another programming language - not yet a programmer. Language is a tool. In General, applications for NDK can be done, see storno NativeActivity - get entry point, and then do what you want in C/C++. But I wouldn't hammer nails with a microscope. If you develop in pure C/C++ for Android - you have to make the whole YUI which is already in the standard SDK, with his own hands... Maybe you can do better, but there will always be the question who needed it?
answered by
0 like 0 dislike
If you take a good cross-platform framework to write in Java won't have to.
For example, complete with SDL there is a template project for Android NDK with a ready wrapper in Java that performs some initialization and invokes the native main().
Connecting any other libraries require dancing with a tambourine, but in the end the code with desktop platforms works almost without changes. Even OpenGL ES from native code works.

what advise literature

The manual to the selected framework and Google should suffice.

what do I get from the exclusive use of C/C++

The boost in performance, but it's obvious.
The size of the binaries more: Code and the native library is compiled separately under different architectures (in my case it was 4) and collected in one app.
answered by
Welcome to Bug-code Q&A, where you can ask questions and receive answers from other members of the community.

24.8k questions

46.2k answers


13.5k users

24,788 questions
46,220 answers
13,471 users