100% found this document useful (1 vote)
487 views

Google Android Developer

Internship report
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
487 views

Google Android Developer

Internship report
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

A FULL INTERNSHIP REPORT

On

GOOGLE ANDROID DEVELOPER


Submitted in partial fulfillment of their requirement for the
award of the degree of
BACHELOR OF TECHNOLOGY IN
ELECTRICAL AND ELECTRONICS ENGINEERING
Submitted by
Name: PULI ANITHA
Reg no: 22X55A0230

Under the Esteemed Guidance of


Mr. A. RAGHAVENDRA PRASAD, M. Tech
Associate Professor

(ESTD-2007)
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

SANTHIRAM ENGINEERING COLLEGE


(AUTONOMOUS)
Approved by AICTE, New Delhi; Permanently Affiliated to JNT University, Anantapuramu,
Accredited by NAAC with Grade- A and NBA (ECE and CSE)
An ISO 9001:2015 Certified Institution, Recognized under 2 (f) & 12 (B) of the UGC ACT, 1956, NH- 40,
Nandyal-518501, Andhra Pradesh.
(2022–2025)
SANTHIRAMENGINEERINGCOLLEGE
(AUTONOMOUS)
Approved by AICTE, New Delhi; Permanently Affiliated to JNT University, Anantapuramu, Accredited
by NAAC with Grade- A and NBA (ECE and CSE)
An ISO 9001:2015 Certified Institution, Recognized under 2 (f) & 12 (B) of the UGC ACT, 1956, NH- 40,
Nandyal-518501, Andhra Pradesh.

CERTIFICATE

This is to certify that the dissertation entitled “GOOGLE ANDRIOD DEVELOPER” that
is being submitted by PULI ANITHA, 22X55A0230. Under the Guidance of Mr. A.
RAGHAVENDRA PRASAD M.Tech for Full internship of award of B.Tech Degree
in ELECTRICAL AND ELECTRONICS ENGINEERING in the SANTHIRAM
ENGINEERING COLLEGE, Nandyal (Affiliated to J.N.T. University, Anantapuramu)
is are cord of bonafied work carried out by them under our guidance and supervision.

Signature of the Guide Signature of the Head of the Department

Mr.A. RAGHAVENDRA PRASAD M. Tech Mr.M.Y.VEERESH M. Tech,(Ph. D)


Assistant Professor Head of the Department
Department of EEE Department of EEE

Signature of the External Examiner Date of


Examination:
PROGRAM BOOK
FOR
FULL INTERNSHIP

Name of the Student : P. ANITHA

Name of the College : SANTHIRAM ENGINEERING COLLEGE

Registration Number : 22X55A0230

Period of Internship : MAY 2025 TO JULY 2025

Name & Address of the : INDIA EDU PROGRAM GOOGLE FOR


Intern Organization DEVELOPERS
A Full Internship Report On
GOOGLE ANDROID DEVELOPER
Submitted in accordance with the requirement for the degree of B. TECH

Name of the College : SANTHIRAM ENGINEERING COLLEGE

Department : ELECTRICAL & ELECTRONICS ENGINEERING

Name of the Faculty Guide : Mr. A. RAGHAVENDRA PRASAD

Duration of the Internship : JAN 2024 TO APRIL 2024

Name of the Student : P. ANITHA

Programme of Study : GOOGLE ANDROID DEVELOPER

Year of Study : 2022-2025

Date of submission :
STUDENT’S DECLARATION

I P. ANITHA student of B.Tech program, Reg.No.22X55A0230 of the Department of


Electrical and Electronics Engineering, Santhiram Engineering College do here by declare
that I have completed the mandatory internship between MAY 2025 TO JULY 2025. In
INDIA EDU PROGRAM GOOGLE DEVELOPERS under the faculty guideship of Mr. A.
RAGHAVENDRA PRASAD Department of Electrical and Electronics Engineering in
Santhiram Engineering College.

Student Signature and Date

Signature of the Guide Signature of the head of the department

Mr.A.RAGHAVENDRA PRASAD M.Tech Mr.M.Y.VEERESH M.Tech,(Ph.D)


Assistant Professor Head of the Department
Department of EEE Department of EEE
CERTIFICATE FROM INTERN ORGANIZATION
ACKNOWLEDGEMENT

This will certainly not be complete without acknowledgements paid to all these who have
helped us in doing our Internship work
I manifest our heartier thankfulness pertaining to our contentment over
Mr.V. RAMANJANEYULU garu, as Internship guide with whose adroit concomitance the
excellence has been exemplified in bringing out this Internship work with artistry.
It is a great pleasure to acknowledge our profound sense of gratitude to our Head of
Department Mr. M.Y. VEERESH garu, his valuable and inspiring guidance, comments and
suggestions and encouragement towards the course of this Internship.
Involuntarily, I are precious to divulge our sincere gratefulness to our principal, the Dr.
M.V. SUBRAMANYAM garu, who has been observed posing valance in abundance
forwards our individuality to acknowledge our Internship work tendentiously.
At the outset I thank our Honorable chairman Dr. M. SANTHIRAMUDU garu,
correspondent, SANTHIRAM ENGINEERING COLLEGE for providing us with good
facilities and his moral support throughout the course.

I also express the overall exhilaration and gratitude to all the Teaching and Non Teaching
staff of EEE Dept., who admitted our Internship work and accentuated our attitude.

I also extend our heartfelt and sincere gratitude to our beloved parents for their tremendous
motivation and moral support.

SUBMITTED BY
P. ANITHA
22X55A0230
TABLE OF CONTENTS

1.Executive Summary

1.1 Learning Objectives


1.2 Outcomes

2. Introduction

2.1 Introduction To Google Android Developer


2.2 Benefits Of Google Android Developer
2.3 Google Android Developer Framework
2.4 Understanding Android Development

3. Overview Of The Organisation

3.1 Learning Resources


3.2 Development Tools
3.3 Documentation And Updates
3.4 Additional Resources

4. Activity Log And Weekly Reports

5.Outcomes

5.1Technical Skills Acquired As Android Developer Intern


5.2 Sample Code
5.3 Sample Questions

6. Conclusion

7. Refferences
CHAPTER 1: EXECUTIVE SUMMARY

About google android developers:-

An Android Developer is a Software Developer who specializes in designing applicationsfor


the Android marketplace. The Android marketplace is the direct competitor to Apple's app
store. This means most of an Android Developer's job revolves around creating the apps we
use on our smartphones and tablets.

1.1. Learning Objectives:


Android Programming Course Objectives In this course, you will learn about:
• Creating robust mobile applications and learn how to integrate them with other services

• Creating intuitive, reliable mobile apps using the android services and components

• Create a seamless user interface that works with different mobile screens

1.2. Outcomes:
Posted by Erica Hanson, Global Program Manager, Google Developer Student Clubs
Google Developer Student Clubs, a program of university based community groups for
students interested in Google developer technologies, recently started hosting study groups
calledAndroid Study Jams. The goal is to Learn Android app development through hands-
on codelabs in an online curriculum provided by Google. There are two tracks: one for
students who are new to programming, and one for those who already have experience.
Interested in participating? Facilitator materials are available for anyone to host Android
Study Jams in their community - take a look and start building apps.

Google Developer Student Clubs are dedicated to helping students learn programming
together, in a fun and interactive setting. While over 50 thousand students from all over the
worldhave participated in these Android workshops, we wanted to highlight the exciting
work from groups in Indonesia, Turkey, and Nigeria. From programming in Kotlin to
building a series of apps, these students have put their minds to work.
CHAPTER 2 : INTRODUCTION

2.1. Introduction to Google Android Development

Google Development is a treasure trove for programmers seeking to build innovative


applications. Offered by the tech giant itself, it provides a comprehensive suite of tools,
resources, and platforms to empower developers. Whether you're a seasoned coder or a
curious beginner, Google Developers caters to all skill levels. Explore cutting-edge
technologies like Artificial Intelligence and Machine Learning, or delve into familiar
territories like web and mobile app development. They offer APIs (Application
Programming Interfaces) for seamless integration with popular Google products like Maps
and YouTube, allowing you to craft unique functionalities. Join vibrant developer
communities like Google Developer Groups (GDGs) to connect, collaborate, and learn from
fellow programmers. Google Developers is your one-stop shop to transform your app ideas
into reality.

2.2. Benefits of Google Android Development

There are several advantages to pursuing Google Android Development:

• Large Market Reach: Android boasts the biggest market share in the mobile operating
system landscape. Developing for Android allows you to reach a wider audience compared
to other platforms.
• Open-Source Platform: The open-source nature of Android grants developers greater
flexibility and customization options when building apps.
• Rich Development Tools: Google offers a robust suite of tools like Android Studio, an
IDE specifically designed for Android app development, to enhance development
efficiency.
• Vibrant Developer Community: A vast and active community of Android developers
exists, providing extensive support, learning resources, and collaboration opportunities.

2.3. Google Android Development Framework

The Android development framework provides the foundation for building Android
applications. It offers a collection of pre-built components and functionalities to streamline
development. Here's a quick overview:
• Core Components: These include Activity Manager (app lifecycle), View System (UI
elements), Resource System (app resources), and Services (background tasks).
• APIs: Android APIs grant access to device features (camera, sensors), network
functionalities, and integration with Google services (Maps, YouTube).
• Open-Source: Developers benefit from flexibility and customization due to the open-
source nature of the framework.
• Development Tools: Google offers tools like Android Studio (IDE) to simplify the
development process.
• Learning Resources: A vast developer community and extensive documentation from
Google provide ongoing support and learning opportunities.
Mastering this framework empowers developers to build feature-rich and user-friendly
applications for the widely used Android platform.

2.4. Understanding Android Development


Android powers a vast majority of smartphones, making it a prime target for appdevelopers.
Here's a glimpse into what it takes to build Android apps:
• Languages: Master Kotlin (preferred) or Java, the primary languages for Android
development.
• Core Concepts: Grasp the building blocks: Activities (app screens), Views (UI
elements),Services (background tasks), and Broadcast Receivers (event listeners).
• Architecture: Android apps follow a structured approach. Learn about Activity lifecycles
andhow components interact.
• UI/UX: Design user interfaces that are intuitive and follow Android's design guidelines
for aseamless user experience.
• Resources: Leverage Google's Android Developer resources including tutorials,
documentation, and code samples to kickstart your learning.
• Community: The vibrant Android developer community offers invaluable support,
fromtroubleshooting to collaboration.
With dedication and these fundamentals, you'll be well on your way to conquering the
world of Android development!
CHAPTER 3: OVERVIEW OF THE ORGANISATION

Google Android Developer:


Our One-Stop Shop for Android App Development.Google Android Developer has
developer.android.com as the official Android developer website, is a comprehensive
resource for anyone interested in building apps for the Android platform. It caters to
developers of all skill levels, from complete beginners to seasoned professionals.

Here's an overview of what you can find on developer.android.com:


3.1. Learning Resources:
• Get Started: This section guides you through the initial steps of setting up your
development environment with Android Studio and building your first basic app.
• Training: Explore a wide range of educational resources, including video courses,
codelabs (step-by-step tutorials), and documentation, covering various aspects of Android
development.
• Android Basics in Kotlin: A structured curriculum designed to introduce you to Android
app development using Kotlin, the preferred language for Android development.
• API Reference: Find detailed documentation on all the APIs (Application Programming
Interfaces) available in the Android framework, providing a comprehensive reference for
building app functionalities.
• Samples: Access a vast collection of ready-made code samples that showcase specific
functionalities and best practices, allowing you to learn by example.

3.2. Development Tools:


• Android Studio: Download and install the official Integrated Development Environment
(IDE) specifically designed for Android app development. It offers features like code
completion, debugging tools, and app building functionalities.
• Command-line Tools: Learn about the command-line tools available for advanced
development tasks and working with the Android SDK (Software Development Kit)
directly.
• Testing Tools: Discover tools for writing unit tests, UI tests, and performance tests to
ensure the quality and stability of your apps.
• Libraries: Explore libraries provided by Google and the developer community that offer
additional functionalities and simplify app development.
3.3. Documentation and Updates:
• About: Learn about the latest Android platform version, explore the Android developer
ecosystem, and discover training resources.
• Develop for Android: This comprehensive section covers all aspects of Android
development, from user interface design to device compatibility and integrating AI
features.
• Guides: Find in-depth guides on specific functionalities like user interface design, data
storage, security, and background processing.
• Blog: Stay updated on the latest announcements, platform updates, new features, and best
practices from the Android developer team.

3.4. Additional Resources:


• Developer Centers: Explore resources specific to different app categories like media
apps, games, and wearable apps.
• Android for Cars, Android TV, ChromeOS: Find dedicated resources for extending
your apps to other platforms powered by Android.
• Community: Connect with other developers, share knowledge, and seek help through
forums and online communities.

Overall, Google provide’s developer.android.com as an invaluable resource for anyone


lookingto build apps for the Android platform. It provides everything you need to get started,
learn the ropes, and stay up-to-date with the latest advancements in Android development.
1. ACTIVITY LOG AND WEEKLY REPORTWEEK-1

Table 4.1: Activity log for the first week

Brief description of the Person In-


Day Learning Outcome Charge
daily activity
Signature
Learned how to write
Day-1 First Program in Kotlin
program in Kotlin

Create and use Variables in Learned about Variables


Day-2
Kotlin in Kotlin
Create and use functions in Learned about functions
Day-3
kotlin in kotlin
Learned the setup of
Setup Android Studio andfirst
Android Studio and
Day-4 program in android studio
executed first android
emulator
app in emulator
Connected Android device to Debugging using
Day-5
android studio Android device
Learned about
Build a simple app with text
Day-6 composable and
composable and images
images in android studio
1.1 WEEKLY REPORT

WEEK-1 (From Date 15-04-2024 to Date 20-04-2024)

Objective of the Activity Done: Starting with Kotlin and Android Studion

Detailed Report:

Your first program in Kotlin

• A Kotlin program requires a main function as the entry point of the program.

• To define a function in Kotlin, use the fun keyword, followed by the name of the
function,any inputs enclosed in parentheses, followed by the function body enclosed in
curly braces.
• The name of a function should follow camel case convention and start with a lowercase
letter.
• Use the println() function call to print some text to the output.

• Refer to the Kotlin style guide for formatting and code conventions to follow when
codingin Kotlin.
• Troubleshooting is the process of resolving errors in your code.

Create and use variables in Kotlin

• A variable is a container for a single piece of data.

• You must declare a variable first before you use it.

• Use the val keyword to define a variable that is read-only where the value cannot change
once it's been assigned.
• Use the var keyword to define a variable that is mutable or changeable.

• In Kotlin, it's preferred to use val over var when possible.

• To declare a variable, start with the val or var keyword. Then specify the variable name,
data type, and initial value. For example: val count: Int = 2.
• With type inference, omit the data type in the variable declaration if an initial value
isprovided.
• Some common basic Kotlin data types include: Int, String, Boolean, Float, and Double.
• Use the assignment operator (=) to assign a value to a variable either during declaration
ofthe variable or updating the variable.

• You can only update a variable that has been declared as a mutable variable (with var).

• Use the increment operator (++) or decrement operator (--) to increase or decrease
thevalue of an integer variable by 1, respectively.
• Use the + symbol to concatenate strings together. You can also concatenate variables
ofother data types like Int and Boolean to Strings.

Create and use functions in kotlin

• Functions are defined with the fun keyword and contain reusable pieces of code.

• Functions help make larger programs easier to maintain and prevent the
unnecessaryrepetition of code.
• Functions can return a value that you can store in a variable for later use.

• Functions can take parameters, which are variables available inside a function body.

• Arguments are the values that you pass in when you call a function.

• You can name arguments when you call a function. When you use named arguments,
youcan reorder the arguments without affecting the output.
• You can specify a default argument that lets you omit the argument when you
call afunction.

Download and install Android Studio

• An Integrated Development Environment, or IDE, is a collection of tools for


developingsoftware.
• Android Studio is the IDE based on IntelliJ IDEA used for Android development.

Create your first Android app

• To create a new project: open Android Studio, click New Project > Empty Activity >
Next,enter a name for your project and then configure its settings.
• To see how your app looks, use the Preview pane.

• Composable functions are like regular functions with a few differences: functions names
are capitalized, you add the @Composable annotation before the function, @Composable
functions can't return anything.

Run your first app on the android Emulator

• To create an AVD, open your project, click Tools > Device Manager, and use the Device
Manager to select a hardware device and system image.
• To run your app on a virtual device, ensure that you created a device, select the device
from the toolbar menu, and click .

How to connect your Android device

• You can run Android apps on your physical device through a cord or through Wi-Fi.

• Windows users need to install a USB debugging driver to run apps on their physical device.

• If you are running your app through Wi-Fi, you can pair using a QR code or a 6 digit code.

Build a simple app with text composables

• Jetpack Compose is a modern toolkit for building Android UI. Jetpack Compose simplifies
and accelerates UI development on Android with less code, powerful tools, and intuitive
Kotlin APIs.
• The user interface (UI) of an app is what you see on the screen: text, images, buttons, and
many other types of elements.
• Composable functions are the basic building block of Compose. A composable function is
a function that describes some part of your UI.
• The Composable function is annotated with the @Composable annotation; this annotation
informs the Compose compiler that this function is intended to convert data into UI.
• The three basic standard layout elements in Compose are Column, Row, and Box. They
are Composable functions that take Composable content, so you can place items inside.
For example, each child within a Row will be placed horizontally next to each other.

Add images to your android app

• The Resource Manager tab in Android Studio helps you add and organize your images
andother resources.
• An Image composable is a UI element that displays images in your app.
WEEK-2

Table 4.2: Activity log for the second week

Brief description of the Person In-


Day Learning Outcome Charge
daily activity
Signature

Learned Conditions in
Day-1 Conditions in Kotlin
Kotlin

Learned Nullability in
Day-2 Nullability in Kotlin
Kotlin

Learned about Classes


Day-3 Classes in Kotlin
in Kotlin

Learned about
properties and
Day-4 Objects in Kotlin
functionalities of
Objects in Kotlin

Day-5 Function Types in Kotlin Learned Function

Learned Lambda
Day-6 Lambda Expressions in Kotlin
Expressions
4.2 WEEKLY REPORT

WEEK-2 (From Date 22-04-2024 to Date 27-04-2024)

Objective of the Activity Done: Starting with Kotlin Fundamentals

Detailed Report:

Conditions In Kotlin:

Conditions are commands in programming that make decisions, allowing code to behave
differently based on different conditions. Decision-making in programming involves writing
instructions for how a program should act in different situations. In Kotlin, we use an if/else
statement to perform different actions based on a condition.

IF Condition: An if condition in programming executes code based on whether a


givencondition is true or false.

ELSE Branch: The “else” keyword in programming provides an alternative action when
the“if” condition is not met.

ELSE IF Condition: An `else if` statement in programming allows for additional


conditions tobe checked if the initial `if` condition is false.

WHEN Statement: The `when` expression in Kotlin is used for handling multiple
conditions,similar to a switch statement in other languages.

• Use a comma(,) for multiple conditions


• Use 'in' keyword for a range of conditions
• Use ‘is’ keyword to check data type
• Use if/else and when as expressions

Use Nullability In Kotlin:

Nullability in KOTLIN improves code reliability by differencing between Nullable and Non-
Nullable types, marked with “?” for Nullable types.

• Use nullable variables


• Handle nullable variables
• Use “?” Safe call operator
• Use “!!” Not-null assertion operator
• Use if/else conditions
• Use if/else expressions
• Use “?:” elvis operator

Classes and Objects in Kotlin:

In Kotlin, classes are blueprints for creating objects that encapsulate data and behavior.
Objects are instances of classes that hold unique state and can perform actions defined by
their class.

1. Introduction to classes

2. Create an instance of a class

3. Defining class methods

4. Defining class properties

5. Getter and Setter functions inproperties


6. Defining a Constructor

o Default Constructor

o Parameterized Constructor

7. Main types of Constructors in Kotlin

o Primary

o Secondary

8.Relationship between classes

o HAS-A (Aggregation)

o IS-A (Inheritance)

9.Visibilty Modifiers

o Public

o Protected

o Private

o Internal
Function Types And Lambda Expressions In Kotlin:

“Function types” specify the types of parameters and return values for functions, “Lambda
expressions” provide concise syntax for defining anonymous functions inline.

1. Store a function in a variable


2. Use functions as a data type
3. Use a function as a return type
4. Passing a function as an argument
5. Nullable function types
6. Pass lambda expression
7. Use trailing lambda syntax
8. Use the repeat() function
WEEK-3

Table 4.3: Activity log for the third week

Brief description of the Learning Person In-


Day Charge
daily activity Outcome
Signature

Learned about Dice


Day-1 Intro to Dice Roller app
Roller app

Learned how to create


Day-2 Create an Dice Roller app
Dice Roller app

Learned how to use


Day-3 Use the Debugger Debugger in Android
Studio

Learned about
Day-4 Intro to Tip Calculator
Calculator

Learnd about state in


Intro to state in Compose Compose and
Day-5
and calculate a custom tip calculated a custom
tip

Learned how to write


Day-6 Write automated Tests automated tests in
android
4.3 WEEKLY REPORT

WEEK-3 (From Date 29-04-2024 to Date 04-05-2024)


Objective of the Activity Done: Interacting with UI and State, Kotlin Fundamentals

Detailed Report:

Creating an Interactive Dice Roller App in Android Development

Introduction

A dice roller app is a basic yet engaging application that simulates the rolling of a
dice. It'sa popular choice for beginners to learn Android development due to its simplicity
and the opportunity to explore fundamental concepts. This report outlines the core
components and stepsinvolved in building a dice roller app.

Core Components
• UI (User Interface):

o An image view to display the dice face.

o A button to trigger the dice roll.

• Logic:

o Random number generation to simulate dice rolls.

o Image resource management to display different dice faces based on the random
number.

Development Steps

1. Project Setup

2. UI Design

3. Image Resources

4. Dice Rolling Logic

5. Button Click Handler


Understanding UI and State

• UI (User Interface): The visual elements users interact with, such as buttons, text fields,
and images.
• State: Data that can change over time and affects the UI's appearance, such as user input,
application data, and network responses.

Core Concepts

• Views: Building blocks of the UI. They represent visual elements on the screen and handle
user interactions.
• Layouts: Organize views into hierarchies to define the UI structure.

• View Groups: Containers that hold other views, such as LinearLayout, RelativeLayout,
and ConstraintLayout.
• State Management: Techniques for storing and managing application data that affect the
UI’s Managing State
• Instance State: Save and restore UI state when an activity or fragment is destroyed and
recreated.
• Shared Preferences: Store simple key-value pairs for persistent data.

• SQLite Database: For structured data storage.

• LiveData: Observe data changes and update the UI automatically.

• ViewModel: Store and manage UI-related data that survives configuration changes.

• StateFlow and SharedFlow: For reactive state management with Kotlin Flow.

Best Practices

• Separation of Concerns: Keep UI and logic separate for maintainability.

• Data Binding: Bind UI elements to data sources for efficient updates.

• State Management Architecture: Choose the appropriate state management solution


based on app complexity and requirements.
• Testing: Write unit and UI tests to ensure correct behavior.
WEEK-4

Table 4.4: Activity log for the fourth


week

Brief description of the Person In-


Day Learning Outcome Charge
daily activity
Signature

Learned about key


Day-1 Key features of Kotlin
features of kotlin

Learned about syntax,


Basic syntax, Data Types
Day-2 Data Types and
andCollections
Collections

Learned control flow


Control flow and
Day-3 and functions with
functionswith
Collections
Collections

Learned about
Day-4 Intro to Affirmations app
Affirmation app

Learned about
Day-5 Scrollable List
Scrollable List

Day-6 Build a grid Learned about grid


4.4 WEEKLY REPORT

WEEK-4 (From Date 06-05-2024 to Date 11-05-2024)

Objective of the Activity Done: Built Scrollable lists and Beautiful apps

Detailed Report:

Kotlin is a versatile and modern programming language that combines concise syntax
withpowerful features for both object-oriented and functional programming paradigms. Its
interoperability with Java makes it suitable for a wide range of applications, from Android
development to backend services and web applications. By understanding these
fundamentals, developers can leverage Kotlin's strengths to write efficient, maintainable,
and scalable code across various platforms

Creating scrollable lists is a fundamental aspect of developing user interfaces in


Android applications. Scrollable lists allow users to navigate through large datasets
efficiently, presentinginformation in a clean, organized manner. Jetpack Compose, a modern
toolkit for building nativeUI, provides a simplified approach to creating these lists with
components like ‘LazyColumn’ . This guide explains how to build a scrollable list in Jetpack
Compose by using data classes, composable functions, and other essential concepts.

In this guide, you will learn how to build an Affirmations app using Jetpack Compose.
Theapp will display a list of encouraging messages (or quotes!) paired with beautiful images,
designedto bring positivity to your day. By leveraging Jetpack Compose, you can create a
smooth, scrollable list that presents this uplifting content in an engaging manner. The key
concepts include data classes, composable functions, and efficient list management with
‘LazyColumn’

Creating scrollable lists in Jetpack Compose involves defining a data model, crafting
individual item components using ‘Card’ composables, and organizing these items within a
‘LazyColumn’ for efficient scrolling. Utilizing modifiers and surface composables ensures
that the UI is well-styled and responsive. The declarative nature of Compose simplifies the
process, allowing developers to build dynamic and interactive lists with ease.
WEEK-5

Table 4.5: Activity log for the fifth week

Brief description of the Learning Person In-


Day Charge
daily activity Outcome
Signature

Learned about
Material Design with
Day-1 Material Design with
Compose
Compose

Learned about
Material Theming with
Day-2 Material Theming with
Jetpack Compose
Jetpack Compose

Learned about Simple


Simple Animation with
Day-3 Animation with
Jetpack Compose
Jetpack Compose

Learned App
Day-4 Intro to App architecture
architecture

Learned about UI
Day-5 Architecture: The UI Layer
Layer

Learned about
Day-6 ViewModel
ViewModel
4.5 WEEKLY REPORT

WEEK-5 (From Date 13-05-2024 to Date 18-05-2024)


Objective of the Activity Done: Architecture Components
Detailed Report:

Material Design, created by Google, offers guidelines for building high-quality digital
experiences for Android and other platforms. This module focuses on Material Theming,
which lets you customize your app's colors, typography, and shapes. You'll also learn to add
a top app bar with the app's name and icon. Prerequisites include familiarity with Kotlin,
building layouts and simple lists in Compose. You'll learn to apply Material Theming, add
custom colors, fonts, and shapes, and create a top app bar. You'll need the latest version of
Android Studio and an internet connection to download starter code and fonts.

At last I created a Material app by customizing color palettes for light and dark themes,
defining component shapes, downloading and integrating custom fonts, and designing a top
bar for branding. Through this codelab, you learned how to use Material Theming to
personalize colors, typography, and shapes. Key files include Theme.kt for theme settings,
Color.kt for colordefinitions, Shape.kt for shapes, and Type.kt for typography. These skills
enable you to craft unique and cohesive app designs.

In Android, an activity is referred to as one screen in an application. It is very similar to a


single window of any desktop application. An Android app consists of one or more screens
or activities.

Activity Lifecycle in Android

1. onCreate 5. onPause
2. onStart 6. onStop
3. onRestart 7. onDestroy
4. onResume
A typical Android app contains multiple app components, including activities, fragments,
services, content providers, and broadcast receivers. You declare most of these app
components in your app manifest. The Android OS then uses this file to decide how to
integrate your app intothe device's overall user experience.

Architecting your Compose UI:

In Compose, the only way to update the UI is by changing the state of the app. What
you can control is your UI state. Every time the state of the UI changes, Compose recreates
the parts of the UI tree that changed. Composables can accept state and expose events.

Unidirectional data flow: A unidirectional data flow (UDF) is a design pattern in which
state flows down and events flow up. By following unidirectional data flow, you can
decouple composables that display state in the UI from the parts of your app that store and
change state.

The UI update loop for an app using unidirectional data flow looks like the following:
• Event: Part of the UI generates an event and passes it upward—such as a button click
passed to the ViewModel to handle—or an event that is passed from other layers of your
app, such as an indication that the user session has expired.
• Update state: An event handler might change the state.

• Display state: The state holder passes down the state, and the UI displays it.

The use of the UDF pattern for app architecture has the following implications:

• The ViewModel holds and exposes the state the UI consumes.

• The UI state is application data transformed by the ViewModel.

• The UI notifies the ViewModel of user events.


WEEK-6

Table 4.6: Activity log for the sixth week

Brief description of the Learning Person In-Charge


Day
daily activity Outcome Signature

Introduction to
Day-1 Learned about
Navigation and
Navigation and
Cupcake App
Cupcake App

Navigate between screens Learned about


Day-2 screens
with compose
and compose

Day-3 Test the cupcake app Tested the cupcake


app

Learned adaptive
Day-4 Adaptive layouts
layouts

Built an adaptive
Build an adaptive app
Day-5 appwith dynamic
withdynamic
navigation
navigation

Build an app with an Built an app with


Day-6 adaptive an
layout adaptive layout
4.6 WEEKLY REPORT

WEEK-6 (From Date 20-05-2024 to Date 25-05-2024)


Objective of the Activity Done: Navigation in Jetpack, Adapt for different Screen Sizes
Detailed Report:

Purpose and Benefits

Jetpack Navigation addresses common challenges in Android app development related to


navigating between different screens and passing data between them. Its primary benefits
include:

• Single Source of Truth: Navigation graphs provide a centralized representation of the app's
navigation structure, making it easier to visualize and manage.
• Type Safety: Navigation in Jetpack is type-safe, meaning you can navigate between
destinations using actions defined in the navigation graph, reducing runtime errors.
• Back Stack Management: Jetpack Navigation manages the back stack automatically,
ensuring a consistent back navigation experience for users.
• Deep Linking: It supports deep linking, allowing users to navigate directly to specific
destinations within the app from external sources like URLs.

Core Components of Jetpack Navigation

Navigation Graph

A navigation graph is an XML resource file that defines all possible destinations and
the actions that can be taken to navigate between them. It acts as a visual representation of
the app's navigation hierarchy.

NavHostFragment

The NavHostFragment is a container within your layout that hosts the navigation graph.
It dynamically swaps out fragments defined in the navigation graph as the user navigates
through the app.
NavController

The NavController is responsible for managing navigation within the NavHost


Fragment. It is obtained using Navigation. Find NavController() and allows you to navigate
between destinations and observe changes in the navigation state.

Adapt for different screen sizes

One of the great advantages of developing our app in the Android platform is the vast
opportunity to reach users in different kinds of form factors, such as wearables, foldables,
tablets,desktop, and even TV. When using an app, your users may want to use the same app
on large screen devices to take advantage of the increased real estate. Increasingly, Android
users use theirapps on multiple devices of varying screen sizes, and expect a high-quality user
experience acrossall devices.

So far, I learned to make apps primarily for mobile devices. In this, I’ve learned how
to transform my apps to make them adaptive to other screen sizes. I'll use adaptive navigation
layoutpatterns that are beautiful and usable for both mobile and large screen devices, such
as foldables,tablets, and desktop.
WEEK-7

Table 4.7: Activity log for the seventh week

Brief Learning Person In-


Day description Charge
Outcome
of the
Signature
daily activity
Learned how to
Day-1 Connection to
Internet and connect to Internet
Introduction to
Introduction to
Coroutines Coroutines
Learned about data
Introduction to transfer using
Day-2 HTTP/REST
and Get data HTTP/REST and
from the Internet Learned how to get
data from the Internet

Architecture: Learned about the


Day-3 The Data Data Layer in Android
Layer and Load And Learned how to
and display display images from
images from the the Internet
Internet
Introduction to Learned about
Day-4 Databases and Database and SQL and
SQL and Use Learned how to read
SQL to read and And write data to
write todatabase Databases through
SQL
Kotlin Flows in Learned the flows in
Day-5 Kotlin and Learned
Practice and
Using Room about Room’s in Kotlin
API’s
Kotlin API’s
Persist Data Learned data in room
Day-6 with Room and and Learned operations
Read and update on data with Room
data with
Room
4.7 WEEKLY REPORT

WEEK-7 (From Date 27-05-2024 to Date 01-06-2024)


Objective of the Activity Done: Get Data From the Internet, Load and Display images from
the internet
Detailed Report:

Get data from the internet

In this unit, I have learnt on how to build an Android app that can retrieve data from
the internet. The key concepts covered include Kotlin coroutines for asynchronous
programming andRetrofit for consuming RESTful web services.

Introduction to Coroutines

Kotlin coroutines allow us to write asynchronous code in a sequential style, making


it easier to handle background tasks. Coroutines help manage long-running tasks like
network operations, which would otherwise block the main thread and lead to an
unresponsive app. Key coroutine builders include:

• launch: Starts a new coroutine without blocking the current thread.

• async: Starts a coroutine and returns a Deferred, which represents a future result.

• runBlocking: Blocks the current thread until its scope completes, useful in main functions
or tests.

HTTP and REST

HTTP (Hypertext Transfer Protocol) is the foundation of any data exchange on the
Web. REST (Representational State Transfer) is an architectural style that uses HTTP
methods to create, read, update, and delete data. RESTful services use standard HTTP
methods:

• GET: Retrieve data from the server.

• POST: Send data to the server.


• PUT: Update existing data on the server.

• DELETE: Remove data from the server.

APIs (Application Programming Interfaces) based on REST principles are


called RESTful APIs

Architecture: The Data Layer:

In this we may learn about the data layer and its two basic components: repositories and the
datasource. We will also cover data immutability, error handling, threading, testing in this
concept.

Add respository and manual dependency injection:

• Separate the UI layer and the Data layer


• Create Datalayer
• Dependency injection
• Attach application container to the app
• Add repository to view model
• Get setup for local tests
• Create fake data and dependencies for tests
• Write a repository test
• Write a viewmodel test
• Get the solution code

Load and display images from the internet:

• App overview

• Display a downloaded image

• Display a grid of images with a lazy vertical grid

• Add retry action

• Update the viewmodel test

From this topic I had learnt about the load and display images from the internet by using the
above steps like add repository and manual dependency injection steps and also load and
display images from the internet steps finally I am concluding that these are the steps I used
in downloading and display image from the internet and we may apply architecture best
practices tothe app and use coil to download and display images.

Objective of the Activity Done: Introduction to SQL, Use Room for Data Persistence
Detailed Report:

Introduction
SQL (Structured Query Language) is a specialized programming language essential for
managing and manipulating data within relational database management systems (RDBMS).
Its primary purpose is to provide a standardized method for interacting with databases,
allowing usersto retrieve, manipulate, and define data efficiently. SQL consists of several
key components:

• Data Definition Language (DDL)

• Data Manipulation Language (DML)

• Data Control Language (DCL)

Importance of SQL:

SQL plays a crucial role in modern data management and is indispensable for various
reasons.

• Firstly, it provides a standardized language for interacting with relational databases,


ensuring consistency and compatibility across different platforms and systems.
• Secondly, SQL enables efficient data retrieval through its robust querying capabilities.
• Thirdly, SQL supports data integrity and security through mechanisms like constraints
(e.g., PRIMARY KEY, FOREIGN KEY) and permissions management (e.g., GRANT,
REVOKE).
• Fourthly, SQL facilitates data analysis and decision-making by enabling complexqueries,
aggregations, and transformations.
Use room for data persistance:

Room is a powerful library provided by Android that simplifies and streamlines data
persistence in SQLite databases. It serves as an abstraction layer over SQLite and offers
several benefits for Android developers:

1. Database Creation and Management: Room simplifies the creation and


management ofSQLite databases in Android applications. Developers define database
entities as annotated Java or Kotlin classes, and Room handles the creation of
corresponding SQLitetables.
2. SQLite Abstraction: Room abstracts away raw SQL queries and operations, providing
ahigher-level, object-oriented interface for interacting with the database. This abstraction
reduces the amount of boilerplate code needed to perform database operations compared
to traditional SQLite Open Helper implementations.
3. Compile-time Verification: Room provides compile-time verification of SQL queries
embedded in annotated methods, reducing runtime errors related to SQL syntax or table
schema mismatches. This ensures that queries are validated and errors are caught early in
the development process.
4. Support for Live Data and Rx Java: Room integrates seamlessly with Live Data (for
reactive data streams) and Rx Java (for reactive programming), allowing developers to
observe database changes and update the UI automatically when data changes occur.
5. Thread Safety: Room simplifies handling database operations on background threads by
providing built-in support for asynchronous queries and transactions. This ensures that
database operations do not block the main UI thread, improving app performance and
responsiveness.
6. Relationship Mapping: Room supports defining relationships between database entities
using annotations such as @Relation and @ForeignKey. This simplifies complex database
schema designs and facilitates efficient data retrieval using joins.
7. Migration Support: Room provides built-in support for database schema migrations.
Developers can specify migration paths to handle database schema changes between app
versions, ensuring data persistence without losing existing data.
8. Testing Support: Room facilitates easier testing of database-related code by allowing
developers to mock or provide in-memory implementations of the database during unit
tests. This promotes effective testing practices and ensures robustness in database.
WEEK-8
Table 4.8: Activity log for the nineth week

Brief
Day Learning Outcome Person in
description
of the Charge
signature
daily
activity
Learned about Datastore
Day-1 Introduction to & Learned about
Datastore &
Preferences Preferences with
with Datastore Datastore
Save Learned how to save
Day-2 Preferences Preferences locally with
locally with
Datastore &Learned
Datastore &
Introduction to about
Work Manager WorkManager

Learned how to
Implementing
Day-3 WorkManager Implement work
& Advanced manager & Learned
WorkManager about WorkManager and
and Testing
Testing
Learned about Android
Day-4 Android View
View System & Learned
System & Build
how to buildan Android
an Android app
app with Views
withViews
Compose in Learned about compose
Day-5 Views & Views in Views & Learned
in Compose about Views in
Compose
Learned about View
View
Day-6 Interoperability in
Interoperability
Compose & Learned
in Compose &
how
Add Compose
Add Compose to a
to a legacy app
legacyapp
4.8 WEEKLY REPORT

WEEK-8 (From Date 10-06-2024 to Date 15-06-2024)

Objective of the Activity Done: Store and access data using Keys with Datastore, Schedule
tasks with WorkManager

Detailed Report:

INTRODUCTION TO DATA STORE AND PREFERENCES:

Data Store is a modern way to store data in Android, replacing Shared Preferences. It offers
two types: Preferences Data Store for simple key-value pairs and Proto Data Store for
structured data, allowing for easier and safer data handling.

SAVE PREFERENCES LOCALLY WITH DATASTORE:

Datastore is a modern Android library for storing user preferences locally using a key- value
store or typed objects. It provides a more efficient and type-safe alternative to Shared
Preferences, using Kotlin Coroutines for asynchronous data access. Datastore supports both
preferences and proto formats, allowing for flexible data storage solutions. This helps
improve app performance and maintainability.

CREATE A FLIGHT SEARCH APP:

Creating a flight search app in Kotlin involves building a user-friendly interface to searchfor
flights, integrating APIs to fetch real-time flight data, and implementing features like
filteringby price, duration, and airlines. The app can use Recycler View for displaying search
results and include navigation components for seamless user experience. Additionally,
incorporating local storage for recent searches can enhance usability.

WorkManager is a powerful and flexible library for managing background work in Android
applications. It provides a robust solution for scheduling deferrable, asynchronous tasks that
are guaranteed to execute even if the app exits or the device restarts. Here are the key
takeaways:

• Simplicity and Reliability

• Versatility
• Constraints and Conditions

• Data Handling

• Unique Work and Task Management

• Testing Support

Objective of the Activity Done: Views and Compose


Detailed Report:

1. Android view system

2. Build an android app with views

3. Add compose to a legacy app

4. Android Developer Documentation

a. Tools for Compose | Jetpack Compose | Android Developers

b. Interoperability APIs | Jetpack Compose | Android Developers

c. Migration strategy | Jetpack Compose | Android Developers

d. Migrating to Jetpack Compose

5. Views in compose

6. View interoperability

This course may end here, but this is just the beginning of your journey into Android app
development!

In this course, I had learned to build apps using Jetpack Compose, the modern UI toolkit for
building native Android apps. Throughout this course, you built apps with lists, single or
multiple screens, and navigated between them. You learned to create interactive apps, made
yourapp respond to user input and updated the UI. You applied Material Design and used
colors, shapes, and typography to theme your app. You also used Jetpack and other third-
party libraries to schedule tasks, retrieve data from remote servers, persist data locally and
more.
5. OUTCOMES DESCRIPTION
5.1. Technical Skills Acquired as Android Developer Intern

Android development is a key area in mobile application development, enabling the creation
of applications for devices running the Android operating system. This document aims to
provide a comprehensive overview of the outcomes associated with mastering Android
development.

1. Comprehensive Understanding of Android Ecosystem

• Overview of Android OS: A solid understanding of the Android operating system, its
architecture, and its various components.
• Android Versions and API Levels: Familiarity with different Android versions, API
levels, and their features.
• Development Tools: Proficiency in using Android Studio, the official IDE for Android
development, and other essential tools such as Gradle, ADB, and the Android Emulator.
2. Proficiency in Java and Kotlin Programming Languages

• Java Basics: Mastery of Java fundamentals, as it is the primary language for Android
development.
• Kotlin Integration: Understanding Kotlin, the modern, statically-typed programming
language that is fully interoperable with Java and now officially supported by Google for
Android development.
• Coding Standards: Adherence to best practices and coding standards in both Java and
Kotlin to write clean, efficient, and maintainable code.
3. User Interface Design and Development

• UI/UX Principles: Knowledge of user interface (UI) and user experience (UX) design
principles specific to mobile applications.
• XML Layouts: Proficiency in designing responsive and dynamic UI layouts using XML.

• Material Design: Implementation of Google's Material Design guidelines to create


visually appealing and user-friendly interfaces.
• Custom Views and Animations: Ability to create custom views, animations, and
transitions to enhance the user experience.
4. Efficient Data Management and Persistence
• SQLite Database: Implementation of SQLite for local data storage and management.

• Room Persistence Library: Use of Room, an abstraction layer over SQLite, to simplify
database operations.
• Shared Preferences: Utilization of Shared Preferences for simple data storage.

• Content Providers: Integration of content providers to share data between applications.

5. Network Communication and API Integration

• HTTP Requests: Mastery of making network requests using libraries such as Retrofit,
OkHttp, and Volley.
• RESTful APIs: Understanding of REST principles and the ability to consume RESTful
APIs.
• JSON Parsing: Proficiency in parsing JSON responses to retrieve and display data.

• WebSockets: Implementation of WebSockets for real-time data communication.

6. Background Processing and Multithreading

• Asynchronous Programming: Understanding asynchronous programming techniques to


perform tasks in the background.
• Services and WorkManager: Implementation of Android services and WorkManager for
background tasks.
• Threading: Knowledge of threading concepts, including the use of Async Task, Handler,
and Executors.
7. Integration of Third-Party Libraries and SDKs

• Library Management: Ability to integrate and manage third-party libraries and SDKs
using Gradle.
• Popular Libraries: Familiarity with popular libraries such as Glide, Picasso, Dagger, and
Firebase.
8. Testing and Debugging

• Unit Testing: Writing unit tests using JUnit and Mockito to ensure code reliability.

• UI Testing: Implementation of UI tests using Espresso and UIAutomator.

• Debugging Tools: Proficiency in using Android Studio's debugging tools to identify and
fix issues.
9. App Deployment and Distribution

• APK Generation: Understanding the process of generating signed APKs for deployment.
• Google Play Store: Knowledge of the Google Play Store submission process, including
the creation of store listings, managing app versions, and tracking app performance using
the Google Play Console.

• Continuous Integration and Delivery: Implementation of CI/CD pipelines to automate


build, test, and deployment processes.
10. Ethical Considerations and Security Practices

• Data Privacy: Ensuring user data privacy by following best practices and regulations such
as GDPR.
• Security Measures: Implementation of security measures to protect sensitive data and
prevent common vulnerabilities such as SQL injection, XSS, and insecure data storage.
• Ethical Coding: Adherence to ethical standards in coding practices, including
accessibility and inclusivity considerations.

5.2. Sample Code

setContent { DiceRollerTheme
{
Surface(modifier = Modifier.fillMaxSize(), color =
MaterialTheme.colorScheme.background) {
DiceRollerApp()
}
}
}
}
}

@Preview
@Composable
fun DiceRollerApp() {
DiceWithButtonAndImage(modifier =
Modifier.fillMaxSize().wrapContentSize(Alignment.Center))
}

@Composable
fun DiceWithButtonAndImage(modifier: Modifier = Modifier) { var
result by remember { mutableStateOf(1) }
val imageResource = when(result) { 1 ->
R.drawable.dice_1
2 -> R.drawable.dice_2
3 -> R.drawable.dice_3
4 -> R.drawable.dice_4
5 -> R.drawable.dice_5 else ->
R.drawable.dice_6
}
Column(modifier = modifier, horizontalAlignment = Alignment.CenterHorizontally) {
Image(painter = painterResource(imageResource), contentDescription =
result.toString())

5.3. Sample Questions

1. What is an Intent in Android?


Answer:
An Intent in Android is a messaging object used to request an action from another app
component. It can be used to start activities, services, and broadcast receivers, facilitating
communication between different parts of an app or different apps.

2. How does RecyclerView differ from ListView?


Answer:
RecyclerView is a more advanced and flexible version of ListView. It supports the efficient
recycling of item views, provides more powerful layout customization, supports different
layout managers, and includes item animations and decorations out of the box.

3. What is the purpose of the AndroidManifest.xml file?


Answer:
The AndroidManifest.xml file declares essential information about the app to the Android
system, such as the app's components (activities, services, broadcast receivers), required
permissions, hardware and software features, and app metadata.

4. Explain the concept of Gradle in Android development.


Answer:
Gradle is a build automation tool used in Android development for managing project
dependencies, defining build configurations, and automating the build process. It provides
flexibility and control over the build process through its Groovy-based domain-specific
language(DSL).

5. What is a Fragment in Android?


Answer:
A Fragment is a modular section of an activity that can be reused and managed
independently. Itrepresents a portion of the user interface in an activity and allows for more
dynamic and flexibleUI designs, particularly in tablets and other large-screen devices.
CONCLUSION

Android Basics with Compose: A Strong Foundation for Modern Android


Development The "Android Basics with Compose" course on developer.android.com offers
a fantastic
introduction to building modern Android apps using Jetpack Compose, the new UI toolkit
for Android. Here's a summary of its key takeaways:

What I’ve learned:

• Fundamentals of Kotlin: Gain a solid understanding of the Kotlin programming


language, the preferred choice for Android development. This includes core concepts like
variables, data types, control flow, functions, and classes.
• Building User Interfaces with Jetpack Compose: Discover the power of Compose in
creating declarative and composable UI elements. You'll learn how to structure layouts,
manage data binding, and handle user interactions.
• Creating Interactive Apps: Build apps that respond to user input, such as button clicks
and user gestures. Understand how to handle state changes and update the UI accordingly.
• Working with Data: Explore ways to manage data within your app, including displaying
data lists and handling user input.
• Material Design Principles: Learn how to design apps that are visually appealing and
user-friendly by following the Material Design guidelines.
Benefits of taking the course:

• Beginner-Friendly: This course is designed for individuals with no prior programming


experience.
• Hands-on Learning: You'll be building simple apps throughout the course, solidifying
your understanding through practical application.
• Modern Development Approach: Get exposed to Jetpack Compose, the future of
Android UI development.

• Strong Foundation: By completing the course, you'll gain a foundational knowledge of


Android development essential for further exploration.
If you're interested in building modern, visually appealing Android apps, the "Android
Basics with Compose" course is an excellent starting point. It equips you with the necessary
skillsto create interactive and user-friendly applications using Kotlin and Jetpack Compos
References

1. https://developer.android.com/courses/android-basics-compose/unit-1
2. https://developer.android.com/courses/android-basics-compose/unit-2
3. https://developer.android.com/courses/android-basics-compose/unit-3
4. https://developer.android.com/courses/android-basics-compose/unit-4
5. https://developer.android.com/courses/android-basics-compose/unit-5
6. https://developer.android.com/courses/android-basics-compose/unit-6
7. https://developer.android.com/courses/android-basics-compose/unit-7
8. https://developer.android.com/courses/android-basics-compose/unit-8

You might also like