
The first pancake is lumpy, or How to start writing for Android and not quit
The article was inspired by several complaints on various resources that, during the writing or installation of sdk, something didn’t work or something hung and therefore “scored on Android”. Indeed, a person who wants to start developing for this platform may get 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 as much as possible all the ways that will help in the process of self-learning and will not let you lose enthusiasm due to the difficulties that have appeared. I hope this article helps save beginners time and nerves.
Those who have enough of this resource , this article is unlikely to interest.
Installing and configuring development tools is well described in the Android Development Tutorial , so I can skip this.
First you need to decide what to install and where to test your project. You can put it on the emulator, as described in the above article. As many people notice, it works very slowly. In addition, there is a common misconception - before starting the application, beginners close the emulator each time and start it again. This is not necessary.
Another way - you can install on the VirtualBox Android-x86 .
But sooner or later, a real device will be needed - if only for the reason that writing applications where the camera or video is involved is either very inconvenient or simply impossible. 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 unnecessary trash appears in it, but I save my time (and nerves).
Maybe there are those who appreciate the books "... for dummies" and "... in 24 hours", but I would not seriously take the title, as well as what is inside it.
If problems with the knowledge of the English language, there will be very difficult, because the good books in Russianno , I do not know.
Android Application Development - Rick Rogers, John Lombardo, Sigurd Mednieks, Blake Make;
Pro Android 2 / Android. Application Development - S. Hashimi, S. Komatineni, D. Macklin.
In these books, the translation seemed very strange to me. Translated in their own way terms or class names can be very confusing in the future.
Google Android - Goloshchapov A.L. - here is something like a direct translation of the documentation.
The already well-known Dev Guide ;
Beginning books such as 'Beginning Android' and 'Hello, Android' for the most part are alike, you can choose any - but do not get hung up on that.
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 an early release, then you're in luck.
Books that deserve attention:
O'Reilly Android Application Development;
Pro Android 2 - Sayed Y. Hashimi, Satya Komatineni, Dave MacLean;
and the continuation of this series:
Pro Android Games;
Pro Android Media - Developing Graphics, Music, Video and Rich Media Apps for Smartphones and Tablets;
Pro Android Web Apps - Develop for Android Using HTML5, CSS3 & Javascript.
depending on what you are going to write.
It happens that books are not enough (it’s sometimes more convenient for me to watch a video than to read), therefore from the video courses:
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 this will once again motivate those who have never dealt with java.
Another video course - O'Reilly's Developing Android Applications with Java - contains a lot of good material, but I didn’t like it - it’s rather just a matter of taste.
The answers to many questions that are related to development can be found on stackoverflow.com - in almost all cases you can find a solution, moreover, in different versions.
Please note that the documentation is also far from ideal and examples may contain errors or simply incomprehensible extra lines of code that are not needed.
1. Watch for classes and methods that are marked as deprecated in the documentation and try to use more recent ones.
2. Watch the version of Android that you write for, because a more recent class may not work, and you still need to use the old deprecated class.
3. Refer to the system restrictions indicated in the documentation (a simple example is the frequency of updating widgets. You can set 1 second in the xml file, but the widget will be updated at least once every 30 minutes).
Those who have enough of this resource , this article is unlikely to interest.
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 it on the emulator, as described in the above article. As many people notice, it works very slowly. In addition, there is a common misconception - before starting the application, beginners close the emulator each time and start it again. This is not necessary.
Another way - you can install on the VirtualBox Android-x86 .
But sooner or later, a real device will be needed - if only for the reason that writing applications where the camera or video is involved is either very inconvenient or simply impossible. 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 unnecessary trash appears in it, but I save my time (and nerves).
What literature to use
Maybe there are those who appreciate the books "... for dummies" and "... in 24 hours", but I would not seriously take the title, as well as what is inside it.
If problems with the knowledge of the English language, there will be very difficult, because the good books in Russian
Literature in Russian:
Android Application Development - Rick Rogers, John Lombardo, Sigurd Mednieks, Blake Make;
Pro Android 2 / Android. Application Development - S. Hashimi, S. Komatineni, D. Macklin.
In these books, the translation seemed very strange to me. Translated in their own way terms or class names can be very confusing in the future.
Google Android - Goloshchapov A.L. - here is something like a direct translation of the documentation.
Literature in English:
The already well-known Dev Guide ;
Beginning books such as 'Beginning Android' and 'Hello, Android' for the most part are alike, you can choose any - but do not get hung up on that.
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 an early release, then you're in luck.
Books that deserve attention:
O'Reilly Android Application Development;
Pro Android 2 - Sayed Y. Hashimi, Satya Komatineni, Dave MacLean;
and the continuation of this series:
Pro Android Games;
Pro Android Media - Developing Graphics, Music, Video and Rich Media Apps for Smartphones and Tablets;
Pro Android Web Apps - Develop for Android Using HTML5, CSS3 & Javascript.
depending on what you are going to write.
Video lessons:
It happens that books are not enough (it’s sometimes more convenient for me to watch a video than to read), therefore from the video courses:
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 this will once again motivate those who have never dealt with java.
Another video course - O'Reilly's Developing Android Applications with Java - 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
The answers to many questions that are related to development can be found on stackoverflow.com - in almost all cases you can find a solution, moreover, in different versions.
Please note that the documentation is also far from ideal and examples may contain errors or simply incomprehensible extra lines of code that are not needed.
Finally, a few practical tips:
1. Watch for classes and methods that are marked as deprecated in the documentation and try to use more recent ones.
2. Watch the version of Android that you write for, because a more recent class may not work, and you still need to use the old deprecated class.
3. Refer to the system restrictions indicated in the documentation (a simple example is the frequency of updating widgets. You can set 1 second in the xml file, but the widget will be updated at least once every 30 minutes).