fixed problem with tempfiles in Android, thanks Fernando Pacheco