This document discusses various tools that can be used in Android development. It describes build tools like Gradle and build variants. It also covers debugging tools such as Stetho, Hugo, and Pidcat. Metrics and performance tools like LeakCanary, Takt, and AndroidDevMetrics are also mentioned. The document provides links to code analysis tools and testing tools like mock servers. It concludes by recommending choosing the right tools for the job.
35. NODEJS + EXPRESS
/* Setup */
var fs = require('fs');
var express = require('express');
var app = express();
app.set('port', process.env.PORT || 8080);
var port = app.get('port');
/* Speakers list */
app.get('/speakers', function(req, res) {
res.type('application/json; charset=utf8');
res.status(200).send(fs.readFileSync('data/speakers.json', 'utf8'));
});
/* Other web services */
// ...
/* Starting the server */
app.listen(port, function () {
console.log('Express server listening on port ' + port);
});
36. NODEJS + EXPRESS
Slow service
sleep(2000);
function sleep(durationMillis) {
var now = new Date().getTime();
while (new Date().getTime() < now + durationMillis) {
// do nothing
}
}
// Please do not take pictures of this slide,
// This is not something I am proud of
41. CHARLES PROXY
Simulate a slow connection
Repeat queries
Check the responses
Add some breakpoints to:
Cancel an HTTP(s) call
Edit a request
Edit a response
52. ANIMATIONS
Make a screencast (API 19+):
VLC :
$ adb shell screenrecord /sdcard/demo.mp4
$ adb pull /sdcard/demo.mp4
Press the keyboard 'E' key to see
frames one by one
67. ADB + SHELL
# Open a deep linking intent
adb shell am start -a android.intent.action.VIEW -d "scheme://app/deep/linking"
# List running services
adb shell dumpsys activity services
# Get the path of an install application
adb shell pm path app.package.name
# Clear app data
adb shell pm clean app.package.name
# Take a screenshot
adb shell screencap -p | perl -pe '''s/x0Dx0A/x0A/g''' > screen.png
# Paste text from your computer clipboard to your android device
pbpaste | sed "s/%/%%/g" | sed "s/ /%s/g" | xargs adb shell input text