Android source has been rewritten. Added runnable for ui thread execution