min sdk 7, and replace String.isEmpty() with String.length()==0