How to check valid Email address


The code snippet to check whether the entered email address is valid is as follows,



    Pattern emailPattern = Patterns.EMAIL_ADDRESS; // API level 8+

    if (emailPattern.matcher(enteredEmailId).matches()) {
        // do your stuff
    }



Happy Coding
Team Androidians

Comments

Popular posts from this blog

AlarmManager and Notification in Android

Open Gallery and get the selected image in appplication

Dismiss or Cancel dialog by swipe gesture