10. Oct 2022
AndroidYou want to start developing apps for Android? Let me help you
When I was starting with development on Android, I was totally lost. If not for help from senior android developers in my first workplace, it would take some more time to wrap my head around. Now is my time, to share some wisdom.
I have installed environment, watch youtube, read a blog on Google …
Stop right there unless you want to toss it out of the window before you even manage to print out "Hello world!" on your android device. It is hard to resist the excitement from new technology. It is important to start with small steps rather than go all in. Small achievements will motive you. Big expectations will discourage you to continue. I’ll try to give you some advice on tools and starting out.
Programming language is your choice
You can right away go for alternative ways such as Flutter or React Native, but I would like to suggest Java or even better: Kotlin. Why Kotlin? Because its cool. To learn Kotlin syntax is somewhat easy. At the same time it provides a lot Android utilisation, which Java does not have. Kotlin was originally designed to make android developers life easier. As well, by syntax it is very similar to Swift. If in the future, you would decide to learn develop mobile apps for iOS, it would be much easier.
Development environment
There are few IDEs: Netbeans, Eclipse, Inellij, Visual Studio Code… but the best alternative is Android Studio. Android Studio is based on Intellij, which has extended window utilisation focused on Android development.
Gradle
One of the painful stops and unknowns is Gradle. Gradle is a scripting language, which is used to create and configure Android projects. There are a lot of unknowns with this tool even after years of experience. At the start you don’t need to understand it, but I’ll talk about the most important parts of it.
Dependencies - app/build.gradle
The most common part which you will touch, are dependencies. Android is broken down to handfull of smaller dependecies, which you will use during development.
defaultConfig - app/build.gradle
In this part, we configure our application. Such as devices it supports, version of the Android OS and version of your application.
buildTypes - app/build.gradle
Here we configure our build variants. What are these? These define how is our project being compiled in to an apk. During development, there is a lot of not used source code and the apk it self is not secure. Becuase of this, an development apk is much larger than the one you download from store. You need to configure here signing as well. This is a required step if one day you want to upload your app to google play store.
The one million project
We know gradle basics and we know Kotlin syntax. The idea you have is already popping like a popcorn in your head. The painful truth is there is a high chance of probability you never finish your project. It is good to clear out the air at the start and focus on learning something. I learnt programming android apps with help of Youtube. Honestly, today I would choose Udemy. There are often discounts for the courses there. Most of the courses are very explanatory and very well made.
Discipline
From start, you’ll be overwhelmed with information. If you don’t understand some part, I advice to google it. There are a lot of articles on very class, solution or pattern you are trying to understand. From the latest tech stack you can find explanatory articles on our blog in section Mobile. Some things will be harder to understand, because you need to see the bigger picture or work with it more. But worry not, it’ll get easier soon. Rome wasn't built in a day.
Don’t be afraid to start over. Have you learnt something new and one to use it in your project? You start writing and there is an error after error. Just delete it and start from scratch. You will be able to compare previous solution with the current one. On the other hand, you will also practice the language and the cogs of Android.
Working with new knowledge is like watching your favourite series or movie. When ever you rewatch, you’ll notice details, which you haven’t seen previously.
Praise the Android Gods and good luck!