#1-What Do I Need To Start Android Apps Development?

I am a software developer from Algeria, I am obsessed with the world of programming and technology, and I'm always ready to share my experience and stories with you.
Introduction
“In the dynamic world of programming, knowledge requirements are ever-present, shaping every field. Embrace continuous learning to stay ahead and innovate”.
There will be always something required to learn or to know about before starting a new journey in every programming field, Android development is always a continuously evolving field, so you must be always up-to-date exploring everything new about Android SDKs and APIs you will work with, and also the programming language you are working with, whether it's Java or Kotlin.
Hardware And Software Requirments
Android Studio is a RAMer, and when I say RAMer it means that RAM is its favorite food and it uses RAM to survive, I used to work with a 6GB of RAM and I literally suffered with that, I had the worst days in my life waiting minutes for Android Studio to switch from a file to another file or switching from the code view to the design view.
I committed some optimizations like debugging the app in an external device avoiding additional RAM consumption from the AVM (Android Virtual Device), but the issue was more than that.
I am not trying to spread any negative energy here or bad news, but you need a good PC to progress faster when you are developing an application, a good multicore processor, +8GB of RAM, I believe 8GB will be enough to see Android Studio loading smoothly, and one of the most important and crucial things which is ample storage. As Android Studio requires several gigabytes for installation and project storage. An SSD (Solid State Drive) significantly boosts the speed of your development environment, reducing load times and enhancing overall responsiveness.
Equally vital is your choice of the operating system. Android Studio supports Windows, macOS, and Linux, offering flexibility for developers across platforms. Windows 10, macOS 10.14+, or a recent Linux distribution is recommended. On the software side, Java Development Kit (JDK) is essential, with version 8 or later being preferable. Android Studio uses Gradle, a build automation tool, and it often ships with the recommended Gradle version. However, keeping Gradle up-to-date helps ensure compatibility with the latest Android features and optimizations.
Android Application Architecture
Understanding the architecture of Android is a pivotal step before embarking on the journey of Android development. It's akin to laying a strong foundation before constructing a building. Familiarizing yourself with Android's architecture provides a roadmap to efficiently design and build applications. The architecture encompasses components like Activities, Fragments, Services, and Content Providers, each serving distinct roles in the app's functionality. Moreover, comprehending Android's architectural patterns, such as Model-View-Controller (MVC) or Model-View-ViewModel (MVVM), empowers developers to create organized, maintainable codebases. This holistic understanding instills a strategic mindset, allowing programmers to choose the right tools and approaches for specific tasks while ensuring scalability and robustness.
By delving into Android's architecture early on, developers gain insights into how components interact, the lifecycle of activities, and how data flows within the app. Grasping these concepts prevents common pitfalls, like memory leaks or inefficient resource usage, from arising in later stages of development. Additionally, this foundational knowledge influences architectural decisions, such as whether to use fragments or activities, when to employ background services, or how to manage data storage. In essence, comprehending Android's architecture transforms developers from mere coders into architects, capable of constructing cohesive, efficient, and user-friendly apps. It's akin to learning the layout of a city before navigating its streets, equipping programmers with the skills to navigate Android's intricacies and create applications that stand strong against the test of time.

Programming Concepts
The first thing you should cover is the programming language you will work with, you can't program something without being good at the programming language you're programming with. You have also to have a huge knowledge of algorithms and data structures in order to be a good programmer, and how to convert a solution in your mind to an algorithm or a source code.
Basically, in order to be a good Android apps developer, you have to be a good programmer in the first place, then you're going to add some extra knowledge about Android OS and how it works, and learn about Android Studio user interface which is so easy and helpful.
What programming language should I learn
We will work with Android Studio in this series, so you have to choose between two powerful programming languages, Java and Kotlin.
Java is so popular programming language, and it has been the traditional language for Android, while Kotlin, developed by JetBrains (the same company that created Android Studio IDE), has gained popularity rapidly due to its modern syntax, enhanced safety features, and seamless interoperability with Java.
Reasons to choose Java
One of the most important reasons I'm still using Java to make Android applications is that I'm already a “Java Programmer”, I used it in many projects, and it was the first object-oriented programming language I've learned.
So I didn't need to learn a new programming language, instead, I picked the language I'm using currently, It would be easier if I use the same language in creating Desktop apps, Android apps and even in web backend.
Also, if I was a new programmer, I would choose Java because of its high demand in the market. If I'm learning a programming language, it should have good compatibility and open a lot of chances to be creative with other fields, not only Android development.
Another reason to choose Java is its platform stability, Java is well-supported by Google and provides a stable foundation for developing Android apps. It offers a familiar structure for developers to build and maintain applications.
Reasons to choose Kotlin
Kotlin has rapidly gained popularity among Android developers due to its modern and expressive syntax, making it an attractive alternative to Java.
I think anyone will prefer this:
fun main(){
print("Hello World!")
}
Than this:
public class Main{
public static void main(String[] args){
System.out.println("Hello World!");
}
}
Null pointer exceptions (NPEs) have been a notorious source of frustration and bugs in programming languages like Java. Kotlin addresses the issue of null pointer exceptions by integrating null safety features directly into the language.
Kotlin's type inference system reduces the need for explicit type declarations, making the code more concise while maintaining strong static typing. This leads to cleaner and more maintainable code.
JetBrains (the creator of Kotlin) and Google have collaborated to provide excellent tooling support for Kotlin in Android Studio. This includes features like automatic Java-to-Kotlin conversion and comprehensive debugging tools.
Object-Oriented Programming (OOP)
Learning object-oriented programming (OOP) is highly beneficial before starting Android development using Android Studio. OOP is a programming paradigm that focuses on organizing code and data into reusable and modular components called objects. Android app development heavily relies on OOP principles, and understanding them can significantly enhance your ability to create robust and maintainable applications.
I started my path with Android app development with a course from freecodecamp YouTube channel (you can find the course here), and what is special about this course, is that it was an 11 hours course that first explains the user interface of Android Studio IDE, then dives into the Java language, covering all different sides of this language from types, variables, and object-oriented programming like class and objects, this was a very important step of android development roadmap that I really like in this course, because I found next in the rest of my journey that I'm always working with those principles of OOP like heritage, polymorphism, etc.
I came from a functional programming environment, C programming language precisely, and I felt I was in a Black & White world after entering the colored world of Java, some people criticized this and they said like "But how would anyone prefer public static void main(String[] args), then int main()", well it never was about the syntax, it was about the ability and the simplicity of converting a solution that you have in your mind to a piece of code. Presenting things that I use to solve problems in real life which are "Objects" is the core of the converting process, doing this in C programming language was limited to structs, a data structure to create custom types, but using a class term was a revolution for me, I can define anything I want, declare attributes and even operations, and that is something that you really need as a programmer and as an Android app developer, especially if you are making applications that solves problems or offer services of the user in his daily life.
If we are creating a database for students and we want to define the type student in C, we will define a new type that includes some attributes, like "name", "age", etc :
#include <stdio.h>
// Define the student struct
struct Student {
char name[50];
int age;
float grade;
};
int main() {
// Declare a variable of type 'struct Student'
struct Student student1;
// Assign values to the struct members
strcpy(student1.name, "John Doe");
student1.age = 20;
student1.grade = 85.5;
// Print the student's information
printf("Student Name: %s\n", student1.name);
printf("Student Age: %d\n", student1.age);
printf("Student Grade: %.2f\n", student1.grade);
return 0;
}
In Java and with the OOP principles, we can define a class Student, and declare its attributes as we did in the C example, but we can also add methods or functions that are only related to that class, and we can put all this in one file, which makes it proper and well organized.
public class Student {
// Member variables (fields)
String name;
int age;
double grade;
// Constructor
public Student(String name, int age, double grade) {
this.name = name;
this.age = age;
this.grade = grade;
}
// Display method
public void displayInfo() {
System.out.println("Student Name: " + name);
System.out.println("Student Age: " + age);
System.out.println("Student Grade: " + grade);
}
public static void main(String[] args) {
// Creating an instance of Student
Student student1 = new Student("John Doe", 20, 85.5);
// Displaying student information
student1.displayInfo();
}
}
As I mentioned before, the syntax was never a problem for me, because nowadays there are a lot of strong and smart IDEs that do 90% of your job, like IntelijIDEA which allows you to write the previous Java code in less than 30 seconds.
Is It Important to learn XML before learning Android?
In Android Studio, XML (eXtensible Markup Language) serves as a descriptive markup language used to define the structure and layout of user interfaces, data structures, and configuration settings in Android applications. XML plays a pivotal role in separating the presentation layer from the application logic, enabling developers to create dynamic user interfaces and store structured data. Android's XML-based layout files provide a declarative way to specify the arrangement of widgets, views, and graphical elements within app screens, facilitating responsive and visually appealing user experiences.
Android Studio offers intuitive drag-and-drop interfaces and XML code generation features. This empowers newcomers to create interfaces visually without extensive XML knowledge. While having a basic grasp of XML concepts can help troubleshoot layout issues and customize designs, it's not a prerequisite for starting Android Studio. The development landscape continues to evolve, and Android's adoption of Kotlin as a programming language further diminishes the dependency on XML, as Kotlin enables more concise and readable UI code.
Knowing the basics of XML can be quite beneficial, and it doesn't require a significant time commitment. It's both straightforward and shares similarities with HTML, making it relatively easy to grasp.
Here's an example of what an XML file of a layout looks like in Android Studio:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello, XML!"
android:textSize="18sp"
android:layout_gravity="center_horizontal"/>
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Click Me"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"/>
</LinearLayout>
That's pretty much it.
Conclusion
Android development is not just about code; it's about translating your vision into functional, captivating experiences that users will love. With the right tools, resources, and dedication, you'll find yourself navigating the intricacies of layouts, widgets, and functionality with confidence.
Your journey is just beginning, and the world of Android development offers limitless opportunities to explore, learn, and innovate. Whether you're driven by a passion for technology, a desire to solve problems, or a yearning to shape the future through apps, the knowledge you've gained here will serve as a solid foundation to propel you forward.





