A General Overview of Building All Android Apps: Anyone Can Build an App: Hive Programmers

avatar

Greetings to my favorite science community online, StemSocial.

It's @skyehi and I'm super excited to be back to continue my series on Android App development tutorials for beginners.

In yesterday's blog or tutorial, I walked my readers through the basic steps to building a complete Body Mass Index, BMI calculator and after testing the App everything worked perfectly well.

Since it's getting to the end of one year and the beginning of another, I took sometime after that tutorial to do a little reflection of my progress on this series.

We have come a long way from the beginning and I'm proud of the work and commitment to this series.

For today's blog, I kinda consider it as a bonus episode to the series and a much general tutorial on building Android Apps no matter how complex they may be.

Polish_20231229_144901570.pngOriginal Image Source by kreatikar from Pixabay

YpihifdXP4WNbGMdjw7e3DuhJWBvCw4SfuLZsrnJYHEpsqZFkiGGNCQTayu6EytKdg7zA3LL2PbZxrJGpWk6ZoZvBcJrADNFmaFEHagho8WsASbAA8jrpnELSvRtvjVuMiU1C5ADFX1vJgcpDvNtue9Pq83tjBKX62dqT5UoxtDk.png

As a programmer, there are always a number of common steps to take to develop any Android App.

When a custom presents an App Proposal or you get an App idea, there are actually a number of things to consider which does the same job of leading you to a completed real life working App.

In general the steps are;

  • What's the Purpose of the App or what Service will it provide to users?
  • A Sketched Model of the User Interface
  • Getting the Required tools and softwares to build the actual App
  • Choosing and knowing the programming languages
  • Implementimg the libraries you may need for both frontend design and backend code
  • Adding The Necessary permissions in Android Manifest
  • Working on the Backend or logic of your App

The backend work may include adding library dependencies, connecting the App to a database service like Firebase if the App requires the use of Database and the actual logic of your App

  • Running Tests on the App and checking for errors (Troubleshooting)
  • Testing the User Interface on Different Android Screen size or dimensions
  • Working on App Launcher Icon
  • Build the App on Android Studio and get the Apk or aab file
  • Publishing on Google Play store

2dk2RRM2dZ8gKjXsrozapsD83FxL3Xbyyi5LFttAhrXxr16mCe4arfLHNDdHCBmaJroMz2VbLrf6Rxy9uPQm7Ts7EnXL4nPiXSE5vJWSfR53VcqDUrQD87CZSpt2RKZcmrYrze8KanjkfyS8XmMCcz4p33NZmfHE4S9oRo3wU2.png

Purpose Of the App

The first and obvious thing to consider and really give a thought to is the purpose of the App. That is what the App would be doing for the users.

This is the first thing I believe is necessary to consider and it would include thinking about the features it would have and how it would execute tasks.

If it's a similar App to other Apps on the playstore then you also need to consider which features your App would have that is unique and different which users cannot not get on other similar apps.

The more unique your App is from other similar Apps, the more valuable it would be to the users.

Also this is a great time to think about the name of your App. Since the app would be built on Android Studio from scratch, an App name would be required. That would also automatically generate a package name for your App.

The package name is more like the "ID" of your App on playstore or App stores which distinguishs your App from other Apps.

It's ideal and great advantage for you to come up with very unique, catchy and distinguishing names that would set your App apart from other Apps and that will certainly create some attention to your App.

YpihifdXP4WNbGMdjw7e3DuhJWBvCw4SfuLZsrnJYHEpsqZFkiGGNCQTayu6EytKdg7zA3LL2PbZxrJGpWk6ZoZvBcJrADNFmaFEHagho8WsASbAA8jrpnELSvRtvjVuMiU1C5ADFX1vJgcpDvNtue9Pq83tjBKX62dqT5UoxtDk.png

Sketching A Model

Now guys after you're through with thinking about the purpose of the App and its features, it's time to sketch a model of the user interface.

Every App has two main sides, a frontend end and a backend.

The Frontend is the user interface part of the App that users of your App would see and interact with. we call it frontend because it's the part we see. This part is really crucial and determines a user's opinion about your App.

As a programmer you should always aim at creating very user friendly User Interfaces that makes navigating through your App easy and fun.

This is the time where you consider all the different activities of your App and where the buttons to execute tasks will be placed.

If you get this part right, your App has a 60 percent chance of succeeding.

The rest of the 40 percent would depend on how effective your App is in performing its tasks which is determined by the backend code or logic of your App.

So guys work on a great design model and when you're through with this step, you're ready to start building your App.

YpihifdXP4WNbGMdjw7e3DuhJWBvCw4SfuLZsrnJYHEpsqZFkiGGNCQTayu6EytKdg7zA3LL2PbZxrJGpWk6ZoZvBcJrADNFmaFEHagho8WsASbAA8jrpnELSvRtvjVuMiU1C5ADFX1vJgcpDvNtue9Pq83tjBKX62dqT5UoxtDk.png

Prerequisites

I always put this step as first in my programming tutorial blogs because without getting the required softwares to build your App, you're not going to be able to build anything, period.

Android Studio IDE is the ideal software to use to develop your Apps. Google company is responsible for building this IDE because they are the owners of the Open source Android Operating System which all Android phones use.

To become a better Android App developer, you really need to familiarize yourself with the Android Studio software, know every single tool or feature in the software so you can utilize them to the fullest.

The better you familiarize yourself with the Android Studio IDE, the easier programming would be for you.

Programming Languages

Like I mentioned earlier, every App has two main sides, the frontend design side and the backend end logic side.

Each of these two sides require different programming languages to develop.

For your user interface or frontend design side, you need to familiarize yourself with XML, Extensible MarkUp language.

XML codes look something like this

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello, Android!"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="50dp"/>

    <EditText
        android:id="@+id/editText"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="Enter your text"
        android:layout_below="@id/textView"
        android:layout_marginTop="20dp"
        android:layout_marginHorizontal="16dp"/>

    <Button
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Click me"
        android:layout_below="@id/editText"
        android:layout_marginTop="20dp"
        android:layout_centerHorizontal="true"/>
</RelativeLayout>

The XML code I wrote above is a simple design which would create a layout that would include a TextView, a Button, and an EditText .

If you want an exclusive tutorial of this language as we go on in our series please let me know in the comments.

Now for the backend or main logic code of your App, you would need to familiarize yourselve with Java programming.

Speaking of Java programming, you would need to ensure that Java Development Kit, JDK software is properly installed on your PC.

The JDK Software is very important for your PC to be able to understand and execute instructions in Java language.

I made a tutorial some days ago about to how properly install JDK so the can totally check it our or comment down below if you're having troubles with it.

Now there is a new programming language that was introduced some years ago called Kotlin. It's meant to be an upgrade of Java programming language and using Kotlin has great advantages.

One of them is that you get less bugs in your App

However I would always recommend studying Java before Kotlin if you're a newcomer.

Here's an example of how the Java backend code for the frontend code we wrote above would look like

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    private TextView textView;
    private EditText editText;
    private Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        textView = findViewById(R.id.textView);
        editText = findViewById(R.id.editText);
        button = findViewById(R.id.button);

        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                String userInput = editText.getText().toString();
                textView.setText("Hello, " + userInput + "!");
            }
        });
    }
}

Trust me guys it's not that hard to learn, to be honest it's kinda fun and if you love math, you'll totally find this very easy.

YpihifdXP4WNbGMdjw7e3DuhJWBvCw4SfuLZsrnJYHEpsqZFkiGGNCQTayu6EytKdg7zA3LL2PbZxrJGpWk6ZoZvBcJrADNFmaFEHagho8WsASbAA8jrpnELSvRtvjVuMiU1C5ADFX1vJgcpDvNtue9Pq83tjBKX62dqT5UoxtDk.png

Adding Library Dependencies

Now sometimes you may be creating an App and would need to include special features that were not inbuilt in Android Studio.

All features or functions would require their very own libraries. As a programmer you need to be well-versed in different libraries and how to effectively implement them into any App you're building.

Mostly the libraries are implemented in the Gradle file of your Android Studio project.

To implement a library in your project you need to add what we call library dependencies which would execute a download task on Android Studio for Android Studio to download all the libraries files that would allow you to implement those awesome features in your App.

Let's take an example of that shall we. Let's say you plan on implementing admob feature in your App so that your App can show ads and generate money from ads revenue, you're going to have to include the Google ads dependency to your Gradle file.

That dependency code would look like this

dependencies {
    // Other dependencies...

    implementation 'com.google.android.gms:play-services-ads:20.6.0'
}

Of course there are other things you would need to do to complete the process but that's how the library or dependency would look like.

After adding the line of code, you can press the "Sync" button and Android studio will start the work of downloading the library files to your project.

YpihifdXP4WNbGMdjw7e3DuhJWBvCw4SfuLZsrnJYHEpsqZFkiGGNCQTayu6EytKdg7zA3LL2PbZxrJGpWk6ZoZvBcJrADNFmaFEHagho8WsASbAA8jrpnELSvRtvjVuMiU1C5ADFX1vJgcpDvNtue9Pq83tjBKX62dqT5UoxtDk.png

Requesting Permissions

Now guys, in programming, your App may require to use some devices services like the internet, the camera, the call service, the alarm, notifications and storage services to mention a few.

In order for your App to be able to access these services, we need to write permission request codes inside the AndroidManifest file.

I would recommend that you do this step first before writing the logic of your App to avoid forgetting to add it.

Avoiding this step could lead to your App not being able to access the services which means it may not be able to function.

Here's an example of how permission request codes are written in Android Manifest

<uses-permission android:name="android.permission.INTERNET" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Running Tests

Throughout your App development process, always keep testing and running the App whenever you add a new feature.

Check for bugs, errors and glitches. Error handling is a very important part of building Apps. Users usually get fraustrated and disappointed with Apps when they encounter strange errors.

It's usually a sign that the App is not a quality App.

Always create good error handling activities rather than leaving weird and strange codes to show when the user encounters an error.

Check every single feature on different Android devices using different emulators or if you happen to have access to different physical Android devices, test you App on all of them.

Try every button you created and every logic code you wrote to ensure that none of them leads to an App crash.

App Launcher Icon

When you're satisfied with the entire App frontend and backend design, it's time to work on a really important part, the App Launcher Icon.

This is the Icon people click on to open your App. The icon and name of your App play a huge role in determining whether a user will attempt downloading your App or not.

Always go for simple yet attractive designs. Your App name must be very catchy. Getting this right is going to be your best marketing stunt on the Google App store.

Preparing Your App For Publishing

Well after getting all these steps in place, you have a fully functional App that's ready to be published on the Google Play store.

There's a format in which your App will be distributed and it's called APK or aab. Nowadays, the Google Play Store platform prefers aab Android app files so go ahead and build your App and create an aab file of the app.

I'll take a special day to create an extensive blog on how to do that.

2dk2RRM2dZ8gKjXsrozapsD83FxL3Xbyyi5LFttAhrXxr16mCe4arfLHNDdHCBmaJroMz2VbLrf6Rxy9uPQm7Ts7EnXL4nPiXSE5vJWSfR53VcqDUrQD87CZSpt2RKZcmrYrze8KanjkfyS8XmMCcz4p33NZmfHE4S9oRo3wU2.png

Congratulations guys, these are the general steps you would take to build just about any Android App.

Of course, complex gaming Android Apps take a much different approach and even uses different softwares for developing with "Unity Game Engine" being one of the most popular.

Thank you so much for taking the time to read today's blog. I hope you enjoyed this episode. The new year will come with fresh new episodes for everyone so stay tuned to this series guys.

Speaking of games, comment down below if you want us to start working in some games guys.

Have a Great Day and catch you next time on StemSocial. Goodbye 👨‍💻


You Can Follow Me @skyehi For More Like This And Others



0
0
0.000
1 comments
avatar

Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

Thanks for including @stemsocial as a beneficiary, which gives you stronger support. 
 

0
0
0.000