Android App for E Vaccination

In this tutorial, you will understand how to build a basic e vaccination app using Android Studio.

What is an E-Vaccination App?

This app is an e-vaccination app. It contains all the information on all the vaccines that children and adults should get. It reminds the user to get vaccinated and when to get the next vaccine. This app will help the user to remind him and keep him updated about his vaccines.

The Flow of the Application

There is a home screen. This screen contains all the vaccines that children and adults should get. You can click on any vaccine to get more information about it. This app will store your data in your local storage so that your data is secure. The app will tell you what is the number of doses of vaccine that you should get. This app will automatically tell you the number of days left for your next vaccine.

Features of the E-vaccination app

1. No login signup required

2. Data Security

3. It contains all the vaccines that must be taken by children and adults

4. It will tell you the details of the vaccine.

5. It will also tell you the number of doses that you should get of the particular vaccine.

6. It will also tell you the number of days left for the next vaccine.

Project Prerequisites

The workings of Android Studio should be understood if you are familiar with it. This project requires the following technologies and tools.

  • Java – We use Java to write the application logic.
  • XML – A markup language used to design applications.
  • Android Studio – It is a toolkit that makes it possible for us to build our own Android apps.

Developing the Android E-Vaccination app

Let’s look at the files that we created for the e-vaccination app before we implement it.

1. Activity_main.xml is the file that contains the design of our dashboard.

2. There is a MainActivity.java which file will handle the actions of the above file.

3. After this, we have to create some more Activities files to show the details of each vaccination and corresponding java files for handling their logic.

4. We will use the following files:

  • Color.xml: Defines the colors of our application.
  • Theme.xml: Defines how our application looks.

Files Required

Activity_main.xml :

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/darker_grey"
    tools:context=".MainActivity">

    <RelativeLayout
        android:id="@+id/ll_appBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/background4"
        android:padding="16dp">

        <TextView
            android:id="@+id/tv_restAppBar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="TechVidvan vaccines list"
            android:textColor="@color/white"
            android:textSize="24sp"
            android:textStyle="bold" />

The above code will be used to design the text view of the main file. The design is basically what you will be seeing on the screen.

Activity_main.java :

        btn_vac1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this, vac1.class));
            }
        });

The code written above will take you to their particular activities. This code will start an intent to basically take you to their particular screens.

Download Android E Vaccine App Project Source Code

Download the source code of e vaccination project from the following link: Android E-vaccine Project

Once you have downloaded the TechVidvan E-Vaccination project, you need to extract the source code.

Steps to implement the Project:

Android E-Vaccination App can be implemented by downloading the source code and following each step listed below.

1. Obtain the source code by unzipping it to your desktop.

2. Then, Open android studio and then the app in the folder where it was unzipped.

3. The top of the page will have a green run button. Click this to launch the application.

Android E-Vaccination App Output

The application will look like this.

All the vaccines

android e vaccination app output

Details after getting dose 1 and no of days left for next dose = 28

after getting one vaccine dose

Summary

This article helps you understand how the e-vaccination app works. This will give you a basic idea of how to build a basic e-vaccination app. You can also add even more features to this like adding more vaccines, real-time location, etc.