Friday, 26 February 2016

Android app development guideline.


CodePath Android Cliffnotes

Welcome to the open-source CodePath Android Cliffnotes! Our goal is to become the central crowdsourced resource for complete and up-to-date practical Android developer guides for any topic. Just take me to the notes!
We have Android guides for everyone whether you are a beginner, intermediate or expert. Want to learn how to use the ActionBar or the ins and outs of fragments? We got that. Want to learnabout automated unit testing or how to build flexible user interfaces for multiple devices? We got you covered. We don't waste time with the "theoretical approach" you might get from a book. We cover exactly the things we use every day as we are developing apps for contracts.
Need Help? Please join this gitter real-time chat or the google groups for these guides where you can post related questions. You can also get 1:1 mentorship online through codementor.

Wednesday, 3 February 2016

Speed up your android app


A memory leak detection library for Android and Java.
“A small leak will sink a great ship.” - Benjamin Franklin


A few weeks ago, I gave a talk about Android Performance Optimization, at Droidcon NYC.
I invested a lot of time in this presentation, since I wanted to show real examples for performance issues, and how to identify them with the available tools. I had to cut down about a half of my slides because I didn’t have enough time to show everything. In this post, I’ll summarize everything I was talking about, and show examples I didn’t have time to go over.
The talk was recorded and you can watch it here:

The slides are also available:
Now, Let’s go over some of the important things I was talking about, hopefully I can give a deeper explanation for everything, starting with the basic rules I follow when I work on optimizations:

My Rules

Everytime I approach a performance problem, or looking for performance problems, I follow these rules:
  • Always Measure - Optimizing with your eyes is never a good idea. After looking at the same animation for a few times, you’ll start imagining it’s running faster. Numbers don’t lie. Use the tools we’ll go over soon, and measure how your app performs a few times before and after you make your change.
  • Use slow devices - If you really want to expose all the weak spots, slower devices will help you more. Newer and stronger devices might not get too excited about performance issues you may have, but not all your users use the latest and greatest.
  • Trade-offs - Performance optimization is all about trade-offs. You optimize one thing - it comes on the expense of another. In many cases, that other thing can be your time spent finding and fixing it, but it can also be the quality of your bitmaps or the amount of data you should store in a specific data structure. Prepare yourself to make sacrifices.


Systrace is one of the greatest tools that you probably don’t use. That’s because developers weren’t sure what to do with the information it provides.
Systrace shows us an overview of what’s currently running on the phone. This tool reminds us that the phone we hold in our hands, is actually is a powerful computer that can do many things at the same time. In one of the latest SDK tools updates, this tool was improved with generated insights from the data, helping us to find problems. Let’s see how a trace file looks like: