android compatible code (except for the widgets and util/db util/email package)