Setting up Android Studio
This document shows the steps on how to set up your Android environment for the IBM Verify SDK.
- Download the SDK from the App Exchange.
- Start Android Studio and create a new project by accepting the default settings.
- Go to
Project Structure...and add a new module by click on the
+symbol in the upper left corner.
Import .JAR/.AAR packageand click
- Click on the Browse button for the
File nameand select the
VerifySdk.aaron your file system. Click
- In the left side bar, select your app and then in the tab view, go to the
- Add a new dependency by clicking on the
+symbol at the bottom. Select
- Select the
VerifySdkmodule in the dialog.
- Close the dialogs.
- Click on the
Sync your project with Gradle filesicon.
You should now have the SDK properly linked! Let's test it.
onCreate(), add these lines:
HotpGeneratorContext hotpGeneratorContext = new HotpGeneratorContext("AB4C", 6, HmacAlgorithm.SHA1, 0); Log.i("SDK Demo", "HOTP: " + hotpGeneratorContext.create());
Launch the app in an emulator. Look in Android Monitor, ensuring that your log level is set to "Info":
You'll see a line like this:
SDK Demo: HOTP: 630496
You can find a more detailed description of how to get started with the SDK at https://www.ibm.com/blogs/security-identity-access/getting-started-with-the-ibm-verify-sdk/.