add platform code for android
add platform macros
modify implementation of android