update example code to use new style of android activity