What happened last week: 02

A regular android developer log

  • FCM implementation is far easier than old GCM implementation. Many frictions are gone. Firebase dashboard also provides Notifications feature which I used it in order to test the integration. There is a different concept now (I’m not sure if they had it before). Notification Message and Data Message. Read the whole documentation before the implementation. It’s important to understand it.
  • Removed interfaces for Presenters and Repositories. Inspired from this article: http://goo.gl/NU1qDD
  • Decided to merge data module into presentation module. Our new structure will be completely grouped by feature. There are cons/pros. I’ll share the results after a while. The whole idea is to reduce the development frictions. We are doing a lot of experiments to find out the best for our setup.
  • Started to use AutoValue.
  • Did my first test for Services. ServiceTestRule. Thumb of rule for instrumentation tests, do not inherit BlaBlaTestCase classes, instead use the corresponding TestRule.
  • If you don’t care about the result, RxJava provides subscribe() method without any arguments.
  • Accidentally realized that you can actually move any window to anywhere in Android Studio. Very useful to move terminal into main tabs when doing profiling and yes I do use internal AS terminal quite often.
  • Started to create a wrapper type for the list responses. In almost every case I had to create this wrapper class anyway. Very useful to control the whole information and expand the needs without altering many places.

For example: Fetching list of prices from the server and use the data as list in every where. Instead create a Prices type and keep the list inside and use Prices object everywhere.

List<Price> getPrices();      // Not ideal. 
Prices getPrices(); // GOOD
class Prices {
List<Price> priceList;
  • You can rename a file in Github directly if you made a mistake. This happened to me a few times and each time I tried to use git, I kind of lost after a few seconds and each time I was in rush.
  • Nice article about best practices for unique identifiers in Android. The best part is use cases, pros and cons of the each solution.
  • Google improved/updated some documentation about android, even the look&feel is different now. I’m satisfied with the information they provide. Quite nice. I guess these things had to happen because of Firebase? Looking forward to see these changes in everywhere.
  • A great article about Instagram android application evolution. Although not every case is applicable to most of the teams, since no one has huge team as they do. Therefore 3rd party libraries are quite helpful. Use it when you can’t do it yourself and spend more time on your business problems.