The UI thread is basically
A Handler, is a way for your Activity to receive messages from other threads or services.
Since LVL is a service that runs in the background and communicates with a different app, you need a way for the result to be sent back to your app.
This is where LiceseCheckerCallback comes in. While you probably write this code in your Activity (as an inner class), you'll need to remember that it is going to be called by a different thread/app.
So if two different threads try to call a method in your activity at the same time, you can get some serious problems (ie concurrency dead locks, but the name isnt important).
Anyways this is where the Handler comes in. Each activity (aka UI thread) can define a Handler (private or public or whatever) that it can "give out" (pass a reference) to another class.
In this case the Handler (mHandler) is being "given" to the LicenseCheckerCallback
(if I remember correctly)
Part of what might be confusing here: in the example they create an inner class
inside the main Activity for the LicenseCheckerCallback.
Because the LicenseCheckerCallback implementation in the example is an inner class, that means it can "see" the Handler (mHandler).
And, because of this, there is no obvious "passing" of the handler to the LicenseCheckerCallback.
Anyways, hope this helps -- I'm not sure where your stuck exactly but maybe this will at least give us a starting point as to what to try and figure out.
And yeah, Android is very hard to learn at times. But some things make a TON of sense once you "get" them. Unfortunately the documentation that teaches that stuff is pretty bad
But hopefully we can help