Giter Site home page Giter Site logo

cybrid-sdk-android's Introduction

CircleCI codecov

cybrid-android-sdk

This project contains the SDK of Android components that interface with Cybrid's api and a Demo Application.

SDK

Installation

Requirements

  • Android 5.0 (API level 21) and above
  • Android Gradle Plugin 3.5.1 and above
  • Gradle 5.4.1+
  • AndroidX

Configuration

Add cybrid-android-sdk to your build.gradle dependencies.

dependencies {
  implementation 'app.cybrid:cybrid-android-sdk:0.0.3'
}

Getting Started

You need to add this methods of the SDK inside into yours custom Application and extend to CybridSDKEvents

class App : Application(), CybridSDKEvents {

  override fun onCreate() {

    super.onCreate()
    setupCybridSDK()
  }

  fun setupCybridSDK() {
    Cybrid.instance.listener = this
  }
}

The CybridSDKEvents contains a method called onTokenExpired that have to be implemented inside the custom implementation of Application

override fun onTokenExpired() {

  // -- Set a new Bearer Token
}

This method gonna be called every time the Bearer Token is expired and the SDK needs new one.

Set current Berear Token

To set a valid bearer token you have to set it with any time you need it

Cybrid.instance.setBearer("")

Extra configuration

You can configre the custom tag to log events of the SDK with:

Cybrid.instance.tag = "XXX"

And each component has the posibility to configure the refresh time:

component.updateInterval = 2000L

Components Integration

ListPricesView

Add ListPricesView inside your view

<app.cybrid.sdkandroid.components.ListPricesView
  android:id="@+id/listPricesView"
  android:layout_width="0dp"
  android:layout_height="wrap_content"/>

And then get the ListPricesViewModel with:

val viewModel: ListPricesViewModel by viewModels()

Then configure the component inside your activity or fragemnt with:

val cryptoList = findViewById<ListPricesView>(R.id.listPricesView)
cryptoList.setViewModel(viewModel)
cryptoList.updateInterval = 2000L

Demo App

To run the demo app it's necessary add to enviroment vars into the system

export CybridAPI_ID = 'XXXX'
export CybridAPI_Secret = 'XXXX'

Then Clean Project and then Rebuild Project.

After this just need to run the demo app inside the emulator or physical device.

cybrid-sdk-android's People

Contributors

nalancer08 avatar renovate[bot] avatar renovate-bot avatar

Stargazers

 avatar César Cruz avatar  avatar Ігор Кушніренко avatar

Watchers

 avatar

cybrid-sdk-android's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency com.squareup.okhttp3:logging-interceptor to v5.0.0-alpha.14
  • Update dependency io.mockk:mockk to v1.13.12
  • Update plugin org.jetbrains.kotlin.android to v1.9.25
  • Update cimg/android Docker tag to v2023.12.1
  • Update dependency android to v2.5.0
  • Update dependency androidx.activity:activity-compose to v1.9.0
  • Update dependency androidx.activity:activity-ktx to v1.9.0
  • Update dependency androidx.appcompat:appcompat to v1.7.0
  • Update dependency androidx.compose.foundation:foundation to v1.6.8
  • Update dependency androidx.compose.material3:material3 to v1.2.1
  • Update dependency androidx.compose.material:material to v1.6.8
  • Update dependency androidx.compose.material:material-icons-extended to v1.6.8
  • Update dependency androidx.compose.runtime:runtime-livedata to v1.6.8
  • Update dependency androidx.compose.ui:ui to v1.6.8
  • Update dependency androidx.compose.ui:ui-test-junit4 to v1.6.8
  • Update dependency androidx.compose.ui:ui-test-manifest to v1.6.8
  • Update dependency androidx.compose.ui:ui-tooling to v1.6.8
  • Update dependency androidx.compose.ui:ui-util to v1.6.8
  • Update dependency androidx.core:core-ktx to v1.13.1
  • Update dependency androidx.fragment:fragment-ktx to v1.8.1
  • Update dependency androidx.lifecycle:lifecycle-common-java8 to v2.8.3
  • Update dependency androidx.lifecycle:lifecycle-livedata-ktx to v2.8.3
  • Update dependency androidx.lifecycle:lifecycle-viewmodel-compose to v2.8.3
  • Update dependency androidx.lifecycle:lifecycle-viewmodel-ktx to v2.8.3
  • Update dependency androidx.test.espresso:espresso-core to v3.6.1
  • Update dependency androidx.test.ext:junit to v1.2.1
  • Update dependency androidx.test:rules to v1.6.1
  • Update dependency androidx.test:runner to v1.6.1
  • Update dependency app.cybrid:cybrid-api-id-kotlin to v0.118.85
  • Update dependency codecov to v3.3.0
  • Update dependency com.google.android.material:material to v1.12.0
  • Update dependency com.google.code.gson:gson to v2.11.0
  • Update dependency gradle to v8.9
  • Update dependency org.robolectric:robolectric to v4.13
  • Update plugin org.jetbrains.kotlinx.kover to v0.8.3
  • Update retrofit monorepo to v2.11.0 (com.squareup.retrofit2:converter-scalars, com.squareup.retrofit2:converter-gson, com.squareup.retrofit2:retrofit)
  • Update cimg/android Docker tag to v2024
  • Update dependency codecov to v4
  • Update dependency com.plaid.link:sdk-core to v4
  • Update plugin io.github.gradle-nexus.publish-plugin to v2
  • Update plugin org.jetbrains.kotlin.android to v2
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

circleci
.circleci/config.yml
  • codecov 3.2.4
  • android 2.3.0
  • cimg/android 2023.06.1
  • cimg/android 2023.06.1
  • cimg/android 2023.06.1
  • cimg/android 2023.06.1
github-actions
.github/workflows/release-versioning.yml
gradle
gradle.properties
settings.gradle
version.gradle
build.gradle
  • com.android.application 8.1.4
  • com.android.library 8.1.4
  • org.jetbrains.kotlin.android 1.9.10
  • org.jetbrains.kotlinx.kover 0.7.4
  • io.github.gradle-nexus.publish-plugin 1.1.0
SDKAndroid/build.gradle
  • composeOptions 1.5.3
  • androidx.core:core-ktx 1.12.0
  • androidx.appcompat:appcompat 1.6.1
  • com.google.android.material:material 1.10.0
  • androidx.constraintlayout:constraintlayout 2.1.4
  • app.cybrid:cybrid-api-bank-kotlin 0.111.2
  • com.google.code.gson:gson 2.9.1
  • com.squareup.okhttp3:logging-interceptor 5.0.0-alpha.11
  • com.squareup.retrofit2:retrofit 2.9.0
  • com.squareup.retrofit2:converter-gson 2.9.0
  • com.squareup.retrofit2:converter-scalars 2.9.0
  • androidx.compose.ui:ui 1.5.4
  • androidx.compose.ui:ui-util 1.5.4
  • androidx.compose.ui:ui-tooling 1.5.4
  • androidx.compose.foundation:foundation 1.5.4
  • androidx.compose.material:material 1.5.4
  • androidx.compose.runtime:runtime-livedata 1.5.4
  • androidx.compose.material3:material3 1.1.2
  • androidx.compose.ui:ui-test-junit4 1.5.4
  • androidx.activity:activity-compose 1.8.1
  • androidx.lifecycle:lifecycle-viewmodel-compose 2.6.2
  • androidx.constraintlayout:constraintlayout-compose 1.0.1
  • androidx.compose.material:material-icons-extended 1.5.4
  • io.coil-kt:coil-compose 2.2.2
  • androidx.compose.ui:ui-test-junit4 1.5.4
  • androidx.compose.ui:ui-test-junit4 1.5.4
  • androidx.compose.ui:ui-test-manifest 1.5.4
  • androidx.customview:customview-poolingcontainer 1.0.0
  • androidx.lifecycle:lifecycle-viewmodel-ktx 2.6.2
  • androidx.lifecycle:lifecycle-livedata-ktx 2.6.2
  • androidx.lifecycle:lifecycle-common-java8 2.6.2
  • androidx.lifecycle:lifecycle-extensions 2.2.0
  • androidx.activity:activity-ktx 1.8.1
  • androidx.fragment:fragment-ktx 1.6.2
  • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.6.4
  • org.jetbrains.kotlinx:kotlinx-coroutines-android 1.6.4
  • com.withpersona.sdk2:inquiry 2.2.37
  • com.plaid.link:sdk-core 3.10.1
  • androidx.test:runner 1.5.2
  • io.mockk:mockk 1.13.5
  • org.robolectric:robolectric 4.11.1
  • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.6.4
  • androidx.arch.core:core-testing 2.2.0
  • androidx.test.ext:junit 1.1.5
  • androidx.test.espresso:espresso-core 3.5.0
app/build.gradle
  • androidx.core:core-ktx 1.12.0
  • androidx.appcompat:appcompat 1.6.1
  • com.google.android.material:material 1.10.0
  • androidx.constraintlayout:constraintlayout 2.1.4
  • androidx.compose.ui:ui 1.5.4
  • androidx.lifecycle:lifecycle-extensions 2.2.0
  • androidx.activity:activity-ktx 1.8.1
  • app.cybrid:cybrid-api-bank-kotlin 0.111.2
  • app.cybrid:cybrid-api-id-kotlin 0.111.2
  • com.squareup.retrofit2:retrofit 2.9.0
  • com.squareup.retrofit2:converter-gson 2.9.0
  • com.google.code.gson:gson 2.9.1
  • com.squareup.retrofit2:converter-scalars 2.9.0
  • androidx.test.ext:junit 1.1.5
  • androidx.test.espresso:espresso-core 3.5.0
  • androidx.test:rules 1.5.0
  • androidx.test:runner 1.5.0
  • androidx.test.ext:junit 1.1.5
  • androidx.compose.ui:ui-test-junit4 1.5.4
  • junit:junit 4.13.2
  • org.robolectric:robolectric 4.11.1
  • androidx.compose.ui:ui-test-junit4 1.5.4
  • androidx.compose.ui:ui-test-manifest 1.5.4
  • androidx.compose.ui:ui-test-manifest 1.5.4
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.1.1

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.