📜 ⬆️ ⬇️

The first pancake is lumpy, or How to start writing under Android and not quitting

I was inspired by several complaints about various resources about writing that when writing or installing sdk something didn’t work or something hung and therefore was “scored on Android”. Indeed, a person who wants to do development for this platform may be lost in the abundance of articles and manuals on how to write your first “Hello, Adroid” or how to make a specific application, especially if there is not enough programming experience. In this article I will try to cover, whenever possible, all the ways that will help in the process of self-learning and will not let you lose enthusiasm because of the difficulties that have appeared. I hope this article will help save novice time and nerves.

Those who have enough of this resource , this article is unlikely to be interested.

Installing and configuring development tools is well described in the Android Development Tutorial , so I can skip this.
')
Where to test your application


First you need to decide what to install and where to test your project. You can put on the emulator, as described in the above article. As many have noticed, it works very slowly. In addition, it is a frequent fallacy - before launching the application, beginners close the emulator each time and launch it again. This is not necessary.
Another way is to install Android-x86 on VirtualBox.
But a real device will be needed sooner or later - if only for the reason that it is either very inconvenient or simply impossible to write applications where a camera or video is involved. Therefore, if it is possible to purchase a device with Android, it is better to use it. I put on my HTC Wildfire, despite the fact that it appears unnecessary trash, but I save my time (and nerves).

What literature to use


Maybe there are those who rate the books "... for dummies" and "... in 24 hours" well, but I would not take the name seriously, as well as what is inside it.

If there is a problem with knowledge of English, then it will be very difficult here, since I don’t know good books in Russian.

Literature in Russian:

Android Application Development - Rick Rogers, John Lombardo, Zigurd Mednieks, Blake Make;
Pro Android 2 / Android. Application Development - S. Hashimi, S. Komatineni, D. Macklin.
In these books, the translation seemed to me very strange. Translated in their own terms or class names can be very confusing in the future.

Google Android - AL Goloshchapov - here is something like direct translation of documentation.

Literature in English:

Everyone already known Dev Guide ;

Books for beginners like 'Beginning Android' and 'Hello, Android' are mostly similar to each other, you can choose any - but you shouldn’t dwell on it.

The full release of Head First Android Development , unfortunately, has not yet been released. Perhaps now the authors decided to touch on version 4.0 in the book. If you can find early release, then you're in luck.

Books that deserve attention:

Android Application Development by O'Reilly;

Pro Android 2 - Sayed Y. Hashimi, Satya Komatineni, Dave MacLean;
and the continuation of this series:
Pro Android Games;
Android Media Pro - Developing Graphics, Music & Videots;
Pro Android Web Apps - Develop for Android Using HTML5, CSS3 & Javascript.
depending on what you are going to write.

Video lessons:


It happens that there are not enough books (it is sometimes more convenient for me to watch a video than to read), therefore from video courses:

The Android App Development with Java Essential Training from Lynda.com is a good course, but some topics, such as working with SQLite, are shown very superficially. Video course can give a good start, then - a matter of practice. The course author is an ActionScript programmer. I think it will once again motivate those who have never dealt with java.

Another video course - Developing Android Applications with Java from O'Reilly - contains a lot of good material, but I didn’t like it - it’s rather just a matter of taste.

Problems while writing a program


Answers to many questions that are related to development can be found on stackoverflow.com - in almost all cases, you can find a solution, besides in different ways.

Please note that the documentation is also far from ideal and in the examples there may be errors or simply incomprehensible extra lines of code that are not needed.

Finally, a few practical tips:


1. Watch out for classes and methods that are marked deprecated in the documentation and try to use more recent ones.
2. Watch the version of Android you are writing for, because a more recent class may not work, and you will still need to use the old deprecated class.
3. Refer to the limitations of the system specified in the documentation (a simple example is the frequency of updating widgets. In the xml file, you can set 1 second, but the widget will be updated at least once every 30 minutes).

Source: https://habr.com/ru/post/131662/


All Articles