Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

24 changes: 24 additions & 0 deletions src/com/esri/android/util/EmailUtils.java
Original file line number Diff line number Diff line change
@@ -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();
}
}

}