Last active
June 18, 2019 05:22
-
-
Save anotherdev/5c8f08de49bd7929fc405c60bf9e2131 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Eko Login SDK Android integration | |
Requirements: | |
1. Minimum Android API 21 | |
2. Enable Java 8 | |
Steps: |
Integrating Eko Login SDK to your app
- Create an
EkoLoginClient
object
EkoLoginOptions options = new EkoLoginOptions.Builder()
.loginWithAppId("com.ekoapp.ekosdk.app.target.blue")
.isDebug(true)
.build();
EkoLoginClient client = EkoLoginClient.getClient(options);
- On login button clicked, call
login()
method.
Context context = <the activity context>
client.login(context)
.subscribe(
account -> {
String ekoLoginToken = account.getToken();
// You are now authenticated
},
e -> {
EkoLoginError error = EkoLoginError.fromThrowable(e);
// Show error dialog
}
)
Test Eko Login Provider app
Please download the Si vWORK Debug app: https://download.ekoapp.com/apps/siriraj-login
- On first login, ignore the "Updating configuration" screen and close the app.
- You can now test login with Eko.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setup the Eko Login SDK![](https://camo.githubusercontent.com/83093856c197b5cb64724ea62dbb1c9455d32333a8bf42b29c4d0df6efbd1895/68747470733a2f2f6a69747061636b2e696f2f762f456b6f436f6d6d756e69636174696f6e732f456b6f4c6f67696e53444b416e64726f69642e737667)
Where x.y.z = latest Eko Login SDK on![](https://camo.githubusercontent.com/83093856c197b5cb64724ea62dbb1c9455d32333a8bf42b29c4d0df6efbd1895/68747470733a2f2f6a69747061636b2e696f2f762f456b6f436f6d6d756e69636174696f6e732f456b6f4c6f67696e53444b416e64726f69642e737667)