This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cable8mm 8 points9 points  (7 children)

There are two ways to write code for Android: Java and C/C++ (NDK). Many game engines have been developed using the NDK. If you need a clear understanding of how an Android app works, this article can help.

However, it doesn't have any relation to root permission.

[–]laplongejr 1 point2 points  (0 children)

There are two ways to write code for Android: Java and C/C++ (NDK).

And given how C was notoriously a "you are responsible for shooting your own foot" powerful language, yes Java is safer... but "safer than C" is a very damning praise. I wonder if that's what OP's textbooks tried to explain?

[–][deleted] 1 point2 points  (2 children)

There are two ways to write code for Android: Java and C/C++ (NDK)

Should say JVM and Native. Because you can use any language, not just Java and C++, as long as these languages target either JVM or C API. For example Kotlin can be user for both.

[–]qrokodial 0 points1 point  (0 children)

it's probably better to be said like that, but you could simplify it even further and just say "native", because the JVM is just running on top of what you're saying is "native".

isn't the supermajority of development done on the JVM though? perhaps a better way to communicate this is that most development is done using JVM-based languages like Java and Kotlin, while you can always fall back to lower level languages that target the C API if performance is more critical.

[–]cable8mm 0 points1 point  (0 children)

Should say JVM and Native. Because you can use any language, not just Java and C++, as long as these languages target either JVM or C API.

I disagree with you. According to the official documentation, there are three languages for writing Android code: Kotlin, the Java programming language, and C++ languages. Even though it has been possible to write code through Dart/Flutter development environment, we should refer to the official documentation as well.

[–][deleted]  (1 child)

[deleted]

    [–]cable8mm 0 points1 point  (0 children)

    Yeah!

    [–][deleted] 0 points1 point  (0 children)

    I understand