Mad Microproject

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

VIDYAVARDHINI’S BHAUSAHEB VARTAK

POLYTECHNIC, VASAI ROAD WEST

MICRO PROJECT

Academic year: 2023-2024

TITLE OF PROJECT: ALARM CLOCK

Program: Computer Engineering (CO) Semester: Sixth

Course: Mobile Application Development Code: 22617

Name: Ritu Rajendra Kamble, Nilakshi Naresh Kudu,

Jagruti Mahesh Chavan, Jill Hitesh Machhi

Roll No: 1864,1865,1866,1868

Enrolment No: 2200930323, 2200930325, 2200930326, 2200930330

Name of faculty: Prof. Rajesh Garud


MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

Certificate

This is to certify that Mr. /Ms Ritu Rajendra Kamble, Nilakshi Naresh Kudu,
Jagruti Mahesh Chavan, Jill Hitesh Machhi of FIFTH Semester of Diploma
in Computer Engineering.

Institute, B. V. POLYTECHNIC (Code: 0093) has completed the Micro


Project satisfactorily in Subject – Mobile Application Development (22617)
for the academic year 2023- 2024 as prescribed in the curriculum.

Place: Vasai Enrolment No: 2200930323,25,26,30

Date: …………… Exam Seat No: ……………………..

Subject Teacher Head of the Department Principal

SEAL OF
INSTITUTE
Part A: Micro Project Proposal

1.0 Aim/Benefits of the Micro-Project:

The aim of this microproject is to develop a functional alarm clock application for mobile
devices using Android platform. It covers fundamental concepts of Android app development
such as user interface design, event handling, notifications, and background services.
Additionally, it allows students to apply their knowledge of Java programming language within
the context of mobile application development.

2.0 Course Outcomes integrated:


1. Gain practical experience in developing mobile applications using Android.
2. Understand the concepts of user interface design, event handling, and notifications
in mobile app development.
3. Learn about the implementation of background services for alarm functionalities.
4. Enhance their skills in debugging and troubleshooting Android applications.
3.0 Proposed Methodology:

1. Literature Review
2. Data Collection
3. Requirements Gathering
4. Implementation
5. Testing and Debugging
6. Documentation
7. Iteration and Feedback
4.0 Action Plan

Sr. Details of the activity Planned Planned Name of


Start date Members
No. Finish date
1 Formation of Group & Topic Selection 01-02-2024 02-02-2024 All members
2 Submission of Proposed Plan 05-02-2024 08-02-2024 All members
3 Preparation of Report 09-02-2024 20-02-2024 All members
4 Final valuation of a working Report 25-02-2024 01-03-2024 All members
5 Presentation of Report 05-03-2024 07-03-2024 All members
6 Submission of Final Report 15-03-2024 15-03-2024 All members
5.0 Resource Required:

Sr. Name of Specifications Qty Remarks


No. resources/Material
1. Computer System I5 processor ,2GBRAM 1
2. Microsoft Word -
3. Operating System Windows7(For practical Study)

4. Printer Hp Laser Jet 1


5. Browser Support Support Google Chrome (for data
analysis)

6.0 Name of Team Members with Roll No:

Sr Roll Name of Students Process and Individual Total


No. No. Product
Assessment Presentation (10)

(06) (04)

1 1864 Ritu Rajendra Kamble

2 1865 Nilakshi Naresh Kudu

3 1866 Jagruti Mahesh Chavan

4 1866 Jill Hitesh Machhi

Name & Signature of Faculty: Prof. Rajesh Garud


Title: ALARM CLOCK
Rationale:
Developing an alarm clock application provides students with a hands-on experience in
building a real-world utility application. It covers fundamental concepts of Android app
development such as user interface design, event handling, notifications, and background
services. Additionally, it allows students to apply their knowledge of Java programming
language within the context of mobile application development.

Course Outcomes Integrated:


1 Gain practical experience in developing mobile applications using Android.
2 Understand the concepts of user interface design, event handling, and notifications in
mobile app development.
3 Learn about the implementation of background services for alarm functionalities.
4 Enhance their skills in debugging and troubleshooting Android applications.

Actual Procedure Followed:


1. Introduction and Permission
2. Literature Review
3. Data Collection
4. Requirements Gathering
5. Implementation
6. Testing and Debugging
7. Documentation
8. Iteration and Feedback

4.0: Actual Resources Required:


Sr. Name of Specifications Qty Remarks
No. resources/Material
1. Computer System I5 processor ,2GBRAM 1
2. Microsoft Word -
3. Operating System Windows7(For practical Study)
4. Printer Hp Laser Jet 1
5. Browser Support Support Google Chrome (for data
analysis)
Rubrics for Assessment of Micro-Project
Title: ALARM CLOCK
Institute Code: 0093 Academic year: 2023-24
Program: Computer Engineering Course & Code: MAD (22617)
Name of Candidate: Roll No: 1864,65,66,68
Semester: Sixth Name of Faculty: Prof. Rajesh Garud

Sr. Characteristic to be Assessed Poor Average Good Excellent


No. (Marks 1-3) (Marks 4-5) (Marks 6-8) (Marks 9-10)

1. Relevance to the Course

2. Literature Survey/Information
Collection

3. Project Proposal

4. Completion of the Target as per Project


Proposal

5. Analysis of Data and Representation

6. Quality of Prototype/Model

7. Report Preparation

8. Presentation

9. Viva
Micro-Project Evaluation Sheet
Title: ALARM CLOCK
Institute Code: 0093 Academic year: 2023-24
Program: Computer Engineering Course & Code: MAD (22617)
Name of Candidate: Roll No: 1864,65,66,68
Semester: Sixth Name of Faculty: Prof. Rajesh Garud

Course Outcomes Achieved:


1 Gain practical experience in developing mobile applications using Android.
2 Understand the concepts of user interface design, event handling, and
notifications in mobile app development.
3 Learn about the implementation of background services for alarm
functionalities.

Evaluation as per Suggested Rubric for Assessment of Micro Project


Sr. Characteristic to be assessed Poor Average Good Excellent Sub
No. Marks Marks Marks Marks Total
1-3 4-5 6-8 9-10

(A) Process and product assessment Out Of 6

1 Relevance to the course

2 Literature Survey Information Collection .

3 Completion of the Target as per project


proposal

4 Analysis of Data and representation

5 Quality of Prototype/Model/Content

6 Report Preparation

(B) Individual Presentation/Viva Out of 4

7 Presentation .

8 Viva

Name and designation of the Faculty Member: Prof. Rajesh Garud


WEEKLY ACTIVITY SHEET

Title: ALARM CLOCK


Institute Code: 0093 Academic year: 2023-24
Program: Computer Engineering Course & Code: MAD (22617)
Name of Candidate: Roll No: 1864,65,66,68
Semester: Sixth Name of Faculty: Prof. Rajesh Garud

SR. WEEK ACTIVITY PERFORMED


NO
1. 1st Week Discussion and Finalization of Topic

2. 2nd Week Literature Review

3. 3rd Week Submission of Proposed Plan

4 4th Week Information Collection

5. 5th Week Analysis of Data

6. 6th Week Compilation of content

7. 7th Week Editing and Revising the Content

8. 8th Week Report Preparation

9. 9th Week Report Preparation

10. 10th - 12th Week Submission


INDEX:

Sr. No. Content Page No.

1 Introduction 1

2 Technical Requirement 2

3 User Interface Design 3-4

4 Implementation: Code 5-7

5 Output 8

6 Conclusion 9

7 References 10
1. Introduction
The ubiquity of smartphones has made them an indispensable part of our lives, serving as not
just communication devices but also as powerful tools for productivity and utility. Among the
myriad of functionalities, alarm clock applications stand out as one of the most essential and
frequently used features. These applications help users manage their schedules, ensure timely
wake-ups, and stay organized throughout the day.
In the realm of mobile application development, creating an alarm clock application offers a
rich learning experience. It delves into various aspects of software development, including user
interface design, event handling, background services, and notifications. Moreover, it provides
an opportunity to apply core programming concepts within the context of mobile platforms.
This microproject aims to guide students through the process of developing a functional alarm
clock application for Android devices. By undertaking this project, students will gain practical
insights into mobile app development while honing their skills in Java programming and
Android framework usage.
Throughout this microproject, we will explore the intricacies of designing an intuitive user
interface, implementing alarm functionalities, managing background services, and ensuring
seamless user experience. By the end, students will not only have a fully functional alarm clock
application but also a deeper understanding of mobile application development principles and
practices.
Join us on this journey as we embark on the exciting adventure of building an alarm clock
application that combines functionality with elegance, tailored for the modern mobile user.

1
2. Technical Requirement
Before diving into the development process of the alarm clock application, it's essential to
ensure that the necessary software and hardware requirements are met. Here's an overview of
the technical requirements for this microproject:

1. Development Environment:

- Android Studio: The official integrated development environment (IDE) for Android app
development. It provides tools for designing layouts, writing code, debugging, and more.

- Java Development Kit (JDK): Android apps are primarily written in Java, so the JDK is
required for compiling Java code.
- SDK Platforms: Android Studio requires specific SDK platforms and tools for compiling
and testing Android applications. Ensure that the necessary SDK components are installed
through the SDK Manager.

2. Hardware Requirements:
- Computer: A desktop or laptop computer capable of running Android Studio and
emulators.
- Android Device (Optional): While Android emulators can be used for testing, having a
physical Android device for testing real-world scenarios is beneficial. Ensure that the device
supports the minimum Android version targeted by the application.

3. Operating System Compatibility:


- Android Studio is compatible with Windows, macOS, and Linux operating systems. Ensure
that the development environment is installed on a supported operating system.

4. Internet Connection:
- An internet connection is required for downloading necessary dependencies, SDK
components, and updates within Android Studio.

5. Version Control (Optional but Recommended):


- Using version control software such as Git is recommended for managing project files,
tracking changes, and collaborating with team members if applicable.

2
3. User Interface Design
The user interface (UI) design plays a crucial role in the success of any mobile application,
including alarm clock apps. A well-designed UI not only enhances the aesthetic appeal of the
app but also improves usability and user experience. Here's an overview of the user interface
design considerations for the alarm clock application:
xml files:
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">
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<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:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AlarmClock"
tools:targetApi="31">
<activity
android:name=".NotificationActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


</intent-filter>

<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<receiver android:name=".AlarmReceiver"/>
</application>

</manifest>

activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center_vertical"
android:background="@drawable/alarm"

3
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Select\nTime"
android:id="@+id/selectTime"
android:textSize="40sp"
android:layout_marginTop="280dp"
android:layout_gravity="center_horizontal"
android:textColor="@color/white"
android:textAlignment="center"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:layout_width="150dp"
android:layout_height="wrap_content"
android:id="@+id/setAlarm"
android:text="Set \nAlarm"
android:textSize="20sp"
android:padding="8dp"
android:layout_marginStart="40dp"
android:layout_marginTop="250dp"/>
<Button
android:layout_width="150dp"
android:layout_height="wrap_content"
android:id="@+id/cancelAlarm"
android:text="Cancel \nAlarm"
android:textSize="20sp"
android:padding="8dp"
android:layout_alignParentEnd="true"
android:layout_marginTop="250dp"
android:layout_marginEnd="40dp"/>
</RelativeLayout>
</LinearLayout>

activity_notifications.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".NotificationActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Welcome to \nNotification Activity"
android:textSize="36sp"
android:textAlignment="center"
android:textColor="@color/lavender"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

4
4. Implementation: Code
To implement the user interface design for the alarm clock application in Android, you'll need
to work with XML layout files and possibly Java code for dynamic interactions. Below are
snippets demonstrating how to create some of the key UI components mentioned earlier. Note
that this is a simplified example, and you'll need to integrate it into your project according to
your specific requirements.
java files:
MainActivity.java
package com.example.microproject;

import android.app.AlarmManager;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.example.microproject.databinding.ActivityMainBinding;
import com.google.android.material.timepicker.MaterialTimePicker;
import com.google.android.material.timepicker.TimeFormat;

import java.util.Calendar;

public class MainActivity extends AppCompatActivity {

private ActivityMainBinding binding;


private MaterialTimePicker timePicker;
private Calendar calendar;
private AlarmManager alarmManager;
private PendingIntent pendingIntent;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityMainBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());

createNotificationChannel();

binding.selectTime.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
timePicker = new MaterialTimePicker.Builder()
.setTimeFormat(TimeFormat.CLOCK_12H)
.setHour(12)
.setMinute(0)
.setTitleText("Select Alarm Time")
.build();

timePicker.show(getSupportFragmentManager(), "microproject");
timePicker.addOnPositiveButtonClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {
if (timePicker.getHour() > 12){
binding.selectTime.setText(
String.format("%02d",(timePicker.getHour()-12))
+":"+ String.format("%02d", timePicker.getMinute())+"PM"

5
);
} else {
binding.selectTime.setText(timePicker.getHour()+":" +
timePicker.getMinute()+ "AM");
}
calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY, timePicker.getHour());
calendar.set(Calendar.MINUTE, timePicker.getMinute());
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
}
});
}
});

binding.setAlarm.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
alarmManager = (AlarmManager)
getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(MainActivity.this,
NotificationActivity.class);
pendingIntent = PendingIntent.getBroadcast(MainActivity.this, 0,
intent, PendingIntent.FLAG_IMMUTABLE);

alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP,
calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent);
Toast.makeText(MainActivity.this, "Alarm Set",
Toast.LENGTH_SHORT).show();
}
});

binding.cancelAlarm.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(MainActivity.this,
NotificationActivity.class);
// pendingIntent = PendingIntent.getBroadcast(MainActivity.this, 0,
intent, 0);

if (alarmManager == null){
alarmManager = (AlarmManager)
getSystemService(Context.ALARM_SERVICE);
}
alarmManager.cancel(pendingIntent);
Toast.makeText(MainActivity.this, "Alarm Canceled",
Toast.LENGTH_SHORT).show();
}
});

private void createNotificationChannel(){


if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){
CharSequence name = "Jagruti";
String desc = "Channel for Alarm Manager";
int imp = NotificationManager.IMPORTANCE_HIGH;
NotificationChannel channel = new NotificationChannel("microproject",
name, imp);
channel.setDescription(desc);

NotificationManager notificationManager =
getSystemService(NotificationManager.class);
notificationManager.createNotificationChannel(channel);
}
}
}

6
NotificationActivity.java
package com.example.microproject;

import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;

import androidx.core.app.ActivityCompat;
import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat;

public class NotificationActivity extends BroadcastReceiver {


@Override
public void onReceive(Context context, Intent intent) {

Intent nextActivity = new Intent(context, NotificationActivity.class);


intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_CLEAR_TASK);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,
nextActivity, PendingIntent.FLAG_IMMUTABLE);

NotificationCompat.Builder builder = new


NotificationCompat.Builder(context, "microproject")
.setSmallIcon(R.drawable.baseline_notifications_24)
.setContentTitle("Reminder")
.setContentText("It's time to wake up")
.setAutoCancel(true)
.setDefaults(NotificationCompat.DEFAULT_ALL)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setContentIntent(pendingIntent);

NotificationManagerCompat notificationManagerCompat =
NotificationManagerCompat.from(context);
if (ActivityCompat.checkSelfPermission(context,
android.Manifest.permission.POST_NOTIFICATIONS) !=
PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[]
permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the
documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
notificationManagerCompat.notify(123, builder.build());
}
}

7
5. Output

8
6. Conclusion
In conclusion, the development of the alarm clock application has been a rewarding journey in
the field of mobile application development. This project has provided valuable insights into
the intricacies of designing and implementing user-centric solutions for everyday challenges.
Through careful planning and execution, the project has successfully delivered an intuitive and
functional alarm clock application for Android devices. By leveraging Android's rich set of
tools and libraries, we've created an application that simplifies the process of setting and
managing alarms, enhancing user productivity and convenience.
The project's focus on usability and reliability has been paramount. By incorporating features
such as a user-friendly interface and timely notifications, we've ensured that users can rely on
the application to fulfill their alarm needs consistently.
Looking ahead, there are numerous opportunities for further refinement and expansion of the
application. Future iterations could explore enhancements such as customizable alarm tones,
advanced scheduling options, and integration with other productivity tools to offer a
comprehensive alarm management experience.
Overall, the alarm clock project underscores the potential of mobile applications to address
real-world needs effectively. It serves as a testament to the power of innovation and
collaboration in creating solutions that improve the daily lives of users.

9
7. Reference

1. https://androidknowledge.com/

2. https://chat.openai.com/

3. https://www.google.com/

4. https://developer.android.com/

10

You might also like