https://github.com/wordpress-mobile/emailchecker-android
Email checking library for Android
https://github.com/wordpress-mobile/emailchecker-android
Last synced: 12 months ago
JSON representation
Email checking library for Android
- Host: GitHub
- URL: https://github.com/wordpress-mobile/emailchecker-android
- Owner: wordpress-mobile
- License: gpl-2.0
- Created: 2016-03-29T09:11:25.000Z (almost 10 years ago)
- Default Branch: trunk
- Last Pushed: 2021-12-03T03:49:29.000Z (about 4 years ago)
- Last Synced: 2025-01-13T18:23:01.637Z (about 1 year ago)
- Language: Kotlin
- Size: 104 KB
- Stars: 3
- Watchers: 23
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-GPL
Awesome Lists containing this project
README
# Email Checker for Android
## Introduction
This library helps to catch simple email domain typos. Its intended to
be used as a hint when a user have to enter an email address.
The library is written in Kotlin and is inspired by the algorithm
described here: http://norvig.com/spell-correct.html (Warning, it's
not the exact same algo).
## How to use it in an Android project
If you want to use it in your Android project, your can add it as a
library in your build.gradle file, don't forget to add the
wordpress-mobile maven repository. For instance:
```gradle
dependencies {
// use the latest version
compile 'org.wordpress:emailchecker2:+'
}
```
Sample usage in Java:
```java
String emailToCheck = "salut@gmial.com";
String suggestion = EmailCheckerKt.suggestDomainCorrection(emailToCheck);
if (suggestion.compareTo(email) != 0) {
Log.v("MYAPP", "did you mean: " + suggestion + " ?");
}
```
Sample usage in Kotlin:
```kotlin
val emailToCheck = "salut@gmial.com";
val suggestion = suggestDomainCorrection(emailToCheck)
if (suggestion != emailToCheck) {
Log.v("MYAPP", "did you mean: " + suggestion + " ?");
}
```
## Hack it
### Directory structure
```
|-- example # Example App
`-- emailchecker # EmailChecker Library
```
### Build
* Build:
```
$ ./gradlew build
```
* Publish to bintray:
```
$ ./gradlew build bintrayUpload -PbintrayUser=XXX -PbintrayKey=XXX -PdryRun=false
```
## LICENSE
This library is dual licensed unded MIT and GPL v2.
## CHANGELOG
### 1.0.0
* Initial release
[1]: https://github.com/wordpress-mobile/WordPress-Android