Income Expenses Tracker
Income Expenses Tracker
LAB REPORT
ON
MOBILE PROGRAMMING
The main aim of this project is to keep the record of daily income and
expenses and calculate the balance amount.
ACKNOWLEDGEMENT
The successful completion of this study is a culmination of so many people
lending their hands and minds. Though it would not be possible to
acknowledge everyone in their names, out here, we would like to take the
privilege to pay our gratitude to each and every individual associated
directly or indirectly with this study.
Foremost, it was an honor and great privilege to conduct this study under the
guidance of Mr. Ramesh Nagal, Software Engineer. We are grateful to him
for his invaluable support, suggestions and guidance throughout the study.
TABLE OF CONTENTS
1. INTRODUCTION
2. PURPOSE OF PROJECT
3. IMPLEMENTATION
3.1 INTRODUCTION TO MOBILE PROGRAMMING
3.2 ANDRIOD PLATFORM
3.3 HARDWARE REQUIREMENTS
3.4 FUNCTIONAL REQUIREMENTS
3.5 TECHNOLOGY USED
3.6 SOURCE CODE
4. SCREENSHOTS
5. CONCLUSION
6. REFERENCES
1. INTRODUCTION
The income and Expenses Tracker Android App is a mini project aimed at developing a
mobile application that helps users to track their income and expenses.
2. PURPOSE OF PROJECT
3. IMPLEMENTATION
System implementation specifies how the system is operated and maintained. It also
ensures that the system meets the quality standards. System implementation is the test
program that exercises the complete system in its actual environment to determine its
capabilities and limitations which also demonstrates that the system is functionally
operative, and is compatible with the other subsystems and supporting elements required
for its operational deployment.
3.1 Introduction to Mobile Programming:
There are two dominant platforms in the modern smartphone market. One is the iOS
platform from Apple Inc. The iOS platform is the operating system that powers Apple's
popular line of iPhone smartphones. The second is Android from Google. The Android
operating system is used not only by Google devices but also by many other OEMs to
build their own smartphones and other smart devices. An original equipment
manufacturer (OEM) is a company that produces parts and equipment that may be
marketed by another manufacturer.
There are several languages used for mobile programming. Languages like Java, Kotlin,
C#, Python etc. are popular for android platform and Objective-C, Swift etc. are popular
languages for iOS platform. Programmers can select any of the language of their choice
for writing mobile programs.
There are four major development approaches when building mobile applications:
• Native Mobile Applications
• Cross-Platform Native Mobile Applications
• Hybrid Mobile Applications
• Progressive Web Applications
Native Applications
Native mobile applications are written in the programming language and frameworks
provided by the platform owner and running directly on the operating system of the
device such as iOS and Android.
Cross-Platform Applications
Cross-platform native mobile applications can be written in variety of different
programming languages and frameworks, but they are compiled into a native application
running directly on the operating system of the device.
Hybrid-Web Applications
Hybrid mobile applications are built with standard web technologies - such as JavaScript,
CSS, and HTML5 - and they are bundled as app installation packages. Contrary to the
native apps, hybrid apps work on a 'web container' which provides a browser runtime and
a bridge for native device APIs via Apache Cordova.
• The mobile front-end is the visual and interactive part of the application the user
experiences. It usually resides on the device, or there is at least an icon representing the
app that is visible on the home screen or is pinned in the application catlog of the device.
The application can be downloaded from the platform app store, side-loaded directly
onto the device, or can be reached through the device’s browser.
• Regardless of what front-end platform or development methodology is being used,
delivering high-quality mobile applications that delight and retain users requires reliable
back-end services.
• Given the critical importance of back-end services for the success of the mobile
application, the developers have several important architectural decisions that they must
consider. These decisions include which services should they build themselves and
which third party services should they leverage, and then should they run and maintain
their own services or should they take advantage of 3rd party services.
Android is a mobile operating system currently developed by Google, based on the Linux
kernel and designed primarily for touchscreen mobile devices such as smartphones and
tablets. And as we said before, Android offers a unified approach to application
development for mobile devices.
Android is an open-source operating system named Android. Google has made the code
for all the low-level "stuff" as well as the needed middleware to power and use an
electronic device, and gave Android freely to anyone who wants to write code and build
the operating system from it. There is even a full application framework included, so
third-party apps can be built and installed, then made available for the user to run as they
like.
The "proper" name for this is the Android Open Source Project, and this is what people
mean when they say things like Android is open and free. Android, in this iteration, is
free for anyone to use as they like.
Environment Setup
In order to write an Android application, we are going to need a development
environment.
Google has made a very useful tool for all Android Developers, the Android Studio.
Android Studio is the official IDE for Android development, and with a single download
includes everything you need to begin developing Android apps.
Included in the download kit, are the Software Development Kit (SDK), with all the
Android libraries we may need, and the infrastructure to download the many Android
emulator instances, so that we can initially run our application, without needing a real
device. So, we are going to download and install Android Studio.
Dashboard
activity_main.xml
<?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:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Dashboard"
android:textSize="20sp"
android:id="@+id/dashboard"
android:layout_margin="10dp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:weightSum="2"
android:id="@+id/linear1"
android:layout_margin="10dp"
android:layout_below="@+id/dashboard"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_weight="1"
android:background="#FF69B4"
android:orientation="vertical"
android:padding="5dp"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textSize="18sp"
android:textStyle="bold"
android:text="Today's Income" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/txtIncome"
android:layout_gravity="center"
android:textSize="18sp"
android:text="0" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:background="#FA8072"
android:layout_marginLeft="10dp"
android:padding="5dp"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textSize="18sp"
android:textStyle="bold"
android:text="Today's Expenses" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/txtExpenses"
android:layout_gravity="center"
android:textSize="18sp"
android:text="0" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:weightSum="2"
android:id="@+id/linear2"
android:layout_margin="10dp"
android:layout_below="@+id/linear1"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_weight="1"
android:background="#F4A460"
android:orientation="vertical"
android:padding="10dp"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textSize="18sp"
android:textStyle="bold"
android:text="Today's Balance" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/txtBalance"
android:layout_gravity="center"
android:textSize="18sp"
android:text="0" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:background="#DA70D6"
android:layout_marginLeft="10dp"
android:padding="10dp"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textSize="18sp"
android:textStyle="bold"
android:gravity="center"
android:id="@+id/txtDetails"
android:padding="1dp"
android:lines="2"
android:text="View Today's Details" />
</LinearLayout>
</LinearLayout>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Enter Income/Expenses"
android:textAllCaps="false"
android:textSize="18sp"
android:layout_below="@+id/linear2"
android:layout_margin="10dp"
android:id="@+id/btnEntry"
android:background="#9370DB"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Date Wise Report"
android:textAllCaps="false"
android:textSize="18sp"
android:layout_below="@+id/btnEntry"
android:layout_margin="10dp"
android:id="@+id/btnReport"
android:background="#4682B4"/>
</RelativeLayout>
MainActivity.java
package com.example.project;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import java.text.SimpleDateFormat;
import java.util.Date;
TextView txtIncome,txtExpenses,txtBalance,txtDetails;
Button btnEntry,btnReport;
MyDatabase myDatabase;
Cursor cursor;
@Override
protected void onCreate(Bundle b){
super.onCreate(b);
setContentView(R.layout.activity_main);
txtIncome=findViewById(R.id.txtIncome);
txtExpenses=findViewById(R.id.txtExpenses);
txtBalance=findViewById(R.id.txtBalance);
txtDetails=findViewById(R.id.txtDetails);
btnEntry=findViewById(R.id.btnEntry);
btnReport=findViewById(R.id.btnReport);
myDatabase=new MyDatabase(this);
btnEntry.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent=new Intent(MainActivity.this,
DataEntry.class);
startActivity(intent);
}
});
txtDetails.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent=new Intent(MainActivity.this,
TodayDetails.class);
startActivity(intent);
}
});
btnReport.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent=new Intent(MainActivity.this,
DateWiseReport.class);
startActivity(intent);
}
});
}
@Override
protected void onResume(){
super.onResume();
//displaying data of current date
loadData();
}
public void loadData(){
cursor=myDatabase.selectData(getCurrentDate());
int income=0,expenses=0,balance=0;
while (cursor.moveToNext()){
income+=cursor.getInt(2);
expenses+=cursor.getInt(3);
}
balance=income-expenses;
txtIncome.setText(income+"");
txtExpenses.setText(expenses+"");
txtBalance.setText(balance+"");
}
public static String getCurrentDate(){
//current date
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date date = new Date();
String dat=formatter.format(date);
return dat;
}
}
Data Entry
data_entry.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Date"
android:id="@+id/edtDate"
android:inputType="date"
android:layout_margin="10dp" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:entries="@array/title"
android:id="@+id/spTitle" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Amount"
android:id="@+id/edtAmount"
android:inputType="number"
android:layout_margin="10dp" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="Submit"
android:id="@+id/btnSubmit"/>
</LinearLayout>
DataEntry.java
package com.example.project;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
Database
MyDatabase.java
package com.example.project;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
list_items.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:id="@+id/relat"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Date: 2020-04-03"
android:layout_margin="10dp"
android:id="@+id/txtDate"
android:textStyle="bold"
android:textSize="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Income: 20000"
android:layout_margin="10dp"
android:id="@+id/txtIncome"
android:textStyle="bold"
android:layout_toRightOf="@+id/txtDate"
android:textColor="#3F51B5"
android:visibility="gone"
android:textSize="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Expenses: 10000"
android:layout_margin="10dp"
android:id="@+id/txtExpenses"
android:textStyle="bold"
android:layout_toRightOf="@+id/txtDate"
android:textColor="#FF4081"
android:visibility="gone"
android:textSize="18sp" />
</RelativeLayout>
DataModel.java
package com.example.project;
public class DataModel {
private int id;
private String date;
private int income;
private int expenses;
public DataModel(int id,String date,int income,int expenses){
this.id=id;
this.date=date;
this.income=income;
this.expenses=expenses;
}
public int getId(){
return id;
}
public String getDate(){
return date;
}
public int getIncome(){
return income;
}
public int getExpenses(){
return expenses;
}}
RecyclerViewAdapter.java
package com.example.project;
import android.app.Activity;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
TodayDetails.java
package com.example.project;
import android.database.Cursor;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
DateWiseReport.java
package com.example.project;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
Modifying Data
modify_details.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Date"
android:id="@+id/edtDate"
android:inputType="date"
android:layout_margin="10dp" />
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:entries="@array/title"
android:id="@+id/spTitle" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Amount"
android:id="@+id/edtAmount"
android:inputType="number"
android:layout_margin="10dp" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="Update"
android:id="@+id/btnUpdate"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="Delete"
android:id="@+id/btnDelete"/>
</LinearLayout>
ModifyDetails.java
package com.example.project;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
Manifest File
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.Project"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</manifest>
4. SCREENSHOTS
Home Screen
Data Entry Screen
Today's Details Screen
Date Wise Report Screen
Modify Details Screen
5. CONCLUSION
The Income and Expenses Tracker Android App mini project aimed to provide a user-
friendly solution for tracking income and expenses. The app successfully implemented
the core features, allowing users to keep the record of the daily income and expenses
efficiently. It provides a visually appealing user interface, generates reports of data wise
income and expenses.
6. REFERENCES
[2] https://drive.google.com/file/d/1ptyptocCMCw32nIr7tqx3jfR4EPbzEue/view
[3] https://www.youtube.com/watch?v=PmiSj2QGZVM