21PA1A05G8
21PA1A05G8
BACHELOR OF TECHNOLOGY
In
COMPUTER SCIENCE AND ENGINEERING
Submitted by
SURAGANI USHASREE
Reg.No : 21PA1A05G8
DECLARATION
SURAGANI USHASREE
Date:
VISHNU INSTITUTE OF TECHNOLOGY (AUTONOMOUS)
(Approved by AICTE, Accredited by NBA & NAAC and permanently affiliated to JNTUK)
BHIMAVARAM- 534202
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
CERTIFICATE
This is to certify that the Summer Intern Project Report entitled “ANDROID
DEVELOPMENT”, is being submitted by SURAGANI USHASREE, REGD.NO:
21PA1A05G8 submitted in fulfillment for the degree of “BACHELOR OF TECHNOLOGY” in
“COMPUTER SCIENCE AND ENGINEERING” is a record of summer Intern Project work carried
out by her under my supervision during the academic year 2024-2025 and it has been found worthy
of acceptance according to the requirements of the university.
External Examiner
TABLE OF CONTENTS
S. No Topics Page.No
1. Android Application
2. Building app UI
Data persistence
6
6.1 Learn the basics of SQL to insert, update, and delete data
from a SQLite database.
6.2 Use the Room library to add a database to an Android app.
6.3 Use Database Inspector to test and debug database issues.
6.4 Use Preference DataStore to store user preferences.
WorkManager
7
7.1 Define long running tasks that need to run in background
work.
7.2 Add WorkManager to an Android app.
7.3 Create a Worker object and enqueue work.
7.4 Create constraints on WorkRequests.
7.5 Use the Background Task Inspector to inspect and debug
WorkManager.
Android Development
Android development is the process of creating applications for devices that run the Android operating
system, primarily using programming languages like Java and Kotlin, with Kotlin being the preferred
choice due to its modern features. Developers typically use Android Studio, the officialIntegrated
Development Environment (IDE), which provides essential tools for coding, debugging, and testing.
The development process often involves using frameworks and libraries, such as Jetpack for
simplifying common tasks, Retrofit for network operations, and Room for database management.User
interfaces are designed using XML layouts, and common architectural patterns like MVC, MVP,and
MVVM help structure the code effectively. Android apps can interact with various APIs and services,
including Google Play Services for enhanced functionality. Testing is crucial, with frameworks like
JUnit and Espresso used to ensure quality and performance. Finally, apps can be published on the
Google Play Store, allowing developers to manage versions and user feedback effectively. Overall,
Android development blends software engineering principles with mobile- specific design and user
experience considerations.
1. Open the folder where you downloaded and saved the Android Studio installation file.
2. Double-click the downloaded file.
3. If you see a User Account Control dialog about allowing the installation to make changes to
your computer, click Yes to confirm the installation.
2
4. Click Next to start the installation.
5. Accept the default installation settings for all steps.
6. Click Finish when the installation is done to launch Android Studio.
7. Choose your preference of light or dark theme when Android Studio first launches.
Screenshots in this course use the light theme, but choose whichever one you prefer.
8. During the installation, the setup wizard downloads and installs additional components and
tools needed for Android app development. This may take some time depending on your
internet speed. During this time, you may see a User Account Control dialog for Windows
Command Processor. Click Yes to accept the dialog.
9. You may also receive a Windows Security Alert about adb.exe. Click Allow Access, if
needed, to continue the installation.
10. When the download and installation completes, click Finish.
11. The Welcome to Android Studio window displays and you're ready to start creating apps!
1.3 Build an Android app with a simple user interface that displays text and images.
3
4. Modify the MainActivity (Kotlin Code)
After designing the UI, you need to connect the XML layout to Kotlin code in your MainActivity.kt
file. This is where you can dynamically update UI elements (if necessary).
5. Run the App
• Connect your Android device via USB, or you can use an Android emulator within Android
Studio.
• Click the Run button (green arrow) in Android Studio to build and launch the app.
• The app should display the text "Hello, welcome to my app!" along with the image you added
in the center of the screen.
6. Adding Interactivity (Optional)
If you want to add interactivity, such as changing the text when an image is clicked, you can modify
the MainActivity.kt like this:
7. Testing and Debugging
• Test the app on different screen sizes using the Android Studio emulator or real devices.
• Make sure the image and text are displayed correctly and that any interactions (like clicks)
work as expected.
Android Studio comes with the Android Virtual Device (AVD) Manager, which allows you to
create and run an emulator that mimics a real Android device.
1. Open the AVD Manager:
o In Android Studio, go to Tools > Device Manager or click the Device Manager icon
from the toolbar (it looks like a phone).
o This opens the AVD Manager where you can create and manage virtual devices.
2. Create a New Virtual Device:
o Click Create Device.
o Choose a device from the list (e.g., Pixel 3, Nexus 5X) and click Next.
o Select a system image (Android version). You might need to download it if it’s not
available. For example, select Android 11.0 (R) if it's compatible with your project.
o Click Next, then Finish to create the virtual device.
3. Launch the Emulator:
o After the virtual device is created, click the Play button next to the device in the AVD
Manager to launch the emulator.
o Wait for the emulator to boot up (it may take a minute for the first time).
4
2. Run the App on the Emulator
1. Once the emulator is running, make sure the device is selected in the Target Device dropdown
menu (located at the top of the Android Studio window).
2. Click the Run button (green play arrow) or go to Run > Run ‘app’ from the toolbar.
3. Android Studio will build the project, install the app on the emulator, and launch it. You
should see your app running on the emulator.
6
• Function types let you pass around functions as arguments, allowing for high levels of code
flexibility and reuse.
• Classes let you encapsulate data and behavior, providing a structured way to model real-world
concepts.
• Lambdas make your code concise and expressive, especially when working with collections
or higher-order functions.
These features together help write clean, modular, and flexible Kotlin programs.
3.2 Create a scrollable list in an app that displays both text and images.
Design the User Interface Layout:
• Use a RecyclerView or ListView to create a scrollable list that can display multiple items.
• Each item in the list should contain a layout with an ImageView for displaying images and a
TextView for displaying text.
• The layout of the list item should define how text and images are arranged (e.g., image on the
left and text on the right, or image above text).
Create a Data Model:
• Define a data class to represent the information for each item. This class should contain fields
for both the text and the image data (such as a URL or resource ID).
Create a ViewHolder and Adapter:
• Implement a RecyclerView.Adapter or ListAdapter to bind the data to the views.
• Inside the adapter, create a ViewHolder class to hold references to the TextView and
ImageView for each list item.
• In the onBindViewHolder method, set the text and load the images into the ImageView. You
Populate the List with Data:
• In your activity or fragment, create a list of data objects (instances of the data model) and pass
this list to the adapter.
• Set the adapter to the RecyclerView or ListView to display the scrollable list of items.
Handle Image Loading:
• If you are using online images (URLs), ensure images are loaded asynchronously to avoid
blocking the UI thread. Libraries like Glide or Picasso handle this efficiently, supporting
features like caching, resizing, and error handling.
Optimize for Performance:
• To improve performance, use RecyclerView with view recycling, ensuring that the
RecyclerView.Adapter efficiently reuses views as the user scrolls.
• Implement placeholder images and caching strategies for better performance when loading
images from remote sources.
3.3 Add click listeners to interact with list items.
Define Click Listener Interface
Create an interface to handle click events. This allows the interaction logic to be separated from the
adapter and handled in the activity or fragment.
Modify ViewHolder to Implement Click Listener
In your ViewHolder class, implement the View.OnClickListener interface and define the logic for
item clicks. The ViewHolder will handle item clicks and pass the event back to the activity/fragment
through the OnItemClickListener.
Pass Click Listener to Adapter
In the adapter, pass the OnItemClickListener instance when creating the ViewHolder. This ensures
that each list item can trigger click events.
Implement Listener in Activity or Fragment
In your activity or fragment, implement the OnItemClickListener interface to handle the click events
for each item in the list. You can define what happens when an item is clicked
Adding Click Listener to Specific Views
If you want to add click listeners to specific views inside the list item (such as a button or image), you
can do so in the ViewHolder. Here’s how you can add a click listener for an individual view within
the item layout
3.4 Add an app bar to the app and modify the app theme.
• Integrate a Toolbar into the app's main layout to act as the app bar.
• The Toolbar will appear at the top of the screen and serve as the main UI element for navigation
and interaction, offering features like a title, navigation buttons, and action items
Set Up the Toolbar in the Activity
• In the activity, set the Toolbar as the app's action bar using the appropriate method.
• Customize the toolbar by setting a title, subtitle, and potentially a logo or navigation icon.
3.5 Material Design to build modern and intuitive user interfaces, using colors, shapes and
typography
1. Color Palette
2. Shapes and Shadows
3. Typography
4. Layout and Spacing
5. Icons and Imagery
6. Navigation
7. Feedback and Interactions
10
CHAPTER – 4
Navigation and app architecture
4.1. Activities and Their Lifecycles
• Activity: An activity in Android represents a single screen in an app, like a window where
the UI is drawn. It’s the entry point for user interaction. Activities manage the app’s UI and
respond to user input.
• Lifecycle: The lifecycle of an activity includes multiple states such as onCreate(), onStart(),
onResume(), onPause(), onStop(), and onDestroy(). These methods handle transitions
between states (like when the user opens the activity, navigates away, or the app is closed).
Understanding activity lifecycles helps manage app resources, save state, and handle
interruptions (like incoming calls).
4.2 Modern Android Architecture
• Android Jetpack Architecture: Modern Android apps are built using Android Jetpack
components, which promote a modular and robust architecture. Key components include:
o ViewModel: Manages UI-related data and survives configuration changes.
o LiveData/StateFlow: Observes changes in UI data.
o Room: Manages local databases.
o Repository: A clean abstraction for data sources.
o Navigation Component: Manages in-app navigation.
• MVVM (Model-View-ViewModel): A widely used design pattern in Android architecture.
The ViewModel separates UI logic from business logic, making the code easier to maintain
and test.
4.3 Use StateFlow and UDF (Unidirectional Data Flow) Pattern
• StateFlow: A Kotlin API for managing and observing state in a reactive way, much like
LiveData. It emits values and helps manage UI state changes efficiently.
• UDF (Unidirectional Data Flow): A pattern where the state of the app flows in a single
direction: from the source of truth (ViewModel) to the UI. The UI sends events (like user
input) to the ViewModel, which updates the state, and the UI then reacts to those changes.
This pattern is useful for maintaining consistency in complex UIs.
4.4. Add a ViewModel to Save Data and State
ViewModel: A lifecycle-aware component that stores and manages UI-related data. It
survives configuration changes, such as screen rotations, ensuring that data is not lost. It
decouples the data handling logic from the activity or fragment, leading to moremaintainable
and testable code.
11
4.5. Set up and Use the Navigation Component with Compose
• Navigation Component: Android’s recommended way to handle navigation in an app. It
simplifies fragment transactions, passing data between screens, and managing the back
stack. In Jetpack Compose, the navigation component integrates smoothly, allowing
declarative navigation based on composables.
• Benefits: The Navigation component supports deep linking, nested navigation graphs, and
safe args for type-safe data passing between destinations.
4.6. Understand What Responsive UI Is
• Responsive UI: Designing an interface that adapts to different screen sizes, orientations,
and devices (phones, tablets, desktops). It ensures the app looks and works well on any
screen, from small mobile devices to large tablets or foldable phones. Responsive design
involves using flexible layouts, percentage-based dimensions, and adaptive content scaling.
4.7. Use Window Class Sizes to Build for Different Screen Sizes
• Window Class Sizes: Android classifies screen sizes into categories (compact, medium, and
expanded) based on their dimensions. These classes help design responsive UIs that adapt
based on the available screen space. Developers can provide different layouts or behaviors
for different window sizes, ensuring the app scales and works across a wide variety of devices.
4.8. Add a Navigation Drawer to an App
• Navigation Drawer: A side panel that slides in from the edge of the screen to display
navigation options. It’s a common UI pattern for accessing different parts of the app, often
used to house menu items like "Home," "Settings," or other major sections. The navigation
drawer provides a consistent, easily accessible method of app navigation, especially when
paired with Android’s Navigation component.
12
CHAPTER – 5
Connect to the Internet
5.1 Basics of Concurrency and Coroutines in Android
Concurrency in Android refers to the ability of the system to perform multiple tasks at the same time.
Given the nature of mobile applications, managing tasks efficiently (like networking, database
operations, or heavy computation) without blocking the main thread is critical to ensure smooth user
experiences.
Coroutines are a feature of Kotlin that provide a more concise and readable way to handle
asynchronous operations. Coroutines simplify concurrency by allowing code to be written
sequentially while managing background tasks efficiently. With coroutines, you can manage threads,
switch contexts, and write non-blocking code easily using suspending functions. In Android,
coroutines integrate seamlessly with popular libraries and architectural patterns to improve
performance and simplify code.
5.2. Data Layer in Modern Android App Architecture
The data layer is responsible for managing the app’s data sources, such as local databases (e.g.,
Room), remote APIs (e.g., Retrofit), or other sources like shared preferences. It serves as the single
source of truth for the app's data and is often abstracted to ensure separation of concerns, making it
easier to test and maintain.
In modern Android architecture (e.g., using the MVVM pattern), the data layer usually consists of
repositories that retrieve data from multiple sources and data models that represent the business logic.
This helps ensure that the app can easily handle data fetching, caching, and synchronization in a
structured and scalable way.
5.3. Implementing a Repository to Centralize Data Access
A repository is a design pattern used in Android to centralize data access logic, making it easier to
manage different data sources (such as local databases, network requests, or even in-memory caches).
By abstracting the data source behind a repository, the app’s architecture becomes more modular and
easier to test, as components don’t need to worry about where the data comes from.
Repositories are commonly used in conjunction with ViewModels in MVVM architecture, where the
ViewModel interacts with the repository to fetch data, which is then exposed to the UI. This setup
promotes clean code by decoupling the data-fetching logic from the UI logic.
5.4. Using Retrofit to Retrieve Data from a Remote Server
Retrofit is a popular HTTP client library used in Android to simplify making network requests to
RESTful APIs. Retrofit abstracts much of the boilerplate code associated with making network calls,
13
parsing JSON responses, and managing asynchronous tasks. It allows you to define API endpoints
using simple interface methods, making the code clean and easy to maintain.
By using annotations, Retrofit maps API requests and responses to Java or Kotlin objects,
streamlining network interactions and error handling. Additionally, Retrofit can work seamlessly with
other libraries like Gson for JSON parsing, and it integrates well with coroutines for asynchronous
network calls.
5.5. Loading and Displaying Images Using the Coil Library
Coil (Coroutine Image Loader) is an Android library designed for loading images into views (such as
ImageView) in a fast, efficient manner. Built using Kotlin and coroutines, Coil provides a lightweight
solution for handling image loading with minimal memory overhead, compared to other libraries like
Glide or Picasso.
Coil simplifies the process of loading images from the internet, caching them, and managing memory
efficiently. It supports various image formats and allows easy integration with your app’s UI.
Additionally, Coil is highly customizable, supporting transformations, placeholders, error handling,
and more.
5.6. Implementing Dependency Injection in Android
Dependency injection (DI) is a design pattern that promotes loose coupling between classes by
providing a way to supply their dependencies externally, rather than letting classes create their own
dependencies. In Android, DI is typically used to manage dependencies such as repositories, network
clients, or services that various parts of the app require.
By implementing DI, your app becomes more modular, easier to test, and more maintainable.
Libraries like Dagger and Hilt (a simplified version of Dagger for Android) are commonly used for
dependency injection. DI makes it possible to inject dependencies into Android components (e.g.,
ViewModels, Activities, and Fragments) without having to manually instantiate or manage those
dependencies, promoting cleaner and more testable code.
14
CHAPTER – 6
Data Persistence
15
Room simplifies handling database operations, provides compile-time checks for SQL queries, and
integrates seamlessly with LiveData and Kotlin Coroutines for observing and performing database
operations asynchronously.
6.3. Using Database Inspector to Test and Debug Database Issues
Database Inspector is a powerful tool available in Android Studio that allows developers to inspect
and interact with SQLite databases in real time while the app is running. Here’s how it helps:
• Viewing Database Structure: Developers can view the database structure, including tables,
columns, and the types of data stored.
• Query Execution: You can run SQL queries directly in the Database Inspector to test or fetch
data without modifying the app code. This is helpful for testing complex queries or debugging
issues.
• Real-time Updates: Database Inspector shows real-time updates as the app runs. If the app
inserts, updates, or deletes data, you can immediately see the effect in the database.
• Viewing Data: The tool allows you to view the data stored in each table and filter or sort it
for analysis. You can also inspect data to ensure it's being saved or updated correctly.
This tool helps developers identify database issues early and easily, reducing debugging time and
improving development efficiency.
6.4. Using Preference DataStore to Store User Preferences
Preference DataStore is a newer and more efficient way to store key-value pairs or user preferences
in Android, replacing the traditional SharedPreferences API. There are two types of DataStore
implementations:
• Preferences DataStore: This is used for storing simple key-value pairs, similar to
SharedPreferences. It is ideal for user settings like theme preferences or notification settings.
• Proto DataStore: This is used for storing more complex data using Protocol Buffers (a
language-neutral, platform-neutral, extensible mechanism for serializing structured data).
Some of the key features of Preference DataStore include:
• Asynchronous and Safe: It works asynchronously using Kotlin Coroutines, meaning it
avoids blocking the main thread. This makes it more efficient than SharedPreferences.
• Consistency: It guarantees data consistency with transactional data changes, ensuring no data
corruption.
• Lifecycle Awareness: You can use it with Jetpack components like LiveData or Flow, making
it easier to observe and update UI based on preference changes.
Preference DataStore is generally used for storing user-specific preferences and is ideal for apps that
need to store and manage simple user settings across app sessions.
16
CHAPTER – 7
Work Manager
7.1 Defining Long-Running Tasks in WorkManager
17
CHAPTER – 8
View and Compose
8.1. View-based UI Toolkit and Building App UI using XML:
The View-based UI toolkit is the traditional approach to creating user interfaces in Android. It
involves defining the app's UI components (such as buttons, text fields, etc.) using XML layouts. The
XML files describe how the interface should appear, and the corresponding Java or Kotlin code
handles the functionality. The Android framework then translates the XML layout into actual UI
elements that users interact with. Each UI component is a subclass of View (e.g., TextView, Button,
etc.), and these views are laid out in a hierarchy, typically using containers like LinearLayout,
RelativeLayout, or ConstraintLayout.
XML-based UIs offer flexibility and separation of concerns, as the UI structure is defined separately
from the logic. However, this approach can sometimes result in verbose code and performance
limitations, especially when dealing with complex, nested layouts.
8.2. Adding a Composable in an App Built with Views:
Jetpack Compose is Android's modern UI toolkit that simplifies UI development by using a
declarative approach. Instead of building UIs using XML, Compose allows you to define UI
components (called "composables") directly in Kotlin code.
In a project that primarily uses Views (XML-based), it's possible to integrate composables without
completely rewriting the app. This hybrid approach allows gradual migration to Jetpack Compose.
For example, you can add a composable inside a Fragment or Activity by using a ComposeView,
which serves as a bridge between the traditional View system and Compose. This is useful when you
want to leverage the benefits of Compose, such as its reactive nature, without overhauling the entire
app.
8.3. Adding the Navigation Component to the App and Using it to Navigate Between Fragments:
The Navigation component is part of Android Jetpack and simplifies navigation within an app. It
manages fragment transactions, deep links, and complex navigation patterns (e.g., bottom navigation,
tab navigation) in a more structured way. It uses a navigation graph (defined in XML or Kotlin) to
declare the app's navigable destinations (fragments, activities) and the actions that connect them.
By integrating the Navigation component, developers no longer need to manually manage the
FragmentTransaction or keep track of the back stack. Instead, navigation is handled by the framework,
ensuring smoother transitions and state management. This reduces boilerplate code, improves
scalability, and allows the app to manage navigation even across processes and after configuration
changes.
18
8.4. Using AndroidView to Display Views:
In Jetpack Compose, when there's a need to reuse existing view-based components (from the XML
approach), you can use the AndroidView composable. This allows you to display traditional views
(such as a MapView, WebView, or any custom view) inside a Compose UI.
AndroidView bridges the gap between the imperative UI system (Views) and the declarative UI
system (Compose). It provides a way to incorporate legacy UI components or third-party view
libraries that haven't been converted to Compose yet. By wrapping these Views inside AndroidView,
developers can ensure a seamless transition to Compose without losing compatibility with existing
components.
8.5. Adding Existing View-based UI Components in a Compose App:
When building a fully Compose-based app, you may still need to incorporate existing UI components
from the View system. This could be because of legacy code or components that are not yet available
in Compose. To achieve this, Compose offers a way to integrate existing views through AndroidView.
This allows developers to reuse custom views, libraries, or view-based UI components within a
Compose hierarchy.
Adding View-based components in a Compose app helps in gradually migrating to Compose without
a full rewrite. It provides flexibility in combining both UI paradigms (Views and Compose) and
ensures that legacy codebases can still benefit from Compose features while maintaining backwards
compatibility with older view components.
19
ACTIVITY LOG
20
WEEKLY REPORT
Week1 & 2
Objectives:
• Gained fundamental knowledge on Android development and its concepts.
Detailed Report:
During the first week, the focus was on setting up the development environment and gaining familiarity
with Kotlin and Android Studio. Android Studio was downloaded and successfully installed, providing
access to a powerful IDE for Android development. After installation, timewas spent exploring the
various features and layout of Android Studio, including its interface, project structure, and tools. A
basic "Hello World" app was created as the first Android application, which helped in understanding
the process of building and running apps. Kotlin was introduced as the primary programming language
for Android development, and simple programs were written using println() to display text output on
the console. Additionally, Log messages were generated using Log.d() for debugging purposes. The
Kotlin programs were run on both an emulator and a real device, verifying their functionality across
different environments. By the end of the week, familiarity with Kotlin syntax was achieved, along
withbasic competence in using Android Studio to create and test applications. This foundational
knowledge serves as a critical step toward more advanced Android app development.
In the second week, the focus shifted to building a basic understanding of Kotlin's conditionals,
function types, and lambda expressions, and applying this knowledge to developa simple Android app
with an interactive UI. Conditionals such as if, when, and else were explored, enabling decision-
making in Kotlin programs. Function types and lambda expressions were introduced to streamline
code, especially for handling events and callbacks efficiently. Moving on to UI development, an
Android app was created with a layout that included both text and images, designed using XML.
Buttons were added to the UI, which required learning about event listeners and handling user
interactions. Tap events were captured using Kotlin, with actions defined using lambda expressions for
concise event handling. The app was thoroughly tested on an emulator and a physical device to ensure
proper functionality. This process solidified understanding of building user interfaces and integrating
interactivity into apps. By the end of the week, a fully functional Android app witha simple yet
responsive UI was successfully built, marking a significant step forward in Android development skills.
21
ACTIVITY LOG
22
WEEKLY REPORT
Week 3 & 4:
Objective:
• Creating an Android app with a simple UI to display text and images with adding
buttons to the user interface and make it to respond to reactions.
• Making it in a way to build and testing a simple Android app with interactive UI.
Detailed Report:
During third Week , the focus was on implementing Kotlin classes and managing user input inAndroid
apps. First, Kotlin classes were studied in depth, with attention to object-oriented principles and the
use of data collections such as List and Map to store and manage information. The Android app was
enhanced with UI components like EditText, which allowed users to enter text data. The concept of
state management was introduced, enabling dynamic updates to the UI based on the user’s input. For
instance, when a user entered their name in an EditText, the app would display the name in real time
using TextView. This required managing the app’s state effectively to reflect user-driven changes
without restartingthe activity. The implementation of state-aware UI components using Kotlin made
the app more interactive and personalized. By the end of the week, the app could successfully take user
input, process it, and update the display dynamically, improving user experience. This week’s activities
solidified skills in state management, laying the groundwork for more complex user interaction
patterns.
In fourth week I have started concepts in advanced UI concepts, focusing on building a scrollable list
and integrating Material Design guidelines for a modern app look. The week began by learning how to
use Kotlin data classes and collections to organize and present data efficiently. These were applied to
create a scrollable list using RecyclerView, enabling the appto display a dynamic list of items. Each
list item was made interactive by adding click listeners, allowing users to interact with individual items
and receive immediate feedback.
Moving forward, an app bar (using Toolbar) was implemented to enhance the app's structure and
navigation. Material Design principles were studied and applied, particularly for customizing the app's
theme, colors, and typography, which provided a more polished, consistent look. The app was enhanced
with a cohesive and modern UI, using components likefloating action buttons, styled buttons, and a
refined color scheme. By the end of the week, a list-based app was created, complete with responsive
user interaction and a modern UI that adhered to Material Design standards. This week marked a
significant improvement in both design aesthetics and user functionality.
23
ACTIVITY LOG
Learning aboutAndroid
activities and lifecycle Lifecycle of android
Day-1,2
methods. studio.
Adding ViewModel to
save and manageUI-related Saving the datain android
Day-3,4
data. studio.
Understanding and
implementing responsive Implemented responsive
Day-7,8 UI fordifferent screen userinterface.
sizes using window
classes.
Learning concurrency
basics in Android and
ImplementingRetrofit to
Day-9,10 retrieve data from a remote Connecting user interface
API. to API.
24
WEEKLY REPORT
WEEK 5&6
Objectives:
• Implemented a multi-screen app with structured navigation and responsive design.
• Built an app that retrieves and displays data from an external source.
Detailed Report:
In Fifth Week, the focus was on learning Android activities, lifecycle methods, and structuringan app
with proper navigation. The first task was understanding the lifecycle of an activity andhow lifecycle
methods like onCreate(), onStart(), and onPause() work, ensuring that the app behaves consistently
across different states. The ViewModel architecture component was introduced to save and manage
UI-related data across configuration changes, avoiding unnecessary recomputations. Next, the Jetpack
Navigation component was set up, using Jetpack Compose to handle seamless screen transitions and
structured navigation between different activities or fragments. Emphasis was also placed on making
the app responsive to different screen sizes. Android window classes, such as compact, medium, and
expanded, wereexplored to create a responsive layout, adjusting UI elements dynamically based on
device screen size. By the end of the week, a multi-screen app with structured navigation and
responsive design was built, ensuring a smooth user experience across different devices. The
implementation of ViewModel and navigation components helped enhance app performance and
maintainability.
In Sixth I have shifted my focus to network operations, introducing concurrency in Android and
retrieving data from external sources. Concurrency was explored using coroutines, a key feature of
Kotlin that simplifies asynchronous programming and allows for non-blocking operations. The next
step was integrating Retrofit, a popular HTTP client, to fetch data from a remote API. Retrofit was
used to parse JSON data and retrieve information such as images andtext, which could be displayed
within the app. The Coil image-loading library was implemented to display fetched images efficiently,
taking advantage of caching and asynchronous image loading. Alongside network operations,
dependency injection (DI) was introduced, focusing on using Dagger/Hilt to inject dependencies like
Retrofit instances and ViewModels, enhancing app architecture. This made the codebase cleaner, more
modular, andeasier to test. By the end of the week, a functional app that fetched data from an external
source and displayed it was built. The integration of coroutines, Retrofit, and Coil, along with
dependency injection, provided a robust architecture for handling network operations in Android apps.
25
ACTIVITY LOG
Adding functionality to
insert, update, and delete
Applying required
data andUse Database
Day-5,6 commands for
Inspector to debug and
database.
testdatabase- related
issues.
Studying howto
implement background Concepts onwork
Day-7,8 tasks in Android using manager in doing
Work tasks.
Manager.
Setting constraints on
WorkRequests(e.g., What are networking
Day-11,12
network conditions and its types.
conditions).
26
WEEKLY REPORT
Week 7&8
Objectives:
• Developed an app that handles background tasks efficiently using WorkManager.
• Successfully integrated data persistence into the app using SQLite and Room.
Detailed Report:
During seventh week my focus was on data persistence in Android apps, specifically using theRoom
library for database operations. The week started with an introduction to SQL, coveringessential
database concepts such as creating tables, inserting, updating, and deleting data usingstructured queries.
These SQL basics were important for understanding how data is managed under the hood when using
Room, which is an abstraction layer over SQLite. Next, the Room library was integrated into the
Android app to create a local database. Entities, DAOs (Data Access Objects), and the database itself
were set up to store and manage app data. CRUD (Create, Read, Update, Delete) operations were
implemented, allowing users to add, modify, and remove data from the local database through the app’s
UI. The Database Inspector tool in Android Studio was used to view the database’s content, inspect
SQL queries, and debug database-related issues in real time. By the end of the week, data persistence
was successfully integrated into the app, ensuring that user data is stored locally and remains available
even when the app is closed. This solidified the understanding of database management within Android
apps.
In week eighth I have focused on implementing background tasks in Android using the WorkManager
API, which provides a flexible and reliable way to schedule background tasks. The week began by
studying the basics of background work in Android and the advantages ofusing WorkManager, such
as its ability to handle tasks that must be guaranteed to run, even after app restarts or device reboots.
A Worker class was created and enqueued to perform background tasks such as data syncing or cleanup
processes. The WorkRequest object was configured with specific constraints, like network availability
or battery status, to ensure that tasks were executed only under suitable conditions. For debugging, the
Background Task Inspector tool in Android Studio was employed to monitor and troubleshoot
background tasks during runtime. This ensured that tasks were being enqueued and executed as
expected. By theend of the week, the app was capable of handling background tasks efficiently using
WorkManager, making it more robust and reliable. This allowed the app to perform long- running
operations without affecting the user experience, ensuring seamless performance.
27
ACTIVITY LOG
Exploring thetraditional
View-based UI toolkit, Creating appusing xml
Day-1,2 building app UI with toUI.
XML.
Using Compose in
Creating UI with
Day-3,4 combinationwith
various combination.
existingViews.
Integrating existed
Developed app with
View-based UI
Day-7,8 composed base
components into a
application.
Compose-based app.
28
WEEKLY REPORT
WEEK 9 & 10
Objectives:
• Built a hybrid app combining View-based UI and Jetpack Compose.
• Completed a comprehensive Android app integrating all the learned concepts and tools.
Detailed Report:
During ninth week I focused on understanding both the traditional View-based UI system in Android
and the newer Jetpack Compose framework. The week began with an exploration ofthe View-based UI
toolkit, where XML layouts were used to design the user interface.
Concepts like ConstraintLayout, LinearLayout, and RecyclerView were revisited, helping to build a
better understanding of traditional Android UI components. The transition to Jetpack Compose, a
modern, declarative UI framework, was introduced, with emphasis on how it simplifies UI
development by using Kotlin code instead of XML. A key activity involved integrating Jetpack
Compose with existing View-based components, allowing for a hybrid app that leveraged both
approaches. The Jetpack Navigation component was also used to enable seamless navigation between
multiple fragments or screens, combining Compose and Views. Additionally, traditional Views were
integrated into a Compose-based app, showcasing how the two UI systems can coexist. By the end of
the week, a hybrid app combining both View- based UI and Jetpack Compose was successfully built,
demonstrating the flexibility of using both frameworks in Android development.
Tenth week was dedicated to the final project, which involved integrating all the concepts and tools
learned throughout the course. The goal was to develop a comprehensive Android app that utilized
state management, networking, data persistence, background tasks, and both View-based and
Compose-based UI components. The project required combining key librariesand frameworks like
Room for data persistence, Retrofit for networking, WorkManager for background tasks, and Jetpack
Compose for building a modern UI. Throughout the week, timewas spent reviewing and testing each
feature in the project to ensure that they worked seamlessly together. Debugging tools such as the
Database Inspector, WorkManager Inspector,and network monitoring tools were used to troubleshoot
and optimize performance. After development, a code review session was held to receive feedback on
the project’s architecture,design patterns, and code quality. Based on the feedback, improvements were
made to streamline the code and enhance performance. By the end of the week, the final project was
completed, integrating all learned components into a well-functioning, cohesive Android app, marking
a successful conclusion to the course.
29
30