Getting Started

The following steps should be followed before integrating the Samsung Blockchain Platform SDK:

  1. Prepare Samsung Galaxy device to run your apk.

  2. Check your development environment.

    • Android minimum API level for Samsung Blockchain Platform SDK : 24
  3. Configure your IDE to integrate Samsung Blockchain Platform SDK with your Android app.

  4. Create an “aar” directory if you don’t have one, and add the BlockchainPlatformSDK_1.2.03.aar to ”aar” directory in your Android project.

  5. Go to Gradle Scripts > build.gradle and enter the following dependencies:

dependencies {
    repositories {
        flatDir{
            dirs 'aar'
        }
    }
    implementation name: 'BlockchainPlatformSDK_1.2.03', ext: 'aar'
    
    // network
    implementation 'com.squareup.retrofit2:retrofit:2.6.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.6.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'
    implementation 'com.google.code.gson:gson:2.8.5'
    
    // web3j
    implementation 'org.web3j:core:4.8.8-android'
    
    // for check developer mode
    implementation 'org.ini4j:ini4j:0.5.4'
    
    // dagger
    implementation 'com.google.dagger:dagger:2.21'
    annotationProcessor 'com.google.dagger:dagger-compiler:2.21'
        
    implementation "io.reactivex.rxjava2:rxjava:2.2.8"
    implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
        
    // Protobuf
    implementation 'com.google.protobuf:protobuf-java:3.9.1'
    implementation 'com.google.protobuf:protobuf-gradle-plugin:0.8.10'
}
  1. Import the package into your code.
import com.samsung.android.sdk.blockchain.*;

Samsung Blockchain Platform SDK supports 2 kinds of hardware wallet:

  • Samsung Blockchain Keystore
  • Ledger's devices like Nano X, Nano S.

Development setting guide for each environment is as follows:

Integration with Samsung Blockchain Keystore

Samsung Blockchain Keystore is compatible with selected Samsung devices only.

You need to have one of selected Samsung devices to run your app with Samsung Blockchain Keystore. Please refer to the restrictions.

  1. Check your development environment.

    • Android minimum API level for Samsung Blockchain Keystore : 28
  2. Download the Samsung Blockchain Keystore SDK.

  3. Set 'Developer Mode' to test your app without App ID verification.
    You can find more information about App ID (scw_app_id), here.

  4. Add "blockchainKeystoreSDK_v1.6.0.aar" to "aar" directory in your Android project.

  5. Go to Gradle Script > build.gradle and add below dependency:

dependencies {
     ...   
    // KeyStore SDK
    implementation name: 'blockchainKeystoreSDK_v1.6.0', ext: 'aar'
    ...
 }

Integration with Nano X or Nano S by Ledger

There is no restrictions to link with Ledger device.

So any Samsung Galaxy mobile is ok to test your app which is integrated with Samsung Blockchain Platform SDK when you sign with Ledger device.

  1. Check your development environment.
  • Ledger Nano X : 1.2.4-1 or higher

  • Ledger Nano S : 1.6 or higher

  • Ledger : Ethereum App: 1.9.8 or higher

You can refer Ledger's guide page to get started.

  1. Go to Gradle > build.gradle and add below dependency:
dependencies {
    ...
    // ledger
    implementation 'com.ledger.lib:ledger-android-library:1.2.2'
}