While I don't know how your particular example works, if you've been paying attention to various UI/UX experiences on Android you might have heard about Facebook Chat Heads which has a similar float over existing app feel.
You may want to start here for your investigation:
What APIs in Android is Facebook using to create Chat Heads?