Fragments 2017

Fragments 2017

A conference on the mobile ecosystem in India

Saket Narayan

@saketme

"My app crashes with NullPointerException when the user rotates the phone while a network request is happening"

Submitted Jun 13, 2017

“My app crashes with NullPointerException when the user rotates the phone while a network request is happening. Do you have any plans to fix?” - Jake Bhagwan Wharton.

Dealing with Activity lifecycles can be difficult, especially when working with long running background operations like network calls. But this complexity can greatly be reduced by following a design pattern that is independent of all lifecycles. One such pattern is using a data provider as the single source of truth.

Outline

  • Designing “auto-updating” UIs using reactive programming.
  • Retaining app state across Activity configuration (e.g., orientation) and process deaths.
  • Creating fire-and-forget network calls that affect the UI without caring to unsubscribe them on Activity stop/destroy.
  • Designing an offline-first code archiecture.
  • Exploring LiveData introduced at Google IO 2017.

Requirements

You must have spent atleast a couple of years banging your head on walls while dealing with Android lifecycles and asynchronous jobs. A basic knowledge of RxJava or reactive programming in general will also be nice to have, but is not necessary.

Speaker bio

Saket is passionate about building personal, contextual software that is always aware of the user’s intentions. He started developing Android applications 4 years ago, when Ice Cream Sandwich was still the shiny new thing. He strives for perfection, especially when it comes to user experience. He will often tweak animations down to the millisecond to make them feel more natural.

He works with Uncommon.

Comments

{{ 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