How to establish a reliable (crash and kill tolerant) connection to bound IPC (e.g. AIDL) Service in Android

What is this post about:

This post describes how to write reliable clients for bound IPC Services in Android.

In order to define "reliability" in the aforementioned context, the post begins with in-deep review of client's connection states to bound IPC Services, and summarizes the potential issues that the client should be able to handle in order to be considered "reliable".

The following questions are addressed in this post:
  • How bound IPC Service connection's life-cycle is different from life-cycle of the Service itself?
  • What is the exact life-cycle of a connection to bound IPC Service?
  • How can we account for connection's life-cycle when writing clients of bound IPC Services?
Source code of IpcServiceConnector class, which can be employed in order to establish and manage reliable connections to bound IPC Services is provided, and a tutorial implementation of a client which uses this class in order to establish a crash-and-kill-tolerant connection to bound IPC service is presented.

MVC and MVP architectural patterns in Android – part 3

android2

What is this post about:

This post is the last one in series of three posts that discuss Model View Controller (MVC) and Model View Presenter (MVP) architectural patterns in context of Android development (part 1, part 2). The following questions are addressed in this part:
  • What function MVC controllers fulfill?
  • How do I implement MVC controllers?
  • Ok, I want to give it a try! How do I start?

MVC and MVP architectural patterns in Android – part 2

android2

What is this post about:

This post is the second one in series of three posts that discuss Model View Controller (MVC) and Model View Presenter (MVP) architectural patterns in context of Android development. The following questions are addressed in this part:
  • Are MVC views and Android Views synonyms?
  • How do I implement MVC views?

MVC and MVP architectural patterns in Android – part 1

android2

What is this post about:

This post is the first one in series of three posts that discuss Model View Controller (MVC) and Model View Presenter (MVP) architectural patterns in context of Android development. The following questions are addressed in this part:
  • Model? View? Contoller? Presenter? WTF?
  • What is the difference between MVC and MVP?
  • Does Android support MVC/MVP "natively"?
  • Which architectural pattern is more suitable for Android development - MVC or MVP?
Source code for a working application which implements the architectural pattern is provided.

Why Activities in Android are not UI elements

android

What is this post about:

In this post I will summarize my thoughts about the role of Activities in Android application. My goal is to convince you that, despite being widely referred to as "application's screens", Activities should not contain UI implementation details.