Hyphen
  • Hyphen
  • Concepts
    • Auth Methods
    • Hyphen Multi-Sig Account
      • Device Key
      • Recovery Key
      • Server Key
    • Paymaster
    • Hybrid Custody
  • Mechanism Paper
  • iOS SDK
    • Quick Start
    • Authenticating Users
    • Using Hyphen UI Kit
      • Account Management Screen
    • Sample Project
  • Android SDK
    • Quick Start
    • Authenticating Users
    • Handling 2FA / Transaction Request
    • Using Hyphen UI Kit
    • Sending Transactions
  • Flutter SDK
    • Quick Start
    • Authenticating Users
    • Using Hyphen UI Kit
    • Sending Transactions
    • Example App
  • Hybrid Custody
    • Into the Hybrid Custody
  • Without Using SDK
    • Authenticating Users
    • Handling 2FA Push
  • REST API
    • API Reference
      • Account
      • Auth
      • Device
      • Key
      • Sign
    • Swagger
Powered by GitBook
On this page
  • Create an App in the Dashboard
  • Install the SDK using Gradle
  • Firebase Configuration
  • Configuring the SDK
  • Declaring Permission
  • Register Hyphen Activity
  • Initialize SDK

Was this helpful?

  1. Android SDK

Quick Start

Start by Using Hyphen Android SDK

PreviousSample ProjectNextAuthenticating Users

Last updated 1 year ago

Was this helpful?

Create an App in the Dashboard

You need to create an app in the before using Hyphen SDK. After creating an app, an app secret will be issued. The app secret is required to initialize the SDK.

Install the SDK using Gradle

We recommend Gradle to install our SDK.

Edit build.gradle of your app level module to add Hyphen SDK.

implementation "at.hyphen:android-sdk-core:1.0.0-alpha06"
implementation "at.hyphen:android-sdk-authenticate:1.0.0-alpha06"
implementation "at.hyphen:android-sdk-networking:1.0.0-alpha06"
implementation "at.hyphen:android-sdk-ui:1.0.0-alpha06"
implementation "at.hyphen:android-sdk-flow:1.0.0-alpha06"

Edit build.gradle.kts of your app level module to add Hyphen SDK.

implementation("at.hyphen:android-sdk-core:1.0.0-alpha06")
implementation("at.hyphen:android-sdk-authenticate:1.0.0-alpha06")
implementation("at.hyphen:android-sdk-networking:1.0.0-alpha06")
implementation("at.hyphen:android-sdk-ui:1.0.0-alpha06")
implementation("at.hyphen:android-sdk-flow:1.0.0-alpha06")

Firebase Configuration

Need your Firebase project to use Hyphen SDK. After enabling Google Authenticate and Push Messaging in your Firebase project, complete the Firebase setup through the google-services.json file.

Please read the link below to set up Firebase.

Configuring the SDK

Declaring Permission

The following permissions are required to use the Hyphen SDK. Insert the code snippet below your AndroidManifest.xml.

<!-- Required for hyphen networking (communicate with hyphen api server / flow network) -->
<uses-permission android:name="android.permission.INTERNET" />

<!-- Required for signing with device key -->
<uses-permission android:name="android.permission.USE_BIOMETRIC" />

<!-- Required for 2fa / transaction request notifications -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

Register Hyphen Activity

SDK has its own activity to handle 2FA authenticate, transaction requests. Register the activity in your AndroidManifest.xml.

<activity
    android:name="at.hyphen.android.sdk.ui.twofactor.Hyphen2FAActivity"
    android:exported="true" />

Initialize SDK

Insert the code below into the onCreate area of the class that inherited the Application used within the app.

import at.hyphen.android.sdk.core.Hyphen

class MainActivity : Application() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        
        // ... 
        
        Hyphen.initialize(context = this)
        Hyphen.appSecret = "<YOUR-APP-SECRET>"
        Hyphen.network = Hyphen.NetworkType.TESTNET // or MAINNET
    }
}

Hyphen Dashboard
https://firebase.google.com/docs/android/setup