# STEP 1 Setup your development environment (/limited-release/wlw/android-sdk/101/setupdevenv)



Before you begin developing your branded mobile wallet app, you must obtain the SDK and configure a development environment supporting its use.

**SETUP STEPS:**

1. [Install development tools](#1-install-development-tools)
2. [Configure the SDK instance](#2-configure-the-sdk-instance)

## 1. Install development tools [#1-install-development-tools]

1. Download and install Java 8.
2. Download and install Android Studio as your Integrated Development Environment (IDE) from [Android Studio](https://developer.android.com/studio/index.html).
3. Add the following third-party dependencies to your build.gradle file:

   ```text lineNumbers
   'com.google.android.gms:play-services-wallet:9.2.0'
   'com.android.support:appcompat-v7:23.3.0'
   'com.android.support:design:23.3.0'
   'com.braintreepayments.api:braintree:2.+'
   'com.android.support:support-v4:23.3.0'
   'org.apache.httpcomponents:httpclient:4.0.1'
   ```

## 2. Configure the SDK instance [#2-configure-the-sdk-instance]

### 1. Define the environment variables for your development environment [#1-define-the-environment-variables-for-your-development-environment]

* **HOST\_IP** - The host name or IP address where the mobile gateway resides, for example, "sandbox.paydiant.com"
* **HOST\_URL** - The mobile gateway path relative to the host. The URL suffix should always be `/mobile` appended to the HOST\_IP value. For example, `sandbox.paydiant.com/mobile`.
* **PROTOCOL** - The protocol to be used when calling the mobile gateway (for this version it is "https")
* **appSignature** - A unique identifier of the app used to generate the HMAC during signing.
* **apiKey** - The unique identifier of the application instance.

  ```java lineNumbers
  private static final String HOST_IP = "&lt;hostname&gt;";
  private static final String HOST_URL = HOST_IP + "&lt;URL Suffix&gt;";
  private static final String PROTOCOL = "&lt;protocol&gt;";
  private ContextWrapper androidContextInstance;
  private byte[] appSignature = new byte[]
  {
      0x6d,
      0x79,
      0x2d,
      0x61,
      0x70,
      0x70
  };
  private byte[] apiKey = new byte[]
  {
      1 a7c, 1 x6d, 0x4 p, 1 x31, 1 x5z, 1 x69
  };
  PaydiantApplicationConfig.getPaydiantApplicationConfig()
      .setupPaydiantApplicationConfig(HOST_URL, PROTOCOL, androidContextInstance,
          appSignature, apiKey);
  ```

> **Note:** **Note:** `AppSignature` and `apiKey` values must be in byte format, not string.

### 2. Overload the application context method to set optional configuration values [#2-overload-the-application-context-method-to-set-optional-configuration-values]

**paydiantSDKConfigProps**

Configure encryption and case-sensitivity settings for login password/passcode (PIN)/secret question responses (MFA) to match the corresponding Issuer onboarding settings if encryption will be handled by the SDK:

<div className="pl-[1.625rem]" />

```java lineNumbers
com.paydiant.android.config.PaydiantApplicationConfig.PASSWORD_ENCRYPTION_KEY("paydiant.mobile.sdk.password.hash.enable") Default = FALSE
com.paydiant.android.config.PaydiantApplicationConfig.PASSCODE_ENCRYPTION_KEY("paydiant.mobile.sdk.passcode.hash.enable") Default = FALSE
com.paydiant.android.config.PaydiantApplicationConfig.MFA_ANSWER_ENCRYPTION_KEY("paydiant.mobile.sdk.mfa.hash.enable") Defautlt = FALSE
com.paydiant.android.config.PaydiantApplicationConfig.MFA_CASE_SENSITIVITY_ENCRYPTION_KEY("paydiant.mobile.sdk.mfa.case.sensitivity.enable") Default = FALSE
```

> **Note:** **Note:** Typically, encryption is handled by the server rather than the SDK, so the default value of FALSE is applicable in most cases and explicit configuration is not necessary.

<div className="pl-[1.625rem]" />

```java lineNumbers
sdkConfigProperties.put(com.paydiant.android.config.PaydiantApplicationConfig.PASSWORD_ENCRYPTION_KEY, false
com.paydiant.android.config.PaydiantApplicationConfig.PASSCODE_ENCRYPTION_KEY, false
com.paydiant.android.config.PaydiantApplicationConfig.MFA_ANSWER_ENCRYPTION_KEY, false
com.paydiant.android.config.PaydiantApplicationConfig.MFA_CASE_SENSITIVITY_KEY, false);
```

**customAppVersionName**

Set an alternative application version to override Paydiant's default a.b.c.d.e versioning
format. This custom value will supersede the default setting in the AndroidManifest.

`private String customAppVersionName = "5.10"`

### 3. Enable system logging [#3-enable-system-logging]

Paydiant's default logging utility is automatically initialized by the SDK, but it does need to be explicitly added as a service to the AndroidManifest file in order for the SDK to invoke the initialization.

<div className="pl-[1.625rem]" />

```java lineNumbers
android:name="com.paydiant.android.ui.service.logging.PaydiantLoggingService"
```

Refer to Paydiant's Android SDK Guide for instructions on implementing a custom logging utility, should your business objectives necessitate it.

**NEXT** [STEP 2: Provide wallet access](/limited-release/wlw/android-sdk/101/accesswallet/)
