Stripe - Android Upgrade Guide (2.1.0)

📘

Guide for upgrading from 2.0.0 to 2.1.0

The 2.1.0 release of the Android Stripe SDK requires some configuration changes to upgrade from 2.0.0. Here are the steps to follow:

  1. Remove the implementation "com.stripe:stripeterminal:2.23.1" dependency and replace with the following:
        implementation 'com.stripe:stripeterminal-localmobile:3.2.1'
        implementation 'com.stripe:stripeterminal-core:3.2.1'
    
  2. Remove the older version of implementation files('../libs/EverCommercePaymentsAndroidSdk-release.aar') and replace it with the newer version of the implementation files('../libs/EverCommercePaymentsAndroidSdk-release.aar') that is on version 2.1.0.
  3. Bump compileSdk and targetSdk in build.gradle to 34.
  4. If 'com.android.tools.build.gradle' is used in your project setup, 7.4.2 or higher is recommended. (Note - setups will vary depending on your project's needs.)
  5. If 'org.jetbrains.kotlin:kotlin-gradle-plugin' is used in your project setup, 1.6.21 or higher is recommended. (Note - setups will vary depending on your project's needs.)
  6. If gradle.wrapper.properties is used in your project setup, the following value in gradle.wrapper.properties for distributionUrl can be used if using 7.4.2 'com.android.tools.build.gradle' and 1.6.21 'org.jetbrains.kotlin:kotlin-gradle-plugin' (Note - setups will vary depending on your project's needs.) :
    distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
    
  7. The newer version of the SDK requires ACCESS_COARSE_LOCATION. Ensure ACCESS_COARSE_LOCATION is declared in AndroidManifest.xml and requested in code.
  8. There is a minor change in behavior in the connect device flow. If a device is already connected and another connection attempt is made, the ConnectCallback will return false.
  9. If you are going to use Android Tap To Pay in your application, you will need to make sure your application follows the Debuggable Security Setup. If you will use bluetooth functionality only, in development environments you can continue to have a debuggable application.