What is NDK ? why we use it ? - XDA-developer encyclopedia

Welcome
I want to explain here shortly what is NDK ?
NDK stands for Native Development Kit. It is a good tool which enables you to use native languages like c/c++ in your apps besides android development code in java.
You may ask why i should this tool and write code in hard languages like c++ ?
Well, actually c++ is more complex than android code with java but it is very helpful in some apps like games
Especially, if you are ios and android developer and want to make a game, you will develope it for android by java then you will develope it by xcode and objective c for ios.
But if you made it by c++ using NDK, you will almostly use the same code in ios version and maybe make a little tweaks, so you will save a lot of time :good:
So it is very useful and time saver for apps will be made for ios and android platforms.
For more information about that, check android website by google for NDK and many other resources
Thanks for reading

........ and to think I thought NDK was the spark plugs you add to the development kit...... to give your work some Zing !

Related

Which language to take?

hi!
next time i wanna try developing diamond apps on my own.
a few years ago, i developed software for pocket pcs using eVC++ 3.0. so you can see i'm used to programming and c++. i also wrote some java-stuff for symbian mobiles, means i do know java too.
in this forum, i saw quite a lot of code-snippets using c#. it looks similar to java and c++, from what i can tell by now. i'm very curious about learning that language in order to write my own diamond applications. so here are my question to the developers:
- are there any limitations to c#? on a pocketpc, you could nearly do everything with c++ and the win api. but java was very limited.
- can i use native api functions?
- which language is the most used one, when it comes to winmobile developing?
- c# is microsoft, right? does it make sense, to learn "a ms specific" language, instead of reactivating and strengthening knowledge in c++ and/or java?
thanks a lot for your advice!
yours, hebbe
I don't know so much about developing....... but some friends of mine develop app for WM and use VisualStudio 2008....... In this package you can find some compilers and I think Visual C++ is the best tool for writing apps....... But I'm telling you.... I'm not a developer, I only give you some information about what I found out listening some friends.
Now it's up to you........ Have a good luck!!!
To answer your questions:
C# does have a lot of limitation on WinMo platform. There's a lot of functionality that is missing from managed .NET libraries on WinMo. There are additional libraries that you can use to gain some of that functionality back, like OpenCFNET.
You can use native api, but you have to create COM Interop wrappers to call them.
C++ is still the language of choice for WinMo development.
C# is part of Microsoft .NET framework. The reason you see a lot of people use it, even with all of the limitations in WinMo environment is that it's a very popular language that can be used for any aspect of development (i.e. windows forms, web, devices, etc.). C# is also kindda not "ms specific" language, since there's a Mono framework, that allows you to use C# and .NET on almost any platform, including Linuxs and Macs.
this isn't the place to ask questions, there is a Q&A section for that.
thank you

Jython in Android?

Hey Folks,
I was wondering if anyone knew if it was possible to use Jython instead of plane Java for android development? I don't know much about Java development but I'm with Python. I was figuring that this might ease me into it better. Any thoughts?
Thanks,
-=GB=-
Have you had a look at the Android scripting environment?
http://code.google.com/p/android-scripting/
http://google-opensource.blogspot.com/2009/06/introducing-android-scripting.html
http://code.google.com/p/android-scripting/wiki/PythonAndroidAPI
Regards,
Akshay
Thanks aksd,
I don't know how I didn't find that before. Perhaps I should have just searched for Python and Android as opposed to just Jython and androind.
Anyway, this is very cool for prototyping and simple scripting. However, the main thing I was hoping for was writing apps in Python (via Jython) that could then be distributed on the Marketplace. It's kind of to bad. It doesn't look like anyone is really trying to port Jython to Android because ASE is sort of Google's official response to the whole thing. On the whole, a really great thing for people who just want to script Android but not really for App development.
In all of this searching I did find some interesting information about how to link in C libs so you could code some of the hardcore speed sucking elements in C (like a game engine) and then make calls into it via Java. I didn't know that was even possible so... Pretty cool stuff.
Hey ngrava,
I'm not much into scripts, so dont really follow whats happening with scripting and Android.
If you wanted a bit of a performance gain you can use the NDK and call the JNI to execute native libraries or code. been there for awhile but few use them. Java is just so much easier than C .
Theres a lot of interesting stuff going on on the Android platform, Mono being ported to Android, Scala being ported to Android, I'm actually currently working on profiling the performance of scala code on android.
Regards,
Akshay
On the Google DevFest on Argentina, Google´s ingeneers afirmed that they are working to make more languages availeable on Gingerbread, they specifically mentioned Ruby. We just have to wait to see if this is true and if we are going to be able to ship apps of other languages to the market, and I´m not sure if they will be backwards compatible with earlier versions of android as well.
PD: Oops, sorry for reviving this old post, I just realised i clicked last page instead of next

Computer Science student with Java experience looking to dev in android

Hey guys, as the title says i study computer science, and i use java and c#.
But its only on desktop platforms.
How much does it differ on an android platform?
Is it really just differences the APIs or is it a completely different approach to programming fundamentals?
Also what is the best way to go about developing? Can i get an SdK that plugs into netbeans or the like??
thanks
I too, study computer science - besides already working in these and related fields. My first impression of Android development is that there are a few paradigm differences that one has to accept.
For example, on desktop platforms, development and execution of applications follows a clear line through your code while on Android (and possibly other mobile platforms I am not currently aware of) your application architecture is based around the concept of activities. Traditional predictable execution like you would know it from a console application has to be emulated as the activities virtually replace the usual entry point (that would be, the main method or function). Anyhow, once you're actually developing anything serious, you'll get used to it pretty fast, so I wouldn't worry too much about it.
Furthermore, if you're coming from C# and have used WPF or Silverlight, the Android SDK/NDK does indeed look like hell to you. I came to Android and iOS development from C++ (indeed I have gained a lot of experience with C++; that's why I learnt C# and used WPF in a week's time) and at this point, you really start to feel how Android has grown very fast over the past 12 months. Deprecated APIs aside, it seems really hard to me to keep up with the developments so far.
What personally annoys me the most - that is, by far the most - is the Java programming language and it's omnipresence in the system. For an at least somehow experienced C++ programmer, the way concepts are implemented in Java, and this statement is not limited to Android in particular, seems awefully redundant and painful to use. But if you like it that way, you'll be fine. I have set up a template for myself so I can write most of my code in C or a bigger subset of C++ even though the NDK guidelines explicitly oppose it.
You are not limited to Java, you can use C and C++ through the NDK. I use the Eclipse IDE along with the ADT plugin, you could use Netbeans as well.

What language and software uses android for programming?

Hey guys im considering porting/recoding an app from VB.net to work on android, but i havent got a clue what language is used in android, could someone tell me its name or some sort of website with this information?
Finally if someone is experienced in programming apps for android, i would like to chat about a few capabilities of the language.
Thanks in advance!
Android is Java-ish based.
i would recommend you checking out the program Eclipse.
The main applayer is java based with some xml thrown in. But there is a native development kit that you can compile c c++ and many other languages to run on an android phone. But since java is virtual machine based an app written in java will run on all phones*(some caveats like os version) while the app in ndk will work on only hardware that it was designed for
Also, is Google not working? A simple search for "Android programming language" would answer this question
From something awesome
killersnowman said:
The main applayer is java based with some xml thrown in. But there is a native development kit that you can compile c c++ and many other languages to run on an android phone. But since java is virtual machine based an app written in java will run on all phones*(some caveats like os version) while the app in ndk will work on only hardware that it was designed for
From something awesome
Click to expand...
Click to collapse
hmmm, yes there is google but not what im exactly asking, and that makes me ask this:
You talk about c & c++ and other languages compilations to run on android phone, is vb.net a part of that list?
Could you show me a website or something that says more about that dev kit? im basically trying to port my apps from vb 2010 express (windows forms based) to android and if that thing is not possible should i use java to code it all over again?
Thanks in advance!
http://developer.android.com/sdk/ndk/ this is for the ndk but it is not as simple as just compiling your code with the ndk. You will need to rewrite some of it to actuallytie into the android apis
You should really just use the java sdk. You will reach more people and be able to find more help and info
And I stand corrected, while there are projects trying to bring other languages to the ndk it is at this point just C and C++
From something awesome
killersnowman said:
http://developer.android.com/sdk/ndk/ this is for the ndk but it is not as simple as just compiling your code with the ndk. You will need to rewrite some of it to actuallytie into the android apis
You should really just use the java sdk. You will reach more people and be able to find more help and info
And I stand corrected, while there are projects trying to bring other languages to the ndk it is at this point just C and C++
From something awesome
Click to expand...
Click to collapse
oh well in that case i will need to learn java.... thanks mate, i think its easier to just rewrite the whole thing really i like proper optimizations and ports most of the times lack them.
Thanks for the information thats all i needed.
PS: rep added
if you know vb.net well you'll have no real problem with java.. it just adds brackets and semicolons essentially lol. I learned java in college and then was thrown into the .net framework using c# and i love the .net framework.. its so hard for me to go from using Visual Studios to Eclipse to make an android application because Visual Studios (which im assuming you use, is so powerful).. But yes android is java code behind and html (preferred) GUI. You can make your GUI using java but trust me its terrible!
jr10000 said:
But yes android is java code behind and html (preferred) GUI. You can make your GUI using java but trust me its terrible!
Click to expand...
Click to collapse
Html? You mean xml?
Also try Intellij instead of Eclipse. Eclipse is way too bloated and IntellJ has some amazing autocomplete features. Its better in my opinion
From something awesome
jr10000 said:
if you know vb.net well you'll have no real problem with java.. it just adds brackets and semicolons essentially lol. I learned java in college and then was thrown into the .net framework using c# and i love the .net framework.. its so hard for me to go from using Visual Studios to Eclipse to make an android application because Visual Studios (which im assuming you use, is so powerful).. But yes android is java code behind and html (preferred) GUI. You can make your GUI using java but trust me its terrible!
Click to expand...
Click to collapse
what?? i really need a proper GUI ugh... yes im using visual studio, and indeed is amazing, the app i have and i want to port to android is windows form based, the most essential thing i would need about it is the calendar control :\
You can use Javascript+HTML5 (it's complicated to express here but the whole things is pretty much native).
Python aswell, use SL4x or Kivy (Kivy is pretty good but it's still too new).
Sorry, being hate Java too much.
Funnnny said:
You can use Javascript+HTML5 (it's complicated to express here but the whole things is pretty much native).
Python aswell, use SL4x or Kivy (Kivy is pretty good but it's still too new).
Sorry, being hate Java too much.
Click to expand...
Click to collapse
ok np, so to doublecheck this: to have an application with graphical interface i will need javascript and html5?
TheWarKeeper said:
ok np, so to doublecheck this: to have an application with graphical interface i will need javascript and html5?
Click to expand...
Click to collapse
I dont know why people spread extremely non standard practices to people getting started...
No you dont need javascript or html5.
Android has a ui layout system based in xml. Its just there to arrange objects that you can access from the java code. So a little xml and java is all you need
From something awesome
TheWarKeeper said:
ok np, so to doublecheck this: to have an application with graphical interface i will need javascript and html5?
Click to expand...
Click to collapse
The right way to do GUI is with Java, with the official SDK from Google.
Some non-standard way to do this is with Javascript (just a GUI wrapper from Javascript to Java) and Python (again wrapper to Python).
You can choose which way you want, many people I know didn't like Java, and they choose to use a web application, and then they want to embed this to a native Android application, so they go with Titanium Mobile or some others framework like that. It's not as good as Java, but it's some other way to start with your application (Web app first and then Native app)
Funnnny said:
The right way to do GUI is with Java, with the official SDK from Google.
Some non-standard way to do this is with Javascript (just a GUI wrapper from Javascript to Java) and Python (again wrapper to Python).
You can choose which way you want, many people I know didn't like Java, and they choose to use a web application, and then they want to embed this to a native Android application, so they go with Titanium Mobile or some others framework like that. It's not as good as Java, but it's some other way to start with your application (Web app first and then Native app)
Click to expand...
Click to collapse
i feel like i should probably stick with java, i want it to be quick and fast and have alot of stuff to code, the program should run in background so it must not affect performance at all, will use timers with a basic code ticking every second while on background and thats it really
TheWarKeeper said:
i feel like i should probably stick with java, i want it to be quick and fast and have alot of stuff to code, the program should run in background so it must not affect performance at all, will use timers with a basic code ticking every second while on background and thats it really
Click to expand...
Click to collapse
Then use java bro, it's an awesome programming language, I don't know why some people don't like it, each programmer should learn to get used to each language.
Anyway, for likes.. colors
Cheers, D4.
D4rKn3sSyS said:
Then use java bro, it's an awesome programming language, I don't know why some people don't like it, each programmer should learn to get used to each language.
Anyway, for likes.. colors
Cheers, D4.
Click to expand...
Click to collapse
well ive been learning vb and i will admit that im still on intermediate level, even though i know all the basic stuff such as messing with its own functions, etc i still havent used any of the apis for it, the main problem with programming is that if u learn a language you would waste your time learning that one or else if u go learn to many languages you will end up not knowing none of them at all.
Ill see if i can mess with java, some people say syntax is a bit similar to c & c++
EDIT: btw, im not saying i dont find java good, a programming language that will basically run on any machine independently of the OS makes the language itself possibly the best and most versatile around.
I'm learning Android and I use Java and XML. I'm still a beginner though.
Sent from my SGH-T959 using XDA App
I am just curious, software like Titanium Backup, or Angry Birds, which programming language do they use? Could this stuff be programmed with Eclipse in Java?
killersnowman said:
Html? You mean xml?
Also try Intellij instead of Eclipse. Eclipse is way too bloated and IntellJ has some amazing autocomplete features. Its better in my opinion
From something awesome
Click to expand...
Click to collapse
Hey, do you know how to use intellij idea fire Android development?
Sent from my GT-S5830 using xda premium

Do I need to learn Java to program in Android Studio?

Do I need to learn Java to program in Android Studio? Or I can just jump straight into it? If I must learn it, can u guys show me a great way of learning Java? (I have a Pascal basic BTW).
You definitely must. Java is the main language for android development and without knowing it you can't do anything advanced.
To start learning you can use docs.oracle.com/javase/tutorial/. But learning is nothing without practice so start your own project and use Java in it. It's relatively easy language so you can start quickly.
s0nicyouth said:
You definitely must. Java is the main language for android development and without knowing it you can't do anything advanced.
To start learning you can use docs.oracle.com/javase/tutorial/. But learning is nothing without practice so start your own project and use Java in it. It's relatively easy language so you can start quickly.
Click to expand...
Click to collapse
Thanks Brother i was also looking for some tutoral sites....and found nothing for my choice...i have basic knowledge in Java and Codes 2apps also..check my threads but can u plz send me some Video tutoral video for android app development i want to add advanced Features & libraries
ARGHA_DAS said:
Thanks Brother i was also looking for some tutoral sites....and found nothing for my choice...i have basic knowledge in Java and Codes 2apps also..check my threads but can u plz send me some Video tutoral video for android app development i want to add advanced Features & libraries
Click to expand...
Click to collapse
You are welcome. To be honest I don't know any video tutorial and personally I think the best way to learn programming is practice. So just use any Vogella's tutors and code your apps but always try to make them more complex.
Java is important for Android studio
Yes, you need to learn Java properly before visiting android studio.
Because Java is key to do programming in android studio for Android developers.
appninjaz.co.uk/services.html
I learned from a YouTube series called "mybringback" 5 years ago. It's still a good place to start. Also, a great website that interactively teaches you to code is Codecademy.com. They are mainly a web-development website, but recently added java to their courses. It may be worth trying as well.
Root it and boot it!
Current device: Asus ZenFone 2 (Z00AD/ZE551ML)
ROM: Resurrection Remix
Kernel: FlareM
Service: Straight Talk
Check out my apps on Google Play
I have collected many good tutorials for Java and Android here.
Hope it helps
It best to learn Java, but today you can also use Xamarin to develop cross platform apps using .net (Visual Studio 2015).
java is main language to android studio
if you are using android studio, Java is a must. But you don't have to learn core java, you can just jump in to android programming, coz there are lots of different library there.
i would suggest using android studio instead of others, beside they are free, they are directly from google
Yes, java is must in order to develop android apps. Android virtual machine runs java codes. So android apps needs to be in java.
Now a days, there are so many frameworks and tools available which allow you to develop android apps in other languages and convert the apps developed in other languages to java code to deploy and run on android.
I think it is a good idea to directly code in java as you can easily understand concepts involved in android os and develop apps that perform well proving best user experience.. It is not difficult to learn java and android framework to develop android apps.
As others have pointed out, yes you must. However, if you have Pascal/Delphi background, that helps a lot! So loops/ifs/functions are no stranger to you. You "only" need to learn about classes, interfaces and such stuff, not very hard.
Luckily for you, there's literally thousands of Java tutorials, books, videos, anything you can think of. I always like to stick with books from respected authors and/or the language authors. So for Java, I'd go with https://docs.oracle.com/javase/tutorial/java/nutsandbolts/index.html (just an example, there's tens of other valuable books/tutorials).

Categories

Resources