The \"Login\" from Android examples implemented AsyncTask as a non-static inner class. However, according to Commonsguys, this class should be static and use we
The linked article already says it
This does emphasize, though, that you want doInBackground() of your AsyncTask to be completely decoupled from the Activity. If you only touch your Activity on the main application thread, your AsyncTask can survive the orientation change intact.
Don't touch the Activity (e.g. its members) from the AsyncTask, which is in line with Static Nested Classes
Static Nested Classes
As with class methods and variables, a static nested class is associated with its outer class. And like static class methods, a static nested class cannot refer directly to instance variables or methods defined in its enclosing class — it can use them only through an object reference.
Although, the examples from Android, AsyncTask reference and Using AsyncTask are still using non-static nested classes.
And according to this Static nested class in Java, why?, I would first go with the static inner class and resort to the non-static version only, if it is really necessary.