Thursday, October 16, 2014

Android developer notes


To create a great product, you need to care about all aspects of it, usually we classify it into two categories: UX and UI.

UX is the most important, without this, user is not gonna use your app even your app got the most beautiful UI.

I'm listing some UX glitches here, so others who are reading this blog will benefit from this.

1 Network issues:
    We can guarantee that our app will always be used with high quality wifi connection, in case of slow/very slow network connection, we need to think about some scenarios in which user may get some problems:
     The principle here is: you can suppose the network is always reliable and even available, in this case, you need to make sure firstly the network task won't block the UI thread, and secondly, the app won't crash in case we cannot get data.

     a) You have a list view, and you also support search functionality for that. Before the whole list load, user may start to search using some keywords. Firstly, we need to make sure the app won't crash; Secondly, we need to show some hints to the user, cause in this case, definitely no result will be found for the search.

      b) You have an async task for one activity/fragment, and in this task, you're gonna use the activity instance, before the task finish, user switches to another activity / fragment, so what are you gonna do to prevent the potential app crash since the previous activity instance is already destroyed. Then in this case, don't use the instance of the activity, use the whole application instance instead.

      c) Sync up between menu items and network task: suppose you're using a global variable which will be assigned in an async task, and this value will be used when user click one of the menu buttons. But due to the unreliable network, before the global variable is assigned, user may click the menu button. Then your app should tolerate this case and make sure it won't crash.

To be continued.

No comments:

Post a Comment