Frequently used android code.