SlideShare a Scribd company logo
Developer Tools
macha@CHILLCODING.com
Macha
DA COSTA Web Site
Email
Android ANR
! by CHILLCODING with FontAwesome
 #  %

'
> 10 sec.
#
Developer Tools
A. Deployment
B. Debugging
C. Best Practices
A. Deployment
Become an Android developer
Android Debug Bridge
Emulator
( ) *
* + (
(
*
A. Deployment
* + ( Become an Android developer
, Developer Options
Build Number
- , USB Debugging
# #
A. Deployment
* + ( Developer Options
. Show layouts bounds
/ Debug GPU overdraw
 Profile GPU rendering
1 Strict mode enabled
2 Don’t keep activities
3 Background process limit
A. Deployment
* + ( Developer Options
Show layouts bounds
.
4 Show view elements
(padding, margin, …)
A. Deployment
* + ( Developer Options
A. Deployment
* + ( Developer Options
Debug GPU overdraw
/
4 Show info to optimize views
A. Deployment
* + ( Developer Options
Profile GPU rendering

4 Show the GPU
A. Deployment
* + ( Developer Options
A. Deployment
* + ( Developer Options
Strict mode enabled
1
4 Show a red square if the mainThread is blocked
A. Deployment
* + ( Developer Options
Don’t keep activities
2
4 Keep one Activity at a time
A. Deployment
* + ( Developer Options
Background process limit
3
4 Define process nb to keep
5 * List devices
6 * Connect to a device
7 8 * Install an app
* 2 7 Uninstall an app
9 8 * Copy files
A. Deployment
( ) * Android Debug Bridge
List devices
5 *
: ./adb devices
A. Deployment
( ) * Android Debug Bridge
Connect to a device
6 *
: ./adb shell
: ./adb -s nexus_06 shell
A. Deployment
( ) * Android Debug Bridge
Install an app
78 *
: ./adb install
: ./adb -s nexus_06 install
A. Deployment
( ) * Android Debug Bridge
Uninstall an app
* 2 7
: ./adb uninstall
: ./adb -s nexus_06 uninstall
A. Deployment
( ) * Android Debug Bridge
Copy files
( 8 9 8 *
: ./adb pull /sdcard/myFile myFile
A. Deployment
( ) * Android Debug Bridge
Copy files
* 8 98 (
: ./adb push myFile /sdcard/myFile
A. Deployment
( ) * Android Debug Bridge
A. Deployment
( Emulator
*
; Android Device Monitor
A. Deployment
< Call
= Message
> GPS position
( Emulator
*
A. Deployment
Call
<
; Telephony Actions
( Emulator
*
A. Deployment
Message
=
; Telephony Actions
( Emulator
*
A. Deployment
GPS Position
>
; Location Controls
( Emulator
*
B. Debugging
? System Message
@ Debug resources
@ Debug step to step
; Android Lint
B. Debugging
? System Message
A Logcat Console
@ Message Types
B Use of Android Log
B. Debugging
? Logcat Console
* C * C * C * C * C
B. Debugging
? Logcat Console
C

C

C
F
C
G
C
H
B. Debugging
? Logcat Console
C

C

C
F
C
G
C
H
B. Debugging
? Logcat Console
C

C

C

C

B. Debugging
? Logcat Console
I Tag
B. Debugging
? Logcat Console
I Id
B. Debugging
? Logcat Console
C

C

C
F
C
G
C
H
A
B. Debugging
? Logcat Console
C

C

C
F
C
G
C
H
J
K
B. Debugging
@ Message Types
: I’m Information :)
B. Debugging
@ Message Types
: Me it’s Verbalisation :/
B. Debugging
@ Message Types
: I serve to Debug ;)
B. Debugging
@ Message Types
: Warning: But why is he so mean?
B. Debugging
@ Message Types
: Because, there is Error!
B. Debugging
B Use of Android Log
Log.e(String tag, String message, Throwable tr)
B. Debugging
B Use of Android Log
Log.e(TAG,”Error!")
TAG = "HomeActivity"
B. Debugging
B Use of Android Log
Log.i( MainActivity::class.simpleName,"I am I :)")
B. Debugging
@ Debug resources
L Build > Clean
L File > Invalidate Caches / Restart …
M Run: Compilation Error
N Error in Kotlin files
N Error message window
A Look for the fake resource
A Look for the wrong XML attribute
B. Debugging
@ Debug step to step
OBreak points
AVariable state
x
B. Debugging
@ Debug step to step
M Run: Runtime Error
N Error in Logcat console
N Debug Debug console
B. Debugging
@ Debug step to step
M + @ | M 8 @
B. Debugging
@ Debug step to step
P Place break point
@ Launch the debugger
N Zoom on Debug console
_ Go to next break point
_ Go to the next line
_ Go to the next line inside code
_ Observe a variable
_ Execute flying code
A
Q
Q
M
R
B. Debugging
; Android Lint
S + B
A
T
U
B. Debugging
; Android Lint
S
B
U
A
B. Debugging
; Android Lint
S
+Unused resources
+Non-internationalized resources
+Use of unsupported APIs
+etc
C. Best Practices
V Libraries
U Test
U Naming Convention
C. Best Practices
V Libraries
J Import an Android code sample
V Most popular Android libraries
W Influencers
J Import an Android code sample
C. Best Practices
V Most popular Android libraries
C. Best Practices
Retrofit
V Most popular Android libraries
C. Best Practices
https://github.com/Dimezis/RxBus
V Most popular Android libraries
C. Best Practices
Room

V Most popular Android libraries
C. Best Practices
Picasso

V Most popular Android libraries
C. Best Practices
V Most popular Android libraries
C. Best Practices
B How to import
dependencies {


implementation 'de.greenrobot:eventbus:2.4.0'
U Gradle
W Influencers
C. Best Practices
X
F Y W
W Influencers
C. Best Practices
F
Android developers
Android dialogs
W References
C. Best Practices
Y
https://developer.android.com
http://android-arsenal.com/
W Conferences
C. Best Practices
W
Google I/O
Android Makers
DroidCon
W Influencers
C. Best Practices
X
@Google Developer Expert
C. Best Practices
Android v?
C. Best Practices
1 Manage =/= Versions
*
;
4.4
*
;
5.1
*
;
7.0
C. Best Practices
U Test
U Unit Tests
( Monkey Stress Test
C. Best Practices
U Unit Tests
package (androidTest)
+
B ActivityInstrumentationTestCase2
C. Best Practices
U Unit Tests
com.chillcoding.home (androidTest)
L (droit) Run > All tests
C. Best Practices
U Unit Tests
dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])

androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {

exclude group: 'com.android.support', module: 'support-annotations'

})
...

testCompile 'junit:junit:4.12'



}
B gradle
Reference [Android]: Expresso
C. Best Practices
U Unit Tests
public class HomeActivityTest extends ActivityInstrumentationTestCase2<HomeActivity> {
public HomeActivityTest()
@Override
protected void setUp() throws Exception
public void testPreconditions()
public void testText()
C. Best Practices
U Unit Tests
public class HomeActivityTest extends ActivityInstrumentationTestCase2<HomeActivity> {
public HomeActivityTest() {
super(HomeActivityTest.class);
4 Initialize the class
C. Best Practices
U Unit Tests
public class HomeActivityTest extends ActivityInstrumentationTestCase2<HomeActivity> {
@Override
protected void setUp() throws Exception {
super.setup();
4 Initialize test environment
C. Best Practices
U Unit Tests
public class HomeActivityTest extends ActivityInstrumentationTestCase2<HomeActivity> {
public void testPreconditions()
4 Check pre-conditions
C. Best Practices
U Unit Tests
public class HomeActivityTest extends ActivityInstrumentationTestCase2<HomeActivity> {
public void testText()
4 Do the test
Random tests
Z
: ./adb shell monkey -p com.chillcoding.mycuteheart -v 500
C. Best Practices
( Monkey Stress Test
4 500 random evts
C. Best Practices
U Naming Convention
U Naming Convention
U Naming Convention
( Shortcuts
ClassName: UpperCamelCase
variableName: camelCase
CONSTANT: UPPER_CASE
resource_file: snake_case
idUIItem
id_string
C. Best Practices
U Naming Convention
Legend:
L Click
L Enter Key
L Control Key
L Command Key
L Shift Key
L Option or Alt Key
C. Best Practices
( Shortcuts
Alt
Ctrl
⌘
L
C. Best Practices
( Shortcuts
Alt Solve any pb.
⌘ Alt L Indent code
Valid proposal of AS
Ctrl L Go to class / file
See the documentation
Rename a variable, a file
Generate super classe fun
F6
⌘ N
Ctrl Q / F1
Look for something into the project
Ctrl / Comment
Ctrl
Ctrl
Y
D
Delete a line
Duplicate a ligne or a selection
Ctrl O Override a method
IF YOU THINK
YOU ARE TOO
SMALL
TO MAKE A
DIFFERENCE
TRY SLEEPING
WITH A MOSQUITO.
_ African Proverb
References
• Quizz Outils du Développeur Android
• ChillCoding: Android references
• Udacity: Android Development for Beginners (Video)
• Developer Android: Application Fundamentals (API Guide)
• Edition Eni : Android 5 Les fondamentaux du développement d'applications Java (Livre)
• Improve Your Code with Lint
• TDD in Android Kotlin
• Must Have Libraries
• wasabeef: Awesome android ui
• https://www.raywenderlich.com/category/android
• Jakewharton: Just say no to hungarian notation
• https://medium.com/ekohe/how-to-write-good-code-an-introduction-to-sandi-metz-s-rules-89bb3d749d53
• https://choosealicense.com/
• https://github.com/ribot/android-guidelines/blob/master/project_and_code_guidelines.md
• https://developer.android.com/kotlin/style-guide
• https://kotlinlang.org/docs/reference/coding-conventions.html
[ macha@chillcoding.com
X @MachaDaCosta
 ChillCoding
] @chillcoding
Questions?
Kotlin for Android
By Da Costa On

More Related Content

What's hot

Uazaa uma-farsa-parte 2
Uazaa uma-farsa-parte 2Uazaa uma-farsa-parte 2
Uazaa uma-farsa-parte 2
devninjabr
 
Automated javascript unit testing
Automated javascript unit testingAutomated javascript unit testing
Automated javascript unit testing
ryan_chambers
 
Presentation_C++UnitTest
Presentation_C++UnitTestPresentation_C++UnitTest
Presentation_C++UnitTest
Raihan Masud
 

What's hot (20)

Automatic PHP 7 Compatibility Checking Using php7cc (and PHPCompatibility)
Automatic PHP 7 Compatibility Checking Using php7cc (and PHPCompatibility)Automatic PHP 7 Compatibility Checking Using php7cc (and PHPCompatibility)
Automatic PHP 7 Compatibility Checking Using php7cc (and PHPCompatibility)
 
Testes pythonicos com pytest
Testes pythonicos com pytestTestes pythonicos com pytest
Testes pythonicos com pytest
 
Workshop quality assurance for php projects - ZendCon 2013
Workshop quality assurance for php projects - ZendCon 2013Workshop quality assurance for php projects - ZendCon 2013
Workshop quality assurance for php projects - ZendCon 2013
 
groovy & grails - lecture 1
groovy & grails - lecture 1groovy & grails - lecture 1
groovy & grails - lecture 1
 
Uazaa uma-farsa-parte 2
Uazaa uma-farsa-parte 2Uazaa uma-farsa-parte 2
Uazaa uma-farsa-parte 2
 
UA testing with Selenium and PHPUnit - PFCongres 2013
UA testing with Selenium and PHPUnit - PFCongres 2013UA testing with Selenium and PHPUnit - PFCongres 2013
UA testing with Selenium and PHPUnit - PFCongres 2013
 
Building resilient services in go
Building resilient services in goBuilding resilient services in go
Building resilient services in go
 
Unit Testing from Setup to Deployment
Unit Testing from Setup to DeploymentUnit Testing from Setup to Deployment
Unit Testing from Setup to Deployment
 
OCP Java SE 8 Exam - Sample Questions - Exceptions and Assertions
OCP Java SE 8 Exam - Sample Questions - Exceptions and AssertionsOCP Java SE 8 Exam - Sample Questions - Exceptions and Assertions
OCP Java SE 8 Exam - Sample Questions - Exceptions and Assertions
 
Idiomatic spock
Idiomatic spockIdiomatic spock
Idiomatic spock
 
PgTAP Best Practices
PgTAP Best PracticesPgTAP Best Practices
PgTAP Best Practices
 
Automated javascript unit testing
Automated javascript unit testingAutomated javascript unit testing
Automated javascript unit testing
 
Pycon India 12
Pycon India 12Pycon India 12
Pycon India 12
 
Introduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicoxIntroduction to web programming for java and c# programmers by @drpicox
Introduction to web programming for java and c# programmers by @drpicox
 
Presentation_C++UnitTest
Presentation_C++UnitTestPresentation_C++UnitTest
Presentation_C++UnitTest
 
Navigating the xDD Alphabet Soup
Navigating the xDD Alphabet SoupNavigating the xDD Alphabet Soup
Navigating the xDD Alphabet Soup
 
Using the Groovy Ecosystem for Rapid JVM Development
Using the Groovy Ecosystem for Rapid JVM DevelopmentUsing the Groovy Ecosystem for Rapid JVM Development
Using the Groovy Ecosystem for Rapid JVM Development
 
OCP Java SE 8 Exam - Sample Questions - Java Streams API
OCP Java SE 8 Exam - Sample Questions - Java Streams APIOCP Java SE 8 Exam - Sample Questions - Java Streams API
OCP Java SE 8 Exam - Sample Questions - Java Streams API
 
Unit test
Unit testUnit test
Unit test
 
Take a Stroll in the Bazaar
Take a Stroll in the BazaarTake a Stroll in the Bazaar
Take a Stroll in the Bazaar
 

Similar to Developer Android Tools

Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
NAVER D2
 
Android installation guide
Android installation guideAndroid installation guide
Android installation guide
magicshui
 
Synapseindia android apps intro to android development
Synapseindia android apps  intro to android developmentSynapseindia android apps  intro to android development
Synapseindia android apps intro to android development
Synapseindiappsdevelopment
 

Similar to Developer Android Tools (20)

Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopment
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
 
Hacking the Codename One Source Code - Part IV - Transcript.pdf
Hacking the Codename One Source Code - Part IV - Transcript.pdfHacking the Codename One Source Code - Part IV - Transcript.pdf
Hacking the Codename One Source Code - Part IV - Transcript.pdf
 
hi
hihi
hi
 
Mock test rad 2
Mock test rad 2Mock test rad 2
Mock test rad 2
 
Android developmenttools 20100424
Android developmenttools 20100424Android developmenttools 20100424
Android developmenttools 20100424
 
How to Build & Use OpenCL on OpenCV & Android NDK
How to Build & Use OpenCL on OpenCV & Android NDKHow to Build & Use OpenCL on OpenCV & Android NDK
How to Build & Use OpenCL on OpenCV & Android NDK
 
Android develop guideline
Android develop guidelineAndroid develop guideline
Android develop guideline
 
Scaffolding for Serverless: lightning talk for AWS Arlington Meetup
Scaffolding for Serverless: lightning talk for AWS Arlington MeetupScaffolding for Serverless: lightning talk for AWS Arlington Meetup
Scaffolding for Serverless: lightning talk for AWS Arlington Meetup
 
Android installation guide
Android installation guideAndroid installation guide
Android installation guide
 
Qtp 11 notes
Qtp 11 notesQtp 11 notes
Qtp 11 notes
 
Synapseindia android apps intro to android development
Synapseindia android apps  intro to android developmentSynapseindia android apps  intro to android development
Synapseindia android apps intro to android development
 
Advanced debugging  techniques in different environments
Advanced debugging  techniques in different environmentsAdvanced debugging  techniques in different environments
Advanced debugging  techniques in different environments
 
Android studio
Android studioAndroid studio
Android studio
 
Testing for fun in production Into The Box 2018
Testing for fun in production Into The Box 2018Testing for fun in production Into The Box 2018
Testing for fun in production Into The Box 2018
 
What's new in android jakarta gdg (2015-08-26)
What's new in android   jakarta gdg (2015-08-26)What's new in android   jakarta gdg (2015-08-26)
What's new in android jakarta gdg (2015-08-26)
 
How to code to code less
How to code to code lessHow to code to code less
How to code to code less
 
Automate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaAutomate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon Vienna
 
Pwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreakPwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreak
 

Recently uploaded

Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
Avinash Rai
 

Recently uploaded (20)

Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
NLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxNLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptx
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 

Developer Android Tools