andriod dev toolbox part 2
TRANSCRIPT
![Page 1: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/1.jpg)
Android dev toolbox II
AVGeeks, 2016
![Page 2: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/2.jpg)
Shem Magnezi@shemag8 | shem8.wordpress.com
![Page 3: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/3.jpg)
Part 1 Libraries
![Page 4: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/4.jpg)
![Page 5: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/5.jpg)
Part 2 Tools
![Page 6: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/6.jpg)
Why use external tools?
▣ Same as libraries- don't reinvent the wheel.
![Page 7: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/7.jpg)
Why not?
▣ Proprietary solutions (Outsource them, Everything.me style!)
![Page 8: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/8.jpg)
SystraceCollects system and application process execution data and generates detailed, interactive reports from devices
http://developer.android.com/tools/performance/systrace/index.html
![Page 9: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/9.jpg)
Allocation trackingMonitor where objects are being allocated when you perform certain actions
http://developer.android.com/tools/studio/index.html#alloc-tracker
![Page 10: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/10.jpg)
Trace viewTraceview can help you debug your application and profile its performance.
http://developer.android.com/tools/debugging/debugging-tracing.html
![Page 11: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/11.jpg)
Hierarchy ViewerVisualizes your app's view hierarchy and profiles the relative rendering speed for each view.
http://developer.android.com/tools/performance/hierarchy-viewer/index.html
![Page 12: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/12.jpg)
Developer optionsRealtime on device debugging.
http://developer.android.com/tools/device.html
![Page 13: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/13.jpg)
HugoAnnotation-triggered method call logging for your debug builds.
@DebugLogpublic String getName(String first, String last) { SystemClock.sleep(15); // Don't ever really do this! return first + " " + last;}
https://github.com/JakeWharton/hugo
V/Example: ⇢ getName(first="Jake", last="Wharton")
V/Example: ⇠ getName [16ms] = "Jake Wharton"
![Page 14: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/14.jpg)
Leak CanaryA memory leak detection library for Android and Java.
public class ExampleApplication extends Application { @Override public void onCreate() { super.onCreate(); LeakCanary.install(this); }}
https://github.com/square/leakcanary
![Page 15: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/15.jpg)
Phone HomeStandalone library that sends logs from remote Android devices to a central server for debugging.
PhoneHomeConfig.getInstance() // enable or disable log flushing .enabled(false) // wait for this many log events before flushing ... .batchSize(100) // ... or until this many seconds have passed between flushes .flushIntervalSeconds(1800) // when developing, log all messages to logcat, then flush everything to the sink .debugLogLevel(android.util.Log.VERBOSE) // in production, only log INFO messages and above to logcat, then flush everything to the sink .productionLogLevel(android.util.Log.INFO) // specify the sink that receives flushed logs. Required if you enable log flushing .logSink(new PhoneHomeSink() { public void flushLogs(final List<PhoneHomeLogEvent> logEvents) { // flush log events to your backend } });
https://github.com/nebulabsnyc/PhoneHome
![Page 16: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/16.jpg)
ProbeAndroid applications performance testing tool.
python console.py --package your.package.name \
--activity TheActivityToRunProbeOn --repeat-count x \ --
timeout y
https://github.com/EverythingMe/probe
![Page 17: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/17.jpg)
MagnetoMagneto allows you to write smart and powerful tests for Android apps.
http://getmagneto.com/
![Page 18: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/18.jpg)
Monkey testing
adb shell monkey -p your.package.name -v 500
http://developer.android.com/tools/help/monkey.html
The Monkey is a program that runs on your emulator or device and generates pseudo-random streams of user
events such as clicks, touches, or gestures, as well as a number of system-level events. You can use the
Monkey to stress-test applications that you are developing, in a random yet repeatable manner.
![Page 19: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/19.jpg)
StethoA debug bridge for Android applications
http://facebook.github.io/stetho/
![Page 20: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/20.jpg)
Espresso APIs for writing UI tests to simulate user interactions within a single target app.
@Testpublic void changeText_sameActivity() { // Type text and then press the button. onView(withId(R.id.editTextUserInput)) .perform(typeText(mStringToBetyped), closeSoftKeyboard()); onView(withId(R.id.changeTextBt)).perform(click());
// Check that the text was changed. onView(withId(R.id.textToBeChanged)) .check(matches(withText(mStringToBetyped)));}
http://developer.android.com/training/testing/ui-testing/espresso-testing.html
![Page 21: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/21.jpg)
RobolectricA unit test framework that de-fangs the Android SDK jar so you can test-drive the development of your Android app
@RunWith(RobolectricTestRunner.class)public class MyActivityTest {
@Test public void clickingButton_shouldChangeResultsViewText() throws Exception { MyActivity activity = Robolectric.setupActivity(MyActivity.class);
Button button = (Button) activity.findViewById(R.id.button); TextView results = (TextView) activity.findViewById(R.id.results);
button.performClick(); assertThat(results.getText().toString()).isEqualTo("Robolectric Rocks!"); }}
http://robolectric.org/
![Page 22: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/22.jpg)
Part 3 Resources
![Page 23: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/23.jpg)
Android Arsenal
http://android-arsenal.com/
![Page 24: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/24.jpg)
Droid Toolbox
http://droid-toolbox.com/
![Page 25: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/25.jpg)
MaterialUp
http://www.materialup.com/
![Page 26: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/26.jpg)
Android For Devs
http://www.android4devs.com/
![Page 27: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/27.jpg)
Android library statistics (By Appbrain)
http://www.appbrain.com/stats/libraries
![Page 28: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/28.jpg)
Android Developers Blog
http://android-developers.blogspot.co.il/
![Page 29: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/29.jpg)
Google Developers @Medium
https://medium.com/google-developers
![Page 30: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/30.jpg)
The developer show
https://www.youtube.com/playlist?list=PLOU2XLYxmsII8REpkzsy1bJHj6G1WEVA1
![Page 31: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/31.jpg)
Android Weekly
http://androidweekly.net/
![Page 32: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/32.jpg)
Part 4 People
![Page 33: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/33.jpg)
Nick ButcherDesign/Developer Advocate @ Google
@crafty
Chet HasseAndroid animator @ Google
@chethaase
Chiu-Ki ChanAndroid developer, public speaker
@chiuki
Romain GuyWorking on awesome stuff at Google
@romainguy
Roman NurikDesigner @ Google
@romannurik
Kelly ShusterAndroid Engineer, Public speaker & tech diversity advocate.
@kellyshuster
![Page 34: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/34.jpg)
Ian LakeDeveloper Advocate @ Google
@ianhlake
Joanna SmithDeveloper Advocate @ Google
@dontmesswithjo
Yigit BoyarUI toolkit team @Android/ Google
@yigitboyar
Lisa WrayAndroid @ Genius (prev Google & NYT)
@lisawrayz
Jake Whartonopen source practitioner and contributor, @square
@jakewharton
Colt McAnlisDeveloper Advocate @ Google
@duhroach
![Page 35: Andriod dev toolbox part 2](https://reader033.vdocuments.us/reader033/viewer/2022050614/589c339d1a28abec478b494d/html5/thumbnails/35.jpg)
Thanks!Any questions?
You can find this presentation at:shem8.wordpress.com
[email protected] template by SlidesCarnival | Photographs by Unsplash