Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
or if your repositories are managed from settings.gradle
dependencyResolutionManagement {
repositories {
...
maven { url "https://jitpack.io" }
}
}
implementation 'id.bureau:AndroidSDK:1.3.6'
BureauAuth bureauAuth = new BureauAuth.Builder()
.mode(BureauAuth.Mode.Sandbox)
.clientId("Your Client Id")
.build();
//Other Options in builder are
//timeOutInMs - total timeout
//callbackUrl
AuthenticationStatus authenticationStatus = bureauAuth.authenticate(applicationContext,
correlationId, msisdn);
// Possible AuthenticationStatus
// Completed("Authentication flow completed")
// NetworkUnavailable("Mobile network is not available")
// OnDifferentNetwork("Device is using a different network")
// ExceptionOnAuthenticate("Exception occurred while trying to authenticate")
// UnknownState("Unknown authentication state")
If authenticate() method returns the AuthenticationStatus Completed you can go ahead and wait for the callback from Bureau servers or poll the userinfo API.
For an example SDK usage, please take a look here
LOLLIPOP || 21
'com.squareup.okhttp3:okhttp:3.9.0' or compatible versions, ‘com.mixpanel.android:mixpanel-android:5.9.6’
<application
android:usesCleartextTraffic="true"
or if you are using network config
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="false">PLEASE CONTACT BUREAU TO GET DOMAIN</domain>
</domain-config>
</network-security-config>