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 android.text.TextUtils.isEmpty() instead. This method also checks to see if the String is null and has been available since API level 1.
if (TextUtils.isEmpty(str)) { Log.d(TAG, "String is empty or null!"); }