A sample that implements factory pattern on Android