Fastest path to Android development for a non-Java programmer - java

The decision to jump on the Android bandwagon has been made. The entire development environment has been installed and configured properly. I went through the steps suggested in http://developer.android.com/sdk/installing.html and even managed to "write" the Hello World application and run it on the emulator. :)
Unfortunately, however, I am not an experienced Java programmer and so, despite successfully completing all the suggested steps, and consulting an excellent speedy Java tutorial for C++ programmers, I feel that a lot is missing on the way to mastering Android development.
It would have been great to first master the Java world (note: I didn't say language, as Java is so much more than just syntax), then delve into Android, but in the real world there are deadlines to meet and so starting to develop/learn directly on Android is very tempting...
My question: Is it possible to develop good Android code while skipping the step of being an experienced Java programmer?
Do you know of a fast track that allows mastering both?

I have come from .NET and it was very easy to pick it up.
I bought Android Pro 2 book and that was all I needed.
UPDATE
Well, it seems that a few people have found the book really terrible because of typos and errors in the samples - and even in the book itself.
In any case, as you will find in the comments, this is by no means a definitive answer and please read Amazon reviews and choose the one you prefer. This worked for me since I need to understand the concept and then pick up the samples from Android documentations itself.

I believe a great share of Android developers come from other languages without any knowledge in Java at all. In fact all you need to know about Java in order to write Android code is it's syntax and core APIs: java.lang., java.util., java.net., java.io. etc. The rest is Android-specific APIs and a profound Java programmer won't have much advantage over you in learning them.

Related

Python for Android Apps

I've learnt python recently and I want to make an app for android. But everywhere on the net, it seems Java and Eclipse are the only ones that can be used.
So, my question is:
1) Can I use python to make an android app?
2) What kind of platform should I use to make an app with python?
Thanks guys!
If you're just looking to run Python scripts, try QPython.
If you're looking to make your Python code run like a native app, or just something more robust than the above, try SL4A.
If you're looking to effectively use Python as a library, and compile an .apk with the Python library included, try Kivy: github.com/kivy/python-for-android.
That said, you'd likely get a lot of benefit from learning Java, and not just for programming natively in Android (which would give you access to a much wider feature set and make your app run more efficiently).
Check out the Scripting Layer For Android, aka SL4A.
Here is a blog for getting started. The blog promises more entries in the series but there don't seem to be any. Still, it is a great starting point. There's quite a few parts to pull together so be patient and check the bottom of that blog entry for dozens of useful links.
If you want to contain everything to the Android device, including the IDE (pretty slick), check this out.
Here's a book from APress that could help with more advanced concepts: Pro Android Python with SL4A

Learning Android SDK using only Android API examples

I keep reading that I have to learn Java to make android programs. But when I read about Java, none of it applies to the modules in the Android SDK. I am not much of a programer so if I have to spend years trying to learn another language and mess with other compilers before Android SDK will look like something that can be done, I'm not intrested. This should be an easy request, but when I asked on IRC they were very rude.
You cannot possibly program Android without knowing Java. I suppose you could try learning both at the same time, but that will be quite a steep learning curve. The android-samples won't make any sense to you if you don't understand Java.
sorry, there are no shortcuts.
I am by no means an expert, but I studied the basics of Java a couple of years ago in college and then went on to use Android for my bachelor thesis project (this was back when the newest Android version was 1.6 IIRC). In my limited experience, Android SDK modules indeed have very little to do with Java. In any case, it felt like I was learning a completely new language and SDK. In my opinion, you'll be fine learning Android by itself. I would suggest you give it a shot, and if you find yourself stuck at some point you can always take a step back and get a book on Java.
Also, since you mention you're not much of a programmed, Google had a project called App Inventor last year that non-programmers could use to make simple Android apps. I've never used it but I've heard great things about it, so depending on your project you might want to check it out. Google has since dropped support for it, but it seems MIT has picked it up: http://www.appinventor.mit.edu/.
Edit: fixed link.

Resources for Android absolute beginner

I am a complete Android and C in general noob,
I have done a lot of web programming (which I am imagining is largely irrelevant here), some javascript (not jQuery just raw JS), I have also developed a .net app and done a course in java programming at uni last semester,
I know that Android uses Java in some places and C in others, I have looked at the SDK documentation here: http://developer.android.com/guide/topics/appwidgets/index.html
My aim is to build a simple dashboard widget that pulls data on a minute-by-minute basis from a JSON/JSONP API, I have thus far struggled to find any decent tutorials for real Android noobs such as myself, especially in the app widget category, If anyone knows of any good resources (online or books are fine) consisting of basic good practises, start-up guides and quick tutorials to get me up to speed would be great as I have absolutely no idea where to start (especially in the C end of things), I have found the SDK documentation does have some good stuff but it isn't exactly what I am after (built on very old builds of Android and thus most of the cool new features aren't integrated or taken into account).
Any recommendations would be very much appreciated!
On a side note, If all goes well with Android I would also be looking to move onto iOS so Objective-C start-up and tutorials would be great (Visual Quick Pro guide style would be perfect!)
I personally started reading and understanding the Android Application Fundamentals. Then I downloaded the Android ADT (Development Toolkit), configured it on Eclipse as well as the SDK (including samples).
Once that's set up, I started with the ApiDemos. You find its source code directly in the downloaded SDK <sdk-install-location>/samples/android-9/ApiDemos. Try to debug the code in the IDE, modify it and see how it reacts.
Finally, have fun :)
Well, I started with the Android developer documentation:
http://developer.android.com/guide/index.html
If that isn't as organized as you'd like for a complete beginner, you might want to try the FAQ since they have a lot of good tutorial links there, which happen to be very thorough:
http://developer.android.com/resources/faq/index.html
Once you get the basics, which the tutorials will do for you, the first link to the developer guide will be where you'll spend most of your time. There are even links in the guide for getting started with your IDE of choice, or getting started using no IDE at all.
To get a more specific answer, you'll have to ask a more specific question.

What is a good resource for help on codes to use for App?

I am a novice programmer when it comes to Java, I have Java:How To Program 7th Ed. that I am reading. My major is Computer Science so I have a little bit of knowledge about what yo do but as for the Application. I am trying to make a game app and was wandering what would be a good source to reference for various things inside of the app mainly the game play.
I'm not a very experienced programmer myself, but a general good idea is to read the Framework Topics in the Dev Guide on d.android.com completely. It gives a good view of what is possible within Android.
It's not a complete guide on how-to though, but it's good to see what Android is capable of before you start anything.
Plus indeed the online tutorials, but be careful as there are also a lot of tutorials for older versions of Android, which sometimes have deprecated stuff in them. And sometimes I found some tutorials which were simply wrong and had a lot of errors in them, so it's always a good idea to look at the comments on the article. But this is general internet knowledge ;)
Plus there are some books especially about Game development for Android.
(Beginning Android Games by Mario Zechner, for instance. I don't have the book but the title seems like something you need ;) )
If you want, you can also use adobe AIR to develop games for newer versions of Android.
Good luck.
As a beginner, you should not directly jump to game programming. You should first work on some Hello Wrold type programs. Go thorough the online tutorials. A lots of excellent material is available for free on internet. Best Luck.

Starting with Android: Java or Python (SL4A)

I just ordered an Android smartphone and want to start playing around with creating my own applications. Now the question is which language to use, the native Java or Python using SL4A (former ASE).
I tend to Python, as I know it much better than Java, but I'm wondering what I would be missing using a "second class" language on Android. On the SL4A website it is also stated to be alpha quality software, which is not exactly encouraging.
I'm also not quite sure what the limitations of the scripting environment are and if they would be problematic.
At the moment you cannot create a releasable program with Python (or any other scripting language) using SL4A. I have heard rumours that this is something Google is working on, but even if they do enable it Python apps are likely to be slow and power-hungry compared to Java. Also the scripting API only gives you access to a limited subset of the native Java API. I would not consider using SL4A for serious development work at the moment, only for one-off scripts and prototyping.
Take a look at Scala. It is a statically typed language on the JVM, but uses type inference to remove most of the noise that you get in Java. It also fully supports functional programming, and has a lot of pythonish features. Because it is statically typed it is as efficient as straight Java with none of the disadvantages. IMHO it is the language that Java should have been in the first place.
A lot of people are blogging about using Scala on Android, so Google around for more information.
More likely will depend what type of applications you will develop.
I would start with Java to become familiar with Android SDK. Anyway first you need to look into some examples, tutorials. Most of them are done in Java, and only a few, probably on the dev site of SL4A for that.
Also there is native development Android NDK, that can be programmed with C++.
But anyway Java rules for general applications.
Adding an update to Dave Kirby's answer:
Issue 55, Distribute scripts as APKs, in the issue tracker at SL4A deals specifically with that.
There is a solution being worked out (may be complete by now) described at SharingScripts. The only issue seems to be that you need to have a interpreter APK already installed.
you may want to check out Ruboto it is a framework for developing Android apps based on JRuby which means your JRuby code can call Android APIs and can also be called back from the Android Java side.
Here is an introduction article .
Consider ising Kivy, if you want to write Android apps with Python. The process of packing script to .apk file is described here.
The problem is, resulting .apk will be big (~7Mb for 300Kb data). It is obvious, because you need to pack there Python runtime and all libraries.
Another solution I have heard of, is Pygame for Android, but it works on lower lewel, so you need to draw graphics manually.
Unfortunately, I have not tried any of this ways yet, but it looks, that I'm going to start using kivy soon.

Categories