Full project code adaptated to AndroidStudio IDE.