The Handler (Looper looper)
constructor (second way) is used when creating Handler
from threads, which do not have default looper, or when you want the handler to run actions on a different thread than your own.
In your "second way" example there is no need to use this type of constructor, the default one will do the same. And as the Activity constructor
is invoked on the same thread as onCreate(..)
method, two possible initializations ("first" and "second way") of Handler
are totally equal.
UPD: make sure not to create inner Handler class.