final android code from Dinesh