From 927977a2b69baadf55f9148f479ab91440442855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20=C3=87AKAL?= Date: Fri, 1 Sep 2017 17:33:30 +0300 Subject: [PATCH 1/2] utils commit --- src/com/esri/android/util/EmailUtils.java | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/com/esri/android/util/EmailUtils.java diff --git a/src/com/esri/android/util/EmailUtils.java b/src/com/esri/android/util/EmailUtils.java new file mode 100644 index 0000000..3b2afac --- /dev/null +++ b/src/com/esri/android/util/EmailUtils.java @@ -0,0 +1,24 @@ +package com.esri.android.util; + +/** + * A pack of helpful Email utility methods. + */ + +public class Email { + + /** + * + * Helper method is e-mail for check. + * + * @param target Check e-mail valid and invalid. + * @return true or false valid mail. + */ + public static boolean isValidEmail(CharSequence target) { + if (target == null) { + return false; + } else { + return android.util.Patterns.EMAIL_ADDRESS.matcher(target).matches(); + } + } + +} From 082a8041ca6a5c3fdd73349067eff010ed4a36bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20=C3=87AKAL?= Date: Fri, 1 Sep 2017 18:50:20 +0300 Subject: [PATCH 2/2] readme commit --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 686d2dc..68c61d7 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,6 @@ Just some handy static classes/methods for dealing with common Android tasks. * `NetUtils` - Static methods for getting/posting JSON, posting form-encoded data, opening and listening to UDP sockets. Handles background threading on behalf of the user, while providing listeners/callbacks that will execute user-provided code on the main thread. Also contains some helper methods for URL encoding, checking conenctivity status on the device and generating random Strings (as non-unique IDs for Http logs etc.). * `SharedPrefsUtils` - Static methods for reading & writing to & from `SharedPreferences`. Methods are provided for each type that can be read/written, and just obfuscates some of the boiler-plate associated with `SharedPreferences`. Only uses __Default__ `SharedPreferences` at the current point in time. + +* `EmailUtils` - A helper class that can be used to authenticate emails during user login or sign-up. +