What\'s a good technique for validating an e-mail address (e.g. from a user input field) in Android? org.apache.commons.validator.routines.EmailValidator doesn\'t seem to be
Use simple one line code for email Validation
public static boolean isValidEmail(CharSequence target) {
return !TextUtils.isEmpty(target) && android.util.Patterns.EMAIL_ADDRESS.matcher(target).matches();
}
use like...
if (!isValidEmail(yourEdittext.getText().toString()) {
Toast.makeText(context, "your email is not valid", 2000).show();
}