{"id":42242978,"url":"https://github.com/karhoo/karhoo-android-ui-sdk","last_synced_at":"2026-01-27T04:18:54.944Z","repository":{"id":36954000,"uuid":"285268097","full_name":"karhoo/karhoo-android-ui-sdk","owner":"karhoo","description":"Android UI SDK for Karhoo","archived":false,"fork":false,"pushed_at":"2024-05-14T07:11:18.000Z","size":21883,"stargazers_count":9,"open_issues_count":2,"forks_count":0,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-05-14T08:30:50.382Z","etag":null,"topics":["cd-deployment","cicd","ignore-curator","team-mobile"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karhoo.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-05T11:27:39.000Z","updated_at":"2024-05-10T14:34:56.000Z","dependencies_parsed_at":"2024-01-29T09:53:13.315Z","dependency_job_id":"3f032d05-1661-4ae8-b9f3-2b41a7db2852","html_url":"https://github.com/karhoo/karhoo-android-ui-sdk","commit_stats":null,"previous_names":[],"tags_count":70,"template":false,"template_full_name":null,"purl":"pkg:github/karhoo/karhoo-android-ui-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karhoo%2Fkarhoo-android-ui-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karhoo%2Fkarhoo-android-ui-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karhoo%2Fkarhoo-android-ui-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karhoo%2Fkarhoo-android-ui-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karhoo","download_url":"https://codeload.github.com/karhoo/karhoo-android-ui-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karhoo%2Fkarhoo-android-ui-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28801880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T03:44:14.111Z","status":"ssl_error","status_checked_at":"2026-01-27T03:43:33.507Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cd-deployment","cicd","ignore-curator","team-mobile"],"created_at":"2026-01-27T04:18:49.805Z","updated_at":"2026-01-27T04:18:54.936Z","avatar_url":"https://github.com/karhoo.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://karhoo.com\"\u003e\n\u003cimg\nalt=\"Karhoo logo\"\nwidth=\"250px\"\nsrc=\"https://cdn.karhoo.com/s/images/logos/karhoo_logo.png\"\n/\u003e\n\u003c/a\u003e\n\u003c/div\u003e\n\n[![](https://jitpack.io/v/karhoo/karhoo-android-ui-sdk.svg)](https://jitpack.io/#karhoo/karhoo-android-ui-sdk)\n\n#Karhoo Android UI SDK\n\nThe UI SDK extends our [**Network SDK**](https://github.com/karhoo/karhoo-android-sdk) with ready to use screens and views for your end users to book rides with [**Karhoo**](https://karhoo.com/) in your application.\n\nFor more general information about the SDKs, checkout [**the karhoo developer portal**](https://developer.karhoo.com/docs/build-apps-using-sdks)\n\n## Installation\n\nDepending on the payment provider that you wish to integrate with, we offer three dependencies, each one containing a different payment provider integration. Only one of them should be used when adding the UISDK to your project\n\nStable Release\n```gradle\ndependencies {\n    //... Other project dependencies\n\n    //The -adyen dependency contains the Adyen integration:\n    implementation 'com.github.karhoo.karhoo-android-ui-sdk:uisdk-adyen:1.13.4RC2'\n\n    //Note that only one dependency from the above three should be integrated into your project\n}\n\n```\n\n## Initialisation\n\nThere are a few things the UI SDK needs to know before you can get started such as what environment to connect to, or what kind of authentication method to use.\nTo configure the SDK you will need to provide an implementation of our KarhooUISDKConfiguration interface. This lets our SDK grab certain dependencies and configuration settings.\n\n\n```kotlin\nclass KarhooConfig(val context: Context): KarhooUISDKConfiguration {\n    override lateinit var paymentManager: PaymentManager\n    var sdkAuthenticationRequired: ((callback: () -\u003e Unit) -\u003e Unit)? = null\n\n    override fun logo(): Drawable? {\n        return context.getDrawable(R.drawable.your-logo)\n    }\n\n    override fun environment(): KarhooEnvironment {\n        return KarhooEnvironment.Sandbox()\n    }\n\n    override fun context(): Context {\n        return context\n    }\n\n    override fun authenticationMethod(): AuthenticationMethod {\n        return AuthenticationMethod.KarhooUser()\n    }\n\n    override suspend fun requireSDKAuthentication(callback: () -\u003e Unit) {\n            sdkAuthenticationRequired?.invoke(callback)\n    }\n}\n\n// Then set the payment provider and register the configuration in your Application file\n\n// The payment provider's view needs to be instantiated. It can be AdyenPaymentView or BraintreePaymentView depending on the PSP choice\n// Adyen integration\nval paymentManager = AdyenPaymentManager()\npaymentManager.paymentProviderView = AdyenPaymentView()\n\n// Braintree integration\nval paymentManager = BraintreePaymentManager()\npaymentManager.paymentProviderView = BraintreePaymentView()\n\n// Later down the line\nval config = SDKConfig(context = this.applicationContext)\nconfig.sdkAuthenticationRequired = {\n    loginInBackground(it, yourToken)\n}\n\nKarhooApi.setConfiguration(configuration = config)\n\n// Implementing the token refresh flow\nprivate var deferredRequests: MutableList\u003c(()-\u003e Unit)\u003e = arrayListOf()\nprivate fun loginInBackground(callback: () -\u003e Unit, token: String) {\n    if (!requestedAuthentication) {\n        Log.e(TAG, \"Need an external authentication\")\n        requestedAuthentication = true\n        deferredRequests.add(callback)\n\n        GlobalScope.launch {\n        //Refresh your own access token in order to ensure a proper validity period for the Karhoo token\n        //Then use that token to refresh the credentials inside the SDK\n          KarhooApi.authService.login(token).execute { result -\u003e\n                 when (result) {\n                     is Resource.Success -\u003e {\n                                 Log.e(TAG, \"We got a new token from the back-end\")\n                                 deferredRequests.map {\n                                     it.invoke()\n                                 }\n                                 deferredRequests.clear()\n                                 requestedAuthentication = false\n                             }\n                             is Resource.Failure -\u003e toastErrorMessage(result.error)\n                         }\n                     }\n                 }\n    } else {\n        deferredRequests.add(callback)\n    }\n}\n```\n\nWith this configuration the UISDK can be initialised in your Activities/Fragments. This will also ensure the network layer (KarhooSDK) is initialised and configured properly.\n\nFor full documentation of SDK services please visit our Developer Portal: https://developer.karhoo.com/reference#user-service\n\n## Set up for developing the SDK\nThis project uses the Gradle build system.\n\nFirst download the project by cloning this repository or downloading an archived\nsnapshot. (See the options at the top of the page.)\n\nIn Android Studio, use the \"Import non-Android Studio project\" or \"Import Project\" option.\nIf prompted for a gradle configuration accept the default settings.\n\nAlternatively use the `gradlew build` command to build the project directly.\n\n## Getting Started with the sample app\nThe demo app require that you add your own set of API keys:\n\n- Create a file in the app directory called `secure.properties` (this file should *NOT* be under version control to protect your API key)\n- Add the API keys and configurations to secure.properties. You can also take a look at the `secure.properties.template` as an example.\n    - [Get a Maps API key](https://developers.google.com/maps/documentation/android-sdk/get-api-key)\n    - Enable Firebase analytics/crashlytics and add config file to the project (google-service.json) (Optional)\n    - Add GUEST CHECKOUT configuration for your account in order to enable the guest checkout journey\n    - Add Staging environment configuration in order to be able to use Staging environment\n- Update fabric API key in app/build.gradle\n- Build and run\n\n## Issues\n\n### 🐛 Bugs\n\nPlease file an issue for bugs, missing documentation, or unexpected behavior.\n\n### 💡 Feature Requests\n\nPlease file an issue to suggest new features. Vote on feature requests by adding\na 👍. This helps maintainers prioritize what to work on.\n\n### ❓ Questions\n\nFor questions related to using the library, please re-visit a documentation first. If there are no answer, please create an issue with a label `help needed`.\n\n## License\n[BSD-2-Clause](./LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarhoo%2Fkarhoo-android-ui-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarhoo%2Fkarhoo-android-ui-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarhoo%2Fkarhoo-android-ui-sdk/lists"}