SlideShare a Scribd company logo
1 of 38
DISCOVER, DESIGN, DEVELOP
CAMPAIGN
December 17,2023
ITS Engineering College & IIEST, Shibpur
ANDROID BOOTCAMP
ITS Engineering College & IIEST, Shibpur
Date : December 17,2023 | Session - 1
Krish Verma
Kotlin Lead
ITS Engineering College
What is Android?
The Android operating system is a mobile operating system that was
developed by Google to be primarily used for touchscreen devices,
cell phones, and tablets. Its design lets users manipulate the mobile
devices intuitively, with finger movements that mirror common
motions, such as pinching, swiping, and tapping. Google also
employs Android software in televisions, cars, and wristwatches—
each of which is fitted with a unique user interface.
•Open source operating system
•Open ecosystem
•Diverse phone options
•Customized or modified ROM
•User-friendly Play Store
•Easy and affordable app development
•Widgets
•Expandable storage option
Features/Advantages
Native Development
VS
Cross Platform Development
FEATURE NATIVE DEVELOPMENT CROSS-PLATFORM DEVELOPMENT
Target Platform Single platform (Android) Multiple platforms (Android, iOS, etc.)
Development Tools Android Studio, SDK specific tools
Framework specific tools (React
Native, Flutter, etc.)
Performance Superior
Good, but may not be as smooth as
native
User Interface/User Experience (UI/UX)
Native look and feel, full access to
platform UI components
Can look and feel "off" compared to
native apps, limited access to
platform UI components
Development Time
Longer, requires platform-specific
knowledge
Faster, can reuse code across
platforms
Maintenance
Separate codebases for each
platform
Single codebase for all platforms
Cost
Usually more expensive due to
separate codebases
Can be more cost-effective,
especially for multi-platform projects
Languages Used in
Android Development
Why Prefer Kotlin over Java?
● Shorter program for the same task.
● Kotlin is a statically-typed language which is very easy to read and write.
● It has a much simpler and shorter code than Java’s code for the same problem.
● As this makes the language more human-readable, it becomes easy to debug.
● Kotlin programs do not need semicolons in their program.
● Java Compatibility - Java and Kotlin code can co-exist in the same project.
● Kotlin plays well with the Java programming language.
● Moreover, a number of Java libraries can be used in Kotlin projects, making it even
more compatible.
What is JVM?
The Java Virtual Machine (JVM) is an interpreter that
executes Java applications.
You use the JVM to run the Android Studio IDE and
the Gradle build tool.
Java Virtual Machine
What is SDK?
A software development kit (SDK) is a set of platform-
specific building tools for developers.
You require components like debuggers, compilers, and
libraries to create code that runs on a specific platform,
operating system, or programming language.
Software Development Kit
What is Kotlin?
Kotlin is a general purpose, free, open source, statically
typed programming language designed for the JVM
(Java Virtual Machine) & Android, and combines object-
oriented and functional programming features.
It can be used in :
1. Native Development
2.Data Science
3.Server-Side
4.Web-Development
5.Android
Where it can be used?
About Null Pointer Exception
When we use C++ or Java , and if we assign any String a null value and get a
comparison check it will provide us with a NullPointerException and hence in
Kotlin we won’t get that error as Kotlin wouldn’t let that happen and will not let
you change the value of String to null. But still if you want to change it null then
you need to add a question mark in the end of String as shown above.
Namaste Kotlin Program
Let’s finally code
fun main() {
println(“Namaste Kotlin")
}
Variable in Kotlin
By default Kotlin, defines the data type of the variable by its own.
But we can also type cast it or define it by using : “data_type”
● Val : Val is a final value that can’t be reassigned.
● Var : Var can be reassigned and also we can’t change the
data type of var once declared.
Difference between Val and Var
About Lateinit
It is used to set the value of any variable with data type
var in the later code. It’s full form is Late Initialization
lateinit var x: String
Null Safety
var f:String? = null //here we are assigning the value of f as
null
fun main(){
val size = f?.length //now we are assigning the value of f(i.e.
null) to size.
val size: Int = f?.length //This will show an error as the data type
asked is Int which is not nullable
val size: Int? = f?.length // Now the data type becomes nullable too
println(size)
}
As we don’t know the size of f as it is null and the size can be null as well hence
we used ? to specify that f is nullable.
var f:String? = null
fun main(){
val size: Int = f?.length ?: 0
println(size)
}
val size: Int = f?.length ?: 0
// The above line expresses that if the left hand side of :
comes out to null then assign it the right hand side value
Merge two strings
String Concatenation
var f:String = “Krish"
fun main(){
println(f + “is the host"
}
The similar way to do is :-
var f:String = “Krish"
fun main(){
println("$f is the host")
println("The length of his name is ${f.length}")
}
An array is a group of similar elements or data items of
the same type collected at contiguous memory locations.
Arrays
val numbers = arrayOf(1,2,3,4,5,6)
println(numbers.joinToString())
val nameString = arrayof<String>("1","2","3","4")
Right now, we haven't specified the type of array, but we can do so by
Introduction to Classes
class User{
val name: String = "“
val mobile: Int = 1
val gender: String = "“
val email: String =""
val bio: String = ""
}
Layouts and Views
For making UI of apps we will use XML.
TextView
TextView is a user interface (UI) widget that displays text messages on a screen
<TextView
android:text=""
android:layout_wdith=""
android:layout_height="" />
android:layout_wdith="" & andorid:layout_height="" are the mandatory attributes to create any
view in the XML File.
android:text=""→ It is used to type in the text we want to write
android:textSize="" → Here we are required to provide the size to the text we wrote
match_parent → It takes the maximum size of the parent
wrap_content → It takes the size which is least required to view the object
android:gravity="" → It is about alignment of the text present in TextView
Now lets code in android studio
Linear Layout
TextView is a user interface (UI) widget that displays text messages on a screen
<LinearLayout
android:orientation="vertical" />
Here the orientation is set to vertical, hence all the views present the Layout will
be aligned vertically. Similarly we try using the horizontal layout using the
following code.
Now lets code in android studio
<LinearLayout
android:orientation="horizontal" />
Linear Layout
<LinearLayout
android:orinentation="horizontal"
<LinearLayout
android:orientation="vertical"
<TextView
andorid:text="Hello World"
android:layout_wdith=""
andorid:layout_height=""
/>
/>
<LinearLayout
android:orientation="vertical"
<TextView
andorid:text="Hello World"
android:layout_wdith=""
andorid:layout_height=""
/>
/>
/>
Now if we want to put the
stack of vertically aligned
view horizontal to a stack
of vertically aligned views
then we can make sub
branching of LinearLayout
and put another views into
their branches.
Now lets code in android studio
Weights
Now lets code in android studio
andorid:layout_weight=""
This will tell how much weightage will each view have on the screen.
Usage-
If we are dividing two views horizontally then we should rest its width to 0dp as we have
divided them equal weightage to both of them on the screen so no width is required now
And like if we want to distribute the text view equally under a layout we can simply apply
this attribute to each view under it so the weightage is equal to every view and hence it
gets equally distributed.
Margins & Padding
Now lets code in android studio
In Margin, the area gets subtracted from the view, but in the Padding the areas gets added
to it.
Now to use margins for a particular view we can use the attribute as
andorid:layout_margin="" and here we will provide the dp of margin required.
If you want margin only on the top then you can use android:layout_marginTop="“
android:padding="" → Here we can use the padded size in the View
dp : density-independent pixel, (dip/ dp) is a unit of length
ImageView
<ImageView
android:layout_width=""
android:layout_height=""
android:src="@darawable/<name>"
android:adjustViewBounds="true"
android:scaleType:""
/>
Conditions before Uploading or
Importing an Image
1.Image’s name should be lowercase
2.No number or symbol or uppercase
3.Image should be very small is size
Now lets code in android studio
Types of Layouts
Frame Layout – Android Frame layout is a ViewGroup subclass that is used to specify the
position of multiple views placed on top of each other to represent a single view screen.
Relative Layout – Relative Layout is a view group that displays child views in relative
positions. The position of each view can be specified as relative to sibling elements (such as
to the left-of or below another view) or in positions relative to the parent Relative Layout area
(such as aligned to the bottom, left or center).
Constraint Layout - It is the default layout provided by the Android Studio. Constraint Layout
is similar to Relative Layout, but with more power. It arranges views based on connections
between sibling views and the parent layout.
Now lets code in android studio
fun showtoast(view: View){
Toast.makeText(this, "This is a button click.",Toast.LENGTH_SHORT)
.show()
}
Now lets code in android studio
android:onClick="showtoast“ provides you a function as showtoast that gets
performed when we click the button.
This is about XML file but now we will get to the MainActivity.kt file then we will
get a method showtoast and you can modify it.
<Button
android:layout_width=""
android:layout_height=""
android:onClick="" />
BUTTON
QnA Time
Selfie Time
Thankyou✨!!

More Related Content

Similar to Android_Bootcamp_PPT_GDSC_ITS_Engineering

Unit 2 LayoutTutorial.pptx
Unit 2 LayoutTutorial.pptxUnit 2 LayoutTutorial.pptx
Unit 2 LayoutTutorial.pptxABHIKKUMARDE
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android AppsGil Irizarry
 
Basic android development
Basic android developmentBasic android development
Basic android developmentUpanya Singh
 
Basic android development
Basic android developmentBasic android development
Basic android developmentUpanya Singh
 
Developing Android and iOS Apps With C#, .NET, Xamarin, Mono, and Windows Azure
Developing Android and iOS Apps With C#, .NET, Xamarin, Mono, and Windows AzureDeveloping Android and iOS Apps With C#, .NET, Xamarin, Mono, and Windows Azure
Developing Android and iOS Apps With C#, .NET, Xamarin, Mono, and Windows AzureRainer Stropek
 
WP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a SilverlightWP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a SilverlightMICTT Palma
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User InterfaceMarko Gargenta
 
Presentation on design pattern software project lll
 Presentation on design pattern  software project lll  Presentation on design pattern  software project lll
Presentation on design pattern software project lll Uchiha Shahin
 
Technology and Android.pptx
Technology and Android.pptxTechnology and Android.pptx
Technology and Android.pptxmuthulakshmi cse
 
Mobile Day - Novedades en Android Oreo
Mobile Day - Novedades en Android OreoMobile Day - Novedades en Android Oreo
Mobile Day - Novedades en Android OreoSoftware Guru
 
Android | Busy Java Developers Guide to Android: UI | Ted Neward
Android | Busy Java Developers Guide to Android: UI | Ted NewardAndroid | Busy Java Developers Guide to Android: UI | Ted Neward
Android | Busy Java Developers Guide to Android: UI | Ted NewardJAX London
 
mobile application development -unit-3-
mobile application development  -unit-3-mobile application development  -unit-3-
mobile application development -unit-3-TejamFandat
 
android layouts
android layoutsandroid layouts
android layoutsDeepa Rani
 

Similar to Android_Bootcamp_PPT_GDSC_ITS_Engineering (20)

Unit 2 LayoutTutorial.pptx
Unit 2 LayoutTutorial.pptxUnit 2 LayoutTutorial.pptx
Unit 2 LayoutTutorial.pptx
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
 
React native
React nativeReact native
React native
 
Basic android development
Basic android developmentBasic android development
Basic android development
 
Basic android development
Basic android developmentBasic android development
Basic android development
 
Android layouts
Android layoutsAndroid layouts
Android layouts
 
Developing Android and iOS Apps With C#, .NET, Xamarin, Mono, and Windows Azure
Developing Android and iOS Apps With C#, .NET, Xamarin, Mono, and Windows AzureDeveloping Android and iOS Apps With C#, .NET, Xamarin, Mono, and Windows Azure
Developing Android and iOS Apps With C#, .NET, Xamarin, Mono, and Windows Azure
 
Java Applet
Java AppletJava Applet
Java Applet
 
WP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a SilverlightWP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a Silverlight
 
Marakana Android User Interface
Marakana Android User InterfaceMarakana Android User Interface
Marakana Android User Interface
 
Presentation on design pattern software project lll
 Presentation on design pattern  software project lll  Presentation on design pattern  software project lll
Presentation on design pattern software project lll
 
Technology and Android.pptx
Technology and Android.pptxTechnology and Android.pptx
Technology and Android.pptx
 
Mobile Day - Novedades en Android Oreo
Mobile Day - Novedades en Android OreoMobile Day - Novedades en Android Oreo
Mobile Day - Novedades en Android Oreo
 
Hello Android
Hello AndroidHello Android
Hello Android
 
Android | Busy Java Developers Guide to Android: UI | Ted Neward
Android | Busy Java Developers Guide to Android: UI | Ted NewardAndroid | Busy Java Developers Guide to Android: UI | Ted Neward
Android | Busy Java Developers Guide to Android: UI | Ted Neward
 
OOP-Chap2.docx
OOP-Chap2.docxOOP-Chap2.docx
OOP-Chap2.docx
 
mobile application development -unit-3-
mobile application development  -unit-3-mobile application development  -unit-3-
mobile application development -unit-3-
 
Android
AndroidAndroid
Android
 
Mobile Application Development class 002
Mobile Application Development class 002Mobile Application Development class 002
Mobile Application Development class 002
 
android layouts
android layoutsandroid layouts
android layouts
 

More from ShivanshSeth6

Python Workshop Day - 03.pptx
Python Workshop Day - 03.pptxPython Workshop Day - 03.pptx
Python Workshop Day - 03.pptxShivanshSeth6
 
RaspberryPi & Python Workshop Day - 02.pptx
RaspberryPi & Python Workshop Day - 02.pptxRaspberryPi & Python Workshop Day - 02.pptx
RaspberryPi & Python Workshop Day - 02.pptxShivanshSeth6
 
RaspberryPi & Python Workshop Day - 01.pptx
RaspberryPi & Python Workshop Day - 01.pptxRaspberryPi & Python Workshop Day - 01.pptx
RaspberryPi & Python Workshop Day - 01.pptxShivanshSeth6
 
Session on Design_Discover_Develop_Campaign_2.pptx
Session on Design_Discover_Develop_Campaign_2.pptxSession on Design_Discover_Develop_Campaign_2.pptx
Session on Design_Discover_Develop_Campaign_2.pptxShivanshSeth6
 
Design_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptxDesign_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptxShivanshSeth6
 
Cloud_Session_PPT.pptx
Cloud_Session_PPT.pptxCloud_Session_PPT.pptx
Cloud_Session_PPT.pptxShivanshSeth6
 
Info-Session-GDSC-ITSEngineeringCollege.pptx
Info-Session-GDSC-ITSEngineeringCollege.pptxInfo-Session-GDSC-ITSEngineeringCollege.pptx
Info-Session-GDSC-ITSEngineeringCollege.pptxShivanshSeth6
 

More from ShivanshSeth6 (7)

Python Workshop Day - 03.pptx
Python Workshop Day - 03.pptxPython Workshop Day - 03.pptx
Python Workshop Day - 03.pptx
 
RaspberryPi & Python Workshop Day - 02.pptx
RaspberryPi & Python Workshop Day - 02.pptxRaspberryPi & Python Workshop Day - 02.pptx
RaspberryPi & Python Workshop Day - 02.pptx
 
RaspberryPi & Python Workshop Day - 01.pptx
RaspberryPi & Python Workshop Day - 01.pptxRaspberryPi & Python Workshop Day - 01.pptx
RaspberryPi & Python Workshop Day - 01.pptx
 
Session on Design_Discover_Develop_Campaign_2.pptx
Session on Design_Discover_Develop_Campaign_2.pptxSession on Design_Discover_Develop_Campaign_2.pptx
Session on Design_Discover_Develop_Campaign_2.pptx
 
Design_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptxDesign_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptx
 
Cloud_Session_PPT.pptx
Cloud_Session_PPT.pptxCloud_Session_PPT.pptx
Cloud_Session_PPT.pptx
 
Info-Session-GDSC-ITSEngineeringCollege.pptx
Info-Session-GDSC-ITSEngineeringCollege.pptxInfo-Session-GDSC-ITSEngineeringCollege.pptx
Info-Session-GDSC-ITSEngineeringCollege.pptx
 

Recently uploaded

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfNirmal Dwivedi
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111GangaMaiya1
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfstareducators107
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of PlayPooky Knightsmith
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17Celine George
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonhttgc7rh9c
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use CasesTechSoup
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesSHIVANANDaRV
 

Recently uploaded (20)

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Our Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdfOur Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdf
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use Cases
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 

Android_Bootcamp_PPT_GDSC_ITS_Engineering

  • 1. DISCOVER, DESIGN, DEVELOP CAMPAIGN December 17,2023 ITS Engineering College & IIEST, Shibpur
  • 2. ANDROID BOOTCAMP ITS Engineering College & IIEST, Shibpur Date : December 17,2023 | Session - 1
  • 3. Krish Verma Kotlin Lead ITS Engineering College
  • 4. What is Android? The Android operating system is a mobile operating system that was developed by Google to be primarily used for touchscreen devices, cell phones, and tablets. Its design lets users manipulate the mobile devices intuitively, with finger movements that mirror common motions, such as pinching, swiping, and tapping. Google also employs Android software in televisions, cars, and wristwatches— each of which is fitted with a unique user interface.
  • 5. •Open source operating system •Open ecosystem •Diverse phone options •Customized or modified ROM •User-friendly Play Store •Easy and affordable app development •Widgets •Expandable storage option Features/Advantages
  • 6.
  • 8. FEATURE NATIVE DEVELOPMENT CROSS-PLATFORM DEVELOPMENT Target Platform Single platform (Android) Multiple platforms (Android, iOS, etc.) Development Tools Android Studio, SDK specific tools Framework specific tools (React Native, Flutter, etc.) Performance Superior Good, but may not be as smooth as native User Interface/User Experience (UI/UX) Native look and feel, full access to platform UI components Can look and feel "off" compared to native apps, limited access to platform UI components Development Time Longer, requires platform-specific knowledge Faster, can reuse code across platforms Maintenance Separate codebases for each platform Single codebase for all platforms Cost Usually more expensive due to separate codebases Can be more cost-effective, especially for multi-platform projects
  • 10. Why Prefer Kotlin over Java?
  • 11. ● Shorter program for the same task. ● Kotlin is a statically-typed language which is very easy to read and write. ● It has a much simpler and shorter code than Java’s code for the same problem. ● As this makes the language more human-readable, it becomes easy to debug. ● Kotlin programs do not need semicolons in their program. ● Java Compatibility - Java and Kotlin code can co-exist in the same project. ● Kotlin plays well with the Java programming language. ● Moreover, a number of Java libraries can be used in Kotlin projects, making it even more compatible.
  • 12. What is JVM? The Java Virtual Machine (JVM) is an interpreter that executes Java applications. You use the JVM to run the Android Studio IDE and the Gradle build tool. Java Virtual Machine
  • 13. What is SDK? A software development kit (SDK) is a set of platform- specific building tools for developers. You require components like debuggers, compilers, and libraries to create code that runs on a specific platform, operating system, or programming language. Software Development Kit
  • 14.
  • 15. What is Kotlin? Kotlin is a general purpose, free, open source, statically typed programming language designed for the JVM (Java Virtual Machine) & Android, and combines object- oriented and functional programming features.
  • 16. It can be used in : 1. Native Development 2.Data Science 3.Server-Side 4.Web-Development 5.Android Where it can be used?
  • 17. About Null Pointer Exception When we use C++ or Java , and if we assign any String a null value and get a comparison check it will provide us with a NullPointerException and hence in Kotlin we won’t get that error as Kotlin wouldn’t let that happen and will not let you change the value of String to null. But still if you want to change it null then you need to add a question mark in the end of String as shown above.
  • 18. Namaste Kotlin Program Let’s finally code fun main() { println(“Namaste Kotlin") }
  • 19. Variable in Kotlin By default Kotlin, defines the data type of the variable by its own. But we can also type cast it or define it by using : “data_type”
  • 20. ● Val : Val is a final value that can’t be reassigned. ● Var : Var can be reassigned and also we can’t change the data type of var once declared. Difference between Val and Var
  • 21. About Lateinit It is used to set the value of any variable with data type var in the later code. It’s full form is Late Initialization lateinit var x: String
  • 22. Null Safety var f:String? = null //here we are assigning the value of f as null fun main(){ val size = f?.length //now we are assigning the value of f(i.e. null) to size. val size: Int = f?.length //This will show an error as the data type asked is Int which is not nullable val size: Int? = f?.length // Now the data type becomes nullable too println(size) } As we don’t know the size of f as it is null and the size can be null as well hence we used ? to specify that f is nullable.
  • 23. var f:String? = null fun main(){ val size: Int = f?.length ?: 0 println(size) } val size: Int = f?.length ?: 0 // The above line expresses that if the left hand side of : comes out to null then assign it the right hand side value
  • 24. Merge two strings String Concatenation var f:String = “Krish" fun main(){ println(f + “is the host" } The similar way to do is :- var f:String = “Krish" fun main(){ println("$f is the host") println("The length of his name is ${f.length}") }
  • 25. An array is a group of similar elements or data items of the same type collected at contiguous memory locations. Arrays val numbers = arrayOf(1,2,3,4,5,6) println(numbers.joinToString()) val nameString = arrayof<String>("1","2","3","4") Right now, we haven't specified the type of array, but we can do so by
  • 26. Introduction to Classes class User{ val name: String = "“ val mobile: Int = 1 val gender: String = "“ val email: String ="" val bio: String = "" }
  • 27. Layouts and Views For making UI of apps we will use XML.
  • 28. TextView TextView is a user interface (UI) widget that displays text messages on a screen <TextView android:text="" android:layout_wdith="" android:layout_height="" /> android:layout_wdith="" & andorid:layout_height="" are the mandatory attributes to create any view in the XML File. android:text=""→ It is used to type in the text we want to write android:textSize="" → Here we are required to provide the size to the text we wrote match_parent → It takes the maximum size of the parent wrap_content → It takes the size which is least required to view the object android:gravity="" → It is about alignment of the text present in TextView Now lets code in android studio
  • 29. Linear Layout TextView is a user interface (UI) widget that displays text messages on a screen <LinearLayout android:orientation="vertical" /> Here the orientation is set to vertical, hence all the views present the Layout will be aligned vertically. Similarly we try using the horizontal layout using the following code. Now lets code in android studio <LinearLayout android:orientation="horizontal" />
  • 30. Linear Layout <LinearLayout android:orinentation="horizontal" <LinearLayout android:orientation="vertical" <TextView andorid:text="Hello World" android:layout_wdith="" andorid:layout_height="" /> /> <LinearLayout android:orientation="vertical" <TextView andorid:text="Hello World" android:layout_wdith="" andorid:layout_height="" /> /> /> Now if we want to put the stack of vertically aligned view horizontal to a stack of vertically aligned views then we can make sub branching of LinearLayout and put another views into their branches. Now lets code in android studio
  • 31. Weights Now lets code in android studio andorid:layout_weight="" This will tell how much weightage will each view have on the screen. Usage- If we are dividing two views horizontally then we should rest its width to 0dp as we have divided them equal weightage to both of them on the screen so no width is required now And like if we want to distribute the text view equally under a layout we can simply apply this attribute to each view under it so the weightage is equal to every view and hence it gets equally distributed.
  • 32. Margins & Padding Now lets code in android studio In Margin, the area gets subtracted from the view, but in the Padding the areas gets added to it. Now to use margins for a particular view we can use the attribute as andorid:layout_margin="" and here we will provide the dp of margin required. If you want margin only on the top then you can use android:layout_marginTop="“ android:padding="" → Here we can use the padded size in the View dp : density-independent pixel, (dip/ dp) is a unit of length
  • 33. ImageView <ImageView android:layout_width="" android:layout_height="" android:src="@darawable/<name>" android:adjustViewBounds="true" android:scaleType:"" /> Conditions before Uploading or Importing an Image 1.Image’s name should be lowercase 2.No number or symbol or uppercase 3.Image should be very small is size Now lets code in android studio
  • 34. Types of Layouts Frame Layout – Android Frame layout is a ViewGroup subclass that is used to specify the position of multiple views placed on top of each other to represent a single view screen. Relative Layout – Relative Layout is a view group that displays child views in relative positions. The position of each view can be specified as relative to sibling elements (such as to the left-of or below another view) or in positions relative to the parent Relative Layout area (such as aligned to the bottom, left or center). Constraint Layout - It is the default layout provided by the Android Studio. Constraint Layout is similar to Relative Layout, but with more power. It arranges views based on connections between sibling views and the parent layout. Now lets code in android studio
  • 35. fun showtoast(view: View){ Toast.makeText(this, "This is a button click.",Toast.LENGTH_SHORT) .show() } Now lets code in android studio android:onClick="showtoast“ provides you a function as showtoast that gets performed when we click the button. This is about XML file but now we will get to the MainActivity.kt file then we will get a method showtoast and you can modify it. <Button android:layout_width="" android:layout_height="" android:onClick="" /> BUTTON