Lock for Android v1
Android API level 15+ is required in order to use Lock's UI.
If you'll create your own API and just call Auth0 API via the
com.auth0.android:core:1.+, the minimum required API level is 9.
Once it's installed, you'll need to configure LockActivity in your
AndroidManifest.xml, inside the
Also, you'll need to add Internet permission to your application:
Finally, make your Application class (The one that extends from
android.app.Application) implement the interface
com.auth0.lock.LockProvider and add the following code:
You should also add your Application class to the
And include the following code in your
Authentication with Lock
LockActivity will handle Email/Password, Enterprise & Social authentication based on your Application's connections enabled in your Auth0's Dashboard.
When a user authenticates successfully, LockActivity will send an Action using LocalBroadcastManager and then finish itself (by calling finish()). The activity that is interested in receiving this Action (In this case the one that will show Lock) needs to register a listener in the LocalBroadcastManager:
Then just start
And you'll see our native login screen
In the proguard directory you can find the Proguard configuration for Lock and its dependencies. By default you should at least use the following files:
and if you use Facebook or Google+ native integration, you'll need
You specify several files in you application's
build.gradle like this: