In my android application I can\'t use String.isEmpty() function which is situated in JDK 1.6. Android 2.1 lib doesn\'t have this function in java.lang
You can use this TextUtils.isEmpty(str). This is available since API level 1 or You can create you own method like below
TextUtils.isEmpty(str)
public boolean isEmpty(CharSequence str) { if (str == null || str.length() == 0) return true; else return false; }