I know there is a dedicated area for Android issues, BUT I just want to know if there's an option to program to Android in C or in Java, and what will be the best language to write apps for Android.
This info you can't find in the Android area...
Thanks !!
Android practically is java.
Just read some how to start tutorials and you will see theres not much difference to conventional java applications.
It is Java with some platform dependent features.
SDK:
http://developer.android.com/sdk/index.html
DevGuides:
http://developer.android.com/guide/index.html
The Android API is in Java. You can find the developer guide here.
For performance-critical code, you can use the Android NDK.
Android's comprehensive java SDK makes it a lot easier to write apps in Java. You should check out the getting started page on their developer site.
The best? Java.
You can also write in C/C++ with the NDK.
And you can also write with Python or, say, Scala, but is not easy at all.
Java is the best because the API is Java, so all the documentation is in Java. Equally important, Google's ADT plugin to program Android in Eclipse is super easy, so you are going to work with an IDE, no need to advanced text editors and so.
Android applications are java based. (although I heard new NDK support development of full application in C).
It is possible to develop some libraries in c/c++ and load them to your application using JNI, which is also a Java feature. Start from here: http://developer.android.com/index.html I know it seems to general, but the official site is a great place to start from.
You use Java to program Android. It says it in the documentation for development for Android.
You can also use the NDK but don't start with that.
Related
One of my friends suggested to use c++ support in Android studio in order to hide passwords. I have found tons of tutorials how to get started with ndk in android. But they are all outdated(2015) and everytime I try to use c++ in any way, Android studio crashes. Is there any way to do it in a simpler way now?
P.S./ I want to get rid of experimental plugin that every one uses.
Little off the question, storing passwords in the native layer does not ensure complete safety. A good hacker can get that as well. It is just that you add another additional layer so one has to dig deeper
this is nanopb website https://code.google.com/p/nanopb/
i dont know nanopb it can be used on android and iOS?
thanks
Best Wish
You can use C language code in android and iOS. In android NDK is provided for native libraries.
Yes, it is possible.
However, if your main application is in Java, it is probably not very pleasant to use a Protocol Buffers library through NDK. It will require a lot of boilerplate code in marshalling the messages back and forth.
I would suggest using the Google's own Java protobuf library, in its "nano" configuration mode.
I have a few Questions related to AIML integration in the Android OS. I know not much of Java but I do know a lot about AIML. I made the AIML files and now what I want to do is to make one app which can load the files and run them in a GUI. Please tell me a way to do this. If AIML is not possible, is there a C++ way to do it? Please reply fast. I know C++, C and AIML. Not much JAVA or other programming Languages. I am not interested in hosting a web based application as I don't have a site and can't get one.
FYI- AIML stands for 'Artificial Intelligence Markup Language'.
natarajadithyan.
The chatterbots use a complicated algorithm. Simply, the chatterbot executable searches for categories with the underscore wildcard. Next, categories with no wildcard are searched. Last, the star wildcards are checked. When the pattern matches the input, then the AIML interpreter handles the code in the template tags. You may want to look at the source code for this chatterbot to get an idea about how they work.
http://sourceforge.net/projects/qaiml/
Try program-ab.
It's written in java and very easy to integrate in an android app.
I don't know if there is any c/c++ chatbots. If it's available then you can try integrating them using Android Native development kit(called NDK).
NDK is used to write android apps in c++. I personally wont be able to help you with NDK.
But I have integrated program-ab into android app using java. Its pretty simple.
I recently know that we can use Android NDK (use C++ language) to program. But, I'm afraid that, can we use Android NDK to do most of work in Android ? (because people just say that NDK just helps increasing performance of an android program)
I see that ADT plugin for eclipse is powerful, but It's for java. So, if I want to develop on Android NDK, does it has a plugin same with that.
thanks :)
Java is well-supported on Android: there are books, tutorials, Google results and a lot of similar documentation and resources. Developing with the NDK has less stuff available.
Although you can in principle write your full application in C++ using the NativeActivity, I believe that you will have less resources at your disposal for that, compared to Java. If you really want to make your Java program faster, you should profile it, to find which part needs this performance gain and write only that part in C++ using JNI.
you could, but it is not recommend. For one c++ and java performance for multiple aspects are equivalent, then every jni call has its overhead that you have to take in account. Take a look to this link
I know C# rather well and just love Visual Studio as IDE. :) Yet now I want to start developing for android...
I found out about MonoDroid and wanted to ask if it has any downsides to it that would make Java more preferable, or should I uninstall Eclipse and dive straight into MonoDroid?
If I understand right, MonoDroid deploys/compiles native android applications and does not need any additional .net-like framework or anything?
Are there any significant limitations to what I can do with MonoDroid? For example, having the app run in the background or using some external .net libraries for image editing, etc. ?
I've been worrying about the same thing - productivity in C# instead of playing with an unfamiliar language, vs developing how the OS developers intended it to be.
Its easy to list pros vs cons -
pros (of monodroid, for C# developers)
familiar dev environment, can develop using Visual Studio
C# instead of Java
Reusable code assets - you can use a lot of code in your iphone project or Windows phone 7 project using monotouch and the WP7 SDK.
cons -
debugging could be difficult, due to lack of api documentation from Google. Will have to depend solely on monodroid documentation.
there could be a lag when it comes to latest cutting edge features - safe to assume that the monodroid team will require some time to wrap around the latest android features every time there is a new OS release
availability of libraries - I am not sure how you can use the open source libraries that would have evolved around the android platform, that could cut down on development time
Much of the documentation available is in Java: so if you run into difficulties with phone behavior when using MonoDroid you won't really find that much help or debugging information so you may want to stick with Eclipse.
There's a lot more than just a set of wrappers running under davlick, truth to be told, there is much more of a horizontal relationship between MonoDroid and Android;
When did using the same language as the OS developers become a big issue? There's lots of C++ programmers wondering how to use BSD or SVR5 and many C programmers who want to know what the heck to do on Windows++...
If you will write in c# anyway you will be have to wrap it into a Java code, so what's the point ? Also you may head with a very difficult issues while trying to understand the APIs who written for Java programming...
Here are some points that you can mull over:
Android applications are predominately written with Java. The Android SDK itself is natively written in Java.
Working in Mono may not provide all the functionality available in the Java SDK.
If you are a C# Developer you wont be able to find, in Java, some of the (cool) features available in C# (like Property Delegates etc).
Code written in .NET can be re-used for other environments - this may save a lot time that would have been spent learning a new language/environment (like Objective C), and coding in it.
.NET extends the Android development stack with it's existing libraries and API's.
I think both are good for certain reason. It will be very hard to say which one is preferable for Android development - in the end that is up to you too decide.
Also note that any release build using monodroid adds an additional 4mb to the apk filesize and increases app startup time with a few seconds.
For simple apps this can mean a 500-800% increase in filesize - whic is pretty bad in my book.