Fragments 2017

Fragments 2017

A conference on the mobile ecosystem in India

Harshit Bangar


Code with Confidence - Tools for Android Developer

Submitted Jun 12, 2017

As an Android developer, we face multiple issues such as Null pointers, Memory leak, Hardcoded XML, RTL. On the top of that, we may want to enforce custom rules such as all the activities extends BaseActivity, or no one uses an internal buggy API.

In this talk, I will be going through several tools such as Custom lints, Rave, Infer, and Error Prone to help you fix these issues and help you focus on your core business logic.

Learn from errors and create checks for the obscure errors, so that no one in your team faces the same again.


Things I will be talking of:

  1. Annotations - Using annotations not only improve your code quality but also help tools like Rave and Infer.
  2. Lint and Custom Lints - Enums are expensive and should be replaced by magic constants (it is just an example to demonstrate custom lint). We will go through a sample custom lint which prevents anyone from checking enums into your code.
  3. Infer - We will be talking about the cases infer can catch - Context Leaks and NPE.
  4. Rave - We will be validating schema from servers or local DB. How it can be integrated into your existing network layer (such as retrofit 2).
  5. ErrorProne - How can we move the errors earlier into our build process? Instead of waiting for lint tasks to be completed on CI/Locally, how can we detect the issues at compile time. If a code has pointer null pointer flows, the compilation will fail.

I will be talking about using these tools locally and on CI.

Speaker bio

I am an Android Engineer at Uber working on payments. Long ago, in my previous life, I was a software engineer at Amazon.

I am passionate about developer tools and anything else which make developers life easy and presented sessions in Droidcon 2015 and 2016 (on Espresso).



{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

How do you make a great mobile experience? Explore with Fragments. Follow Fragments on Twitter more