Skip to main content
Latest version: 0.3.2

Gradle setup

To use the Android Wave Sdk, please follow the steps bellow: Add this package cloud repo as a repository to your project’s build.gradle
repositories {
    maven {
        url 'https://packagecloud.io/Wave/Wave/maven2'
    }
}
Add the sdk as a dependency in your module’s build.gradle
implementation "br.com.wave:wave-sdk:0.3.2"
Our sdk uses Data Binding in it’s UI, so as a requirement, you’ll need to add it to your module’s build.gradle as well
android {
    dataBinding {
        enabled = true
    }
}

Initialization

After sync, add the sdk to your Application class
Wave.initialize(application = this, apiKey = "apiKey")
where apiKey is the authentication key needed to start the flow. This information should be provided by Wave.

Starting the activation flow

To start a feature, use the start method in an activity (context should be the activity’s)
Wave.start(context = this, feature = Feature.Activation)
There are some optional parameters for this method that you can use, such as:
  • primaryColor: colors some key views. You should pass the color res directly, like R.color.blue
  • backgroundColor: colors the content/background of the screens. You should pass the color res directly, like R.color.lightGray
  • font: the text font to be applied to all text views. You should pass the font res directly, like R.font.font_name
  • externalCode: is the client id. Should be in format publicIndentifier:account. If provided, the user is going to be asked to input the IccId’s last digits. If not provided, the user is going to be asked to input the whole code.
  • onPortabilityClick: callback for when the user clicks on the portability card in the success screen
  • onAdditionalLineClick: callback for when the user clicks on the additional line card in the success screen
  • language: By default, the texts in the activation flow follow the device’s language. If this field is set, it will follow the chosen language instead of the device’s. The options are MX, EN, PT and DEFAULT. If you face any issues, contact our team!

Compatibility Issues

There might be some compatibility issues when launching Wave sdk.
  1. Some ui components extend from Google’s Material Components, so if the app’s theme does not extend from Theme.MaterialComponents, it will crash. A way to solve this could be implementing bridge themes.
  2. Inside app’s theme, it is expected to have <item name="windowNoTitle">true</item> and <item name="windowActionBar">false</item>
We are aware of these issues and are working for them not to be a problem anymore.