Anddd
Anddd
Aim :- To install Android Studio (Ladybug version) and set up the development
environment for Android app development.
Description :-
Android Studio is the official Integrated Development Environment (IDE) for Android
development, providing powerful tools for building, testing, and debugging applications.
This setup ensures the system is ready for Android app development.
2. Run the Installer – Open the downloaded .exe (Windows) or .dmg (Mac) file and
start the installation.
Name: T.S.S.S.Manikanta
Rollno: 322103311051
3. Accept License Agreement – Read and accept the terms and conditions to
proceed.
Name: T.S.S.S.Manikanta
Rollno: 322103311051
5. Select Components – Choose the required components, including Android SDK,
Emulator, and additional tools.
6. Complete Installation – Click "Install" and wait for the process to finish.
7. Launch Android Studio – Open Android Studio and configure the initial setup,
such as selecting the UI theme and SDK.
Name: T.S.S.S.Manikanta
Rollno: 322103311051
8. Verify Setup – Create a new project or open an existing one to ensure the
installation is successful.
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Week-2
Aim:-
To develop an Android application with a TextView and buttons that change the text
color and font size dynamically.
Description:-
This project involves creating a simple Android app where users can modify the text size
and color of a TextView using two buttons. The font size increases until a limit is
reached, then resets, and the color cycles through multiple predefined colors.
Steps to Implement:
Create a New Android Project – Open Android Studio, create a new project, and select
an Empty Activity.
Design the UI (activity_main.xml) – Define a TextView and two Button elements inside
a LinearLayout.
xml
<TextView
android:id="@+id/textView"
android:text="Hello World!"
android:textSize="25sp"
android:textStyle="bold" />
Implement Logic in MainActivity.java – Handle button clicks to modify text size and
color.
java
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Set Click Listeners – Change text size and cycle through colors.
java
buttonChangeFont.setOnClickListener(v -> {
textView.setTextSize(fontSize);
});
buttonChangeColor.setOnClickListener(v -> {
textView.setTextColor(colors[colorIndex++ % colors.length]);
});
Run and Test the App – Install the app on an emulator or device to verify functionality.
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Output:
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Week-3
Aim:
The goal of this project is to create a Water Intake Calculator Android application that
estimates the daily water consumption required based on a user's weight, activity level,
and weather conditions.
Steps to Implement:
1. Setting Up the Project
• Add two Spinner elements for selecting Activity Level and Weather Condition.
• Define string arrays for activity levels (Low Activity, Moderate Activity, High
Activity).
4. Implement MainActivity.java
• Initialize UI Components:
Name: T.S.S.S.Manikanta
Rollno: 322103311051
java
return baseWaterIntake;
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Output:
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Week-4
Aim:
To create and set up a SQLite database in an Android application for managing student
attendance, allowing operations such as inserting, updating, deleting, and viewing
records.
Description:
This project involves setting up an SQLite database within an Android application to
store student details such as roll number, name, and marks. The application provides a
user interface to perform CRUD (Create, Read, Update, Delete) operations on the
student database.
Steps to Implement:
Step 1: Create a New Android Project
• Open Android Studio and create a new project with an Empty Activity template.
• Design the UI using EditText for roll number, name, and marks input.
• Add Button components for Insert, Update, Delete, View, and View All actions.
xml
• Code snippet:
java
• Add functionality to insert student records when the Insert button is clicked.
• Code snippet:
java
• Add functionality to delete and update records based on the roll number.
• Code snippets:
Delete:
java
Update:
java
• View Record:
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Java
if (c.moveToFirst()) {
Name.setText(c.getString(1));
Marks.setText(c.getString(2));
java
while (c.moveToNext()) {
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Output:
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Week-5
Aim:
To create an Android application that allows users to set an alarm using a TimePicker
and activate or deactivate it using a ToggleButton.
Description:
This project involves setting up an alarm in an Android app using AlarmManager,
PendingIntent, and BroadcastReceiver. The user selects a time from the TimePicker, and
the alarm plays a ringtone when triggered.
Steps to Implement:
Step 1: Create a New Android Project
• Open Android Studio and create a new project with an Empty Activity template.
• Add a TimePicker for selecting the alarm time and a ToggleButton for
enabling/disabling the alarm.
xml
CopyEdit
java
CopyEdit
@Override
ringtone.play();
java
CopyEdit
calendar.set(Calendar.HOUR_OF_DAY, alarmTimePicker.getCurrentHour());
calendar.set(Calendar.MINUTE, alarmTimePicker.getCurrentMinute());
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),
10000, pendingIntent);
java
CopyEdit
if (((ToggleButton) view).isChecked()) {
} else {
alarmManager.cancel(pendingIntent);
}
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Step 6: Run and Test the Application
Output:
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Week-6
Aim:
To create an Android application that demonstrates how an alert notification (Toast
message) works when a user inputs a message and clicks a button.
Description:
This project involves developing a simple Android app where users enter a message in
an input field and press a button to display the message as a Toast notification. The app
uses EditText for input and a Button for triggering the alert.
Steps to Implement:
Step 1: Create a New Android Project
• Open Android Studio and create a new project with an Empty Activity template.
• Add an EditText for user input and a Button for triggering the alert.
xml
CopyEdit
java
notifyButton.setOnClickListener(v -> {
});
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Step 4: Run and Test the Application
• Enter a message in the input field and click the Notify button.
Output:
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Week-7
Aim:
Develop an Android application that retrieves and displays the user's current GPS
location using Google's Fused Location Provider API.
Steps to Implement
1. Setting Up the Project
2. Adding Dependencies
gradle
CopyEdit
dependencies {
implementation("com.google.android.gms:play-services-location:21.0.1")
xml
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION"/>
java
Name: T.S.S.S.Manikanta
Rollno: 322103311051
registerForActivityResult(new ActivityResultContracts.RequestPermission(),
isGranted -> {
if (isGranted) {
getLocation();
} else {
});
4. Building the UI
xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:id="@+id/locationText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Fetching location..."
android:textSize="18sp" />
<Button
android:id="@+id/getLocationButton"
android:layout_width="wrap_content"
Name: T.S.S.S.Manikanta
Rollno: 322103311051
android:layout_height="wrap_content"
</LinearLayout>
java
FusedLocationProviderClient fusedLocationClient;
@Override
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
locationText = findViewById(R.id.locationText);
getLocationButton = findViewById(R.id.getLocationButton);
fusedLocationClient = LocationServices.getFusedLocationProviderClient(this);
if (ContextCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_FINE_LOCATION) ==
PackageManager.PERMISSION_GRANTED) {
fusedLocationClient.getLastLocation().addOnCompleteListener(task -> {
if (location != null) {
} else {
Name: T.S.S.S.Manikanta
Rollno: 322103311051
locationText.setText("Location not available");
});
} else {
requestPermissionLauncher.launch(Manifest.permission.ACCESS_FINE_LOCATION);
java
if (location == null) {
• Run the app on a physical device (emulators may not always provide location).
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Output:
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Week – 8
Aim:
The aim of this week was to integrate a Room Database into the Resume App to store and
manage user resume data effectively. The database stores essential information such as
personal details, job title, skills, experience, education, and activities, ensuring data
persistence across app sessions.
Description:
The Resume App was enhanced by incorporating a local Room Database to allow users
to store and retrieve their resume information. Room was chosen due to its ease of use
and ability to map Java objects to SQLite tables effortlessly. The app maintains a
database to store all relevant data, including the user’s name, contact information,
skills, experience, and other resume details. This feature ensures that the resume data
remains accessible even after the app is closed.
Implementation Steps:
1. Database Setup:
• Created a Room database with one table named resume_table to store all
resume-related data.
• Defined the schema for the table and ensured the use of a PrimaryKey to
uniquely identify each resume.
2. Entity Definition:
• Created a Resume.java class annotated with @Entity to define the table schema.
• Added required fields such as name, jobTitle, email, phone, summary, skills,
experience, and education in the entity.
3. DAO Implementation:
Name: T.S.S.S.Manikanta
Rollno: 322103311051
o getResume() to fetch stored resume data.
4. Database Configuration:
• Updated the btnGenerate and btnLoad buttons to handle save and load
operations, respectively.
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Source Code (Sample):
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Week -9
Aim:
The aim for Week 9 is to implement the core functionality of the Resume App by
developing the backend logic using Java and Room Database (SQLite ORM). This
includes storing, retrieving, updating, and deleting resume data to ensure a seamless
experience for users.
Description:
In Week 9, the focus was on developing Java code for handling the application's core
functionality. The app uses Room Database to store resume data persistently. The Java
code ensures that user inputs are correctly processed, stored, and retrieved when
needed. The backend logic is linked to the UI designed in Week 8, ensuring smooth
interaction between the interface and the database.
Implementation Steps:
1. Setup Room Database:
o Deleting resumes.
• Defined the database version and added the ResumeDao for accessing the
database.
• Connected Java code to the XML layout files using findViewById() and
ViewBinding.
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Sample Source Code :
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Week -10
Aim:
The aim for Week 10 is to design and implement the User Interface (UI) for the Resume
App using XML layout files. The UI will provide an intuitive and easy-to-navigate
experience for entering and managing resume details. The XML files will be linked to the
Java code developed earlier to ensure seamless interaction between the UI and Room
Database.
Description:
In Week 10, the focus is on creating XML layout files that define the structure and
appearance of the app's screens. These layouts include forms for entering personal
information, skills, experience, education, and additional activities. The UI is designed
to ensure that users can easily navigate and fill out their resume information. The XML
files are integrated with the Java code to enable dynamic data entry and interaction.
Implementation Steps:
1. Design the Main Activity Layout:
• Included:
o EditText fields for resume details (Name, Job Title, Email, Phone, etc.).
o Personal Information: Name, Job Title, Email, Phone, Website, and Social
Links.
• Implemented error messages to alert the user about invalid input or incomplete
forms.
• Linked the XML layouts to their corresponding Java activities using findViewById()
and ViewBinding.
• Set up listeners for button clicks to trigger saving and loading of data.
• Run the app on an emulator and physical devices to test the UI.
• Verified that:
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Output:
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Week-11
Aim:
The aim for Week 11 is to implement PDF generation and storage functionality in the
Resume App using iText7 Library. The app will allow users to generate a professional
resume in PDF format with formatted sections and save the file in the device’s storage.
Description:
In Week 11, the focus was on generating a professionally formatted PDF document
containing resume information entered by the user. Using the iText7 Library, the app
dynamically compiles the user-provided data (name, job title, contact details, skills,
experience, education, and activities) into a well-structured document. The PDF is
saved either in the Downloads folder (for Android versions below Q) or in the
Documents folder (for Android Q and above).
Implementation Steps:
Integrate iText7 Library:
• Ensured that the correct version of the library is included to support PDF
generation.
• Handled permission requests dynamically for Android versions below Q (API 29).
• Developed a createPdf() method to collect and format the resume data entered
by the user.
• Ensured the resume maintains a clean and professional layout in the PDF.
• Saved the PDF to the Documents folder for devices running Android Q and above
using MediaStore.
• Saved the PDF to the Downloads folder for devices running below API 29 using
FileOutputStream.
• Displayed a confirmation message indicating that the PDF has been saved
successfully.
• Ensured error messages are displayed to the user in case of any failures during
PDF creation or file write operations.
• Validated that file creation and storage processes are handled securely.
• Conducted tests on both older and newer Android versions to verify storage
functionality.
• Ensured that all resume details entered by the user appear correctly in the
generated PDF.
• Optimized the logic to differentiate between file storage paths for different
Android versions.
• Ensured that PDF files generated by the app are accessible for viewing and
sharing.
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Sample Codes :
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Week -12
Aim:
The aim for Week 12 is to finalize the flow of the Resume App and conduct thorough
testing to ensure that all features, including generating and loading resumes, work as
expected. This involves verifying the integration between the UI and backend, ensuring
that resume data is stored and retrieved accurately, and preparing the project for final
review and deployment.
Description:
In Week 12, the focus was on completing the project by ensuring the final flow and
performing end-to-end testing. This involved:
• Ensuring that all screens and functionalities, such as generating a resume and
loading previously generated data, are seamlessly connected.
• Preparing the project for final submission and ensuring that all requirements
were met.
Implementation Steps:
1. Finalize App Flow:
• Ensured that all activities and XML layouts were correctly linked to the Java code.
• Verified that:
o Clicking the Load Resume button retrieves and displays previously stored
data using SharedPreferences.
Name: T.S.S.S.Manikanta
Rollno: 322103311051
o Saves the PDF to the appropriate location (Downloads or Documents
folder).
• Conducted testing to ensure that the app is user-friendly and easy to navigate.
• Verified that:
o Ensured that the app handled large amounts of input data without
crashing.
Name: T.S.S.S.Manikanta
Rollno: 322103311051
7. Prepare for Final Review:
• Documented the testing process and results, including any identified issues and
their resolutions.
Output :
Name: T.S.S.S.Manikanta
Rollno: 322103311051
Name: T.S.S.S.Manikanta
Rollno: 322103311051