r/learnandroid • u/crystalowy • Jul 05 '14
Start programming Android, without learning Java
I wanna start programming in Android, but I still very poorly language Java. Is for good, when I start programming application in Android, without learning Java?
0
Upvotes
8
u/omniuni Jul 06 '14
I'm actually going to offer the (apparently) dissenting opinion, but not without a few good caveats.
Before you go in to Android development, I do think you need to know some basics in a few areas. You should be able to write a "Hello World" program in Java, you should be able to write simple functions, and you should have a cursory understanding of XML or be familiar with HTML. However, notice I didn't say you had to be good at those things, or even 100% understand them, and here's why.
While Android is built on Java and XML, it has its own flavor for both. Building a UI in an Android app is nothing like building a Java UI in Swing. Similarly, Android has Activities, Fragments, Services, and other features that make programming for it very different than programming for a desktop Java application. I believe that learning how to program for Android can be a great way to become a better programmer. Not only does Android make it easy to create GUI applications, but as easy as it is to get started, you'll quickly have to learn to think about efficiency and code design to create great apps.
Learning to program using Android as motivation can work, but it's far from the easiest way to get started. Without having a strong basis in Java the learning curve will be steep, and it will be tempting to try to take shortcuts. Don't.
If this is the route you choose to go, you will have to take the time to learn about each thing you are doing. When you implement an interface, learn what you are doing and why. Make one yourself so you can see how it's done. When you get a "Network on Main Thread" exception, don't just copy code from the Internet to make it work, take the time to understand what an async task is and how they work.
Two years ago, terms like "Interface", "Inheritance", "Asynchronous", "Intent Service", "Callback", "Broadcast Receiver", and "Holder" didn't mean much to me. Today, they all carry a certain significance, and most of them I use on an every-day basis. I didn't get here by consenting to copy and paste, though. Whenever I looked up how to do something, I found tutorials with good explanations and sought to fully understand what I was writing. Among the best resources I have found is Vogella's Android Tutorials which tend to do a great job explaining what's going on.
Android is just a platform, and Java and XML are the languages that you will learn as you create apps for it. It's not really much different than approaching learning to program a web application with Ruby or PHP, a GUI application with Python and WxWidgets, or hacking on a game with Lua. If you want to learn how to program and you want to do it with Android, go for it! No matter what though, use it to learn. Use it to become a great programmer. Above all else, have fun!