Mobile_ICP_08: Android Studio - acikgozmehmet/Web-Mobile_Programming GitHub Wiki

Name: Mehmet Acikgoz

Student Id: 01

Lesson Overview:

Basics of Android Programming

Android is a mobile platform/OS that uses a modified version of the Linux kernel. It was initially developed by Android Inc., a firm later purchased by Google. It allows developers to write managed code in the Java language, controlling the device via Google-developed Java libraries. Today, we will learn how to create, build, run, and debug an Android Studio program.

More info

ICP Plan

Simple Login: Create a basic login application

The source code for the same is here in compressed format.

Please find the source code in here

Find below the "Main activity" which contains the input fields for credentials and login button, It performs in the following way:

  • Extracts the username and password the user credentials and checks if they are equal to the hard-coded ones in the code.

  • If the inputs are empty, a message to enter the username or password is seen on the screen.

  • If the user tries to login with wrong credentials, a message with the number of tries is seen on the screen until the 3rd attempt. After the 3rd attempt, the login button is disabled.

  • If the user provides right details, the login button is redirected to the HomePageActivity in which a welcome message and Logout button are seen.

  • If the user clicks on the logout button, it redirects to the Login page.

Find below the screenshot for the MainActivity for the application.

Here we see the Login page of the application in which username and password are asked to the user.

When wrong credentials are entered, the number of incorrect entries are seen on the screen.

When wrong credentials are entered 3rd times, the login button is disabled.

When the correct credentials are entered and login button is pressed, we see the next page which is HomePage

We see the homepage

When the logout button is clicked, it redirects to the main page.

We see are back to the first page.