Hawcx Android SDK
Revolutionary next-generation passwordless authentication powered by Hawcx
Overview
Hawcx SDK delivers revolutionary Hawcx technology - the most intuitive passwordless authentication ever created for Android applications. Hawcx intelligently handles both sign up and sign in through a single, unified interface, eliminating decision fatigue while maintaining enterprise-grade security.
Starting a new integration? Use V6
This is the legacy V4/V5 integration (HawcxSDK, authenticateV4 / submitOtpV4). For new apps, prefer the adaptive V6 Android guide — prompt-driven flow, MFA, and trusted-device support. This page remains for apps already on the V4/V5 SDK.
Hawcx Technology
One-click intelligent authentication that automatically determines user context
Contextual Intelligence
No more "Sign Up" vs "Sign In" confusion - just one smart entry point
Seamless Cross-Platform
Hawcx maintains user context across all devices and platforms
Web Login Approval
Allow users to approve web logins from their mobile device
Enterprise-Grade Security
Revolutionary security with consumer-grade simplicity
Architecture
Quick Start
dependencies {
implementation 'com.hawcx:hawcx-android-sdk:4.0.0'
}dependencies {
implementation("com.hawcx:hawcx-android-sdk:4.0.0")
}- Download the latest
hawcx-sdk-4.0.0.aar - Copy to your project's
libsdirectory - Add to your module's build configuration:
dependencies {
implementation files('libs/hawcx-sdk-4.0.0.aar')
}import com.hawcx.internal.HawcxSDK
class MainApplication : Application() {
companion object {
lateinit var hawcxSdkInstance: HawcxSDK
private set
}
override fun onCreate() {
super.onCreate()
// Initialize Hawcx SDK with your Config ID
hawcxSdkInstance = HawcxSDK(
context = this.applicationContext,
projectApiKey = "YOUR_CONFIG_ID"
)
}
}Don't forget to register your Application class in the AndroidManifest.xml:
<application
android:name=".YourApplication"
...>
<!-- Activities and other components -->
</application>Requirements & environment
This legacy SDK requires Android 7.0+ (API level 24), and initializes with only your Config ID — HawcxSDK(projectApiKey = ...) has no base-URL / host parameter, so it always targets Hawcx's default (production) environment. To point the SDK at a non-production tenant (e.g. a sandbox), use the V6 SDK, whose initializer takes a baseUrl.
Troubleshooting
Error Codes
| Error Code | Description |
|---|---|
FINGERPRINT_ERROR | Failed to generate device fingerprint |
KEYCHAIN_SAVE_FAILED | Failed to save data to Android Keystore |
CLIENT_CRYPTO_ERROR | Cryptographic operation failed on device |
AUTH_INIT_FAILED | Authentication initialization failed |
OTP_VERIFICATION_FAILED | Invalid or expired OTP |
DEVICE_VERIFICATION_FAILED | Device registration verification failed |
CIPHER_VERIFICATION_FAILED | Login cipher verification failed |
NETWORK_ERROR | Network connectivity issue or request timeout |
INTERNAL_STATE_ERROR | SDK internal state corruption |
MISSING_DEVICE_TOKEN_SESSION | Session token missing during flow |
UNKNOWN_ERROR | Unexpected error occurred |
| Error Code | Description |
|---|---|
INVALID_PIN | 7-digit PIN is invalid or expired |
FAILED_APPROVE | Web login approval failed |
NETWORK_ERROR | Network connectivity issue |
UNKNOWN_ERROR | Unexpected error during web login |
Support
Last updated on