{"id":40738120,"url":"https://github.com/verloop/android-sdk","last_synced_at":"2026-01-21T15:02:59.509Z","repository":{"id":37102841,"uuid":"208224209","full_name":"verloop/android-sdk","owner":"verloop","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-07T11:08:25.000Z","size":478,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-11-07T13:07:46.738Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/verloop.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-09-13T08:23:31.000Z","updated_at":"2025-11-07T11:06:35.000Z","dependencies_parsed_at":"2024-10-19T09:02:31.876Z","dependency_job_id":"1f33bd34-366c-4aab-801a-13b1f8d5a19f","html_url":"https://github.com/verloop/android-sdk","commit_stats":null,"previous_names":[],"tags_count":110,"template":false,"template_full_name":null,"purl":"pkg:github/verloop/android-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verloop%2Fandroid-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verloop%2Fandroid-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verloop%2Fandroid-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verloop%2Fandroid-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/verloop","download_url":"https://codeload.github.com/verloop/android-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verloop%2Fandroid-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28635123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T14:50:40.221Z","status":"ssl_error","status_checked_at":"2026-01-21T14:48:59.225Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2026-01-21T15:02:59.437Z","updated_at":"2026-01-21T15:02:59.495Z","avatar_url":"https://github.com/verloop.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"## How to install\n\nAdd JitPack in your project's gradle file :\n\n```\n  allprojects {\n    repositories {\n      ...\n      maven { url 'https://jitpack.io' }\n    }\n  }\n```\n\nThen add the Verloop's dependency in your app's gradle file\n\n```\n  dependencies {\n          implementation 'com.github.verloop:android-sdk:1.1.20'\n  }\n```\n\n### If you are using proguard in android add the following\n\n```\n-keepattributes *Annotation*\n```\n\n## Usage\n\nIn your `MainActivity` (or any of the activity), you need to initialize an object of `Verloop`class.\nIt accepts a `VerloopConfig` object as an argument for initializing.\n\n```kotlin\n// Exhaustive list of values which you can put while creating config\nvar config = VerloopConfig.Builder()\n    .clientId(\"CLIENT_ID\")              // Required: this would be your account name associated with verloop. eg: \u003cclient_id\u003e.verloop.io\n    .userId(\"USER_ID\")                  // If user is logged in, and if you want to associate older chats, else, skip this for anonymous user \n    .fcmToken(\"FCMTOKEN_FOR_DEVICE\")    // If you wish to get notifications, else, skip this\n    .recipeId(\"RECIPE_ID\")              // In case you want to use default recipe, skip this\n    .userName(\"USER_NAME\")              // If guest name variable is a part of the recipe, or the value is not required, skip this\n    .userEmail(\"USER_EMAIL\")            // If email variable is a part of the recipe, or the value is not required, skip this\n    .userPhone(\"USER_PHONE\")            // If phone variable is a part of the recipe, or the value is not required, skip this\n    .isStaging(false)                   // Keep this as true if you want to access \u003cclient_id\u003e.stage.verloop.io account. If the account doesn't exist, keep it as false or skip it\n    .closeExistingChat(false)           // Close the existing chat if exist and start a new conversation\n    .fields(customFields)               // These are predefined variables added on room level or user level\n    .overrideHeaderLayout(false)        // Use toolbar_verloop.xml from parent project to set custom header. Can't use along with headerConfig\n    .headerConfig(headerConfig)         // Configuration to customize toolbar. Can't use along with overrideHeaderLayout\n    .allowFileDownload(true)            // This will allow visitors to download the attachments. If this is false, download button will not be visible on the attachment\n    .build()                            // this would build the final config object which is later used by Verloop object to star the chat\n\nval verloop = Verloop(this, config)     // `this` here refers to an activity context.\n\n```\n\nIf you don't have a user ID, or have an anonymous user, simply leave the field and our SDK will take\ncare of it.\n\n```kotlin\nval config = VerloopConfig.Builder()(\"YOUR-CLIENT-ID\").build()\n```\n\nAnd when the user clicks on \"Support\" button, you simply need to call\n\n```kotlin\nverloop.showChat()\n```\n\nand the chat activity will start.\n\n### User Properties\n\nTo set a user properties `name`, `email`, and `phone`, you can directly call the method\nin `VerloopConfig` object.\n\n```kotlin\nconfig.userName(\"Name\").build()\nconfig.userEmail(\"Email\").build()\nconfig.userPhone(\"Phone\").build()\n```\n\n### Manual recipe ID override\n\nDefault recipe will run during the conversation unless we do a manual recipe override by calling the\nfollowing method:\n\n```kotlin\nconfig.recipeId(\"\u003cRecipe ID\u003e\").build()\n```\n\n### Custom variables\n\nYou can send custom details of a customer with conversation scope or at global scope.\n\nCustom fields set on the conversation scope will have context associated with only that particular\nconversation. Once the conversation is over, you can set different values for a new conversation for\nthe same customer. Use the following code to set the value:\n\n```kotlin\nconfig.putCustomField(\"Test Field\", \"Test Value\")\n```\n\nOR\n\n```kotlin\nconfig.putCustomField(\"Test Field\", \"Test Value\", Scope.ROOM)\n```\n\nGlobal scope variables are associated with customer and not on a conversation. Something like name,\nemail etc. do not change on different conversation of the same user. To set the value for global\nscope variables:\n\n```kotlin\nconfig.putCustomField(\"Test Field\", \"Test Value\", Scope.USER)\n```\n\n## Customized Toolbar\n\nThere are two way to customize toolbar. In VerloopConfig you can either use overrideHeaderLayout or\nheaderConfig.\n\nHow to use overrideHeaderLayout:\n\nIn root project you can create a new layout resource file named as 'toolbar_verloop.xml' to override\ntoolbar layout defined in the sdk.\n\n1. Set overrideHeaderLayout to true in VerloopConfig\n2. Set headerConfig to false in VerloopConfig (by default is false)\n3. Create toolbar_verloop.xml in root project layout folder\n4. Customize the views in toolbar_verloop.xml as required.\n5. If exists, set back navigation icon id to 'verloop_back_icon' in toolbar_verloop.xml Notes: Both\n   overrideHeaderLayout and headerConfig cannot be used together.\n\nHow to use headerConfig:\n\n1. Create an object of HeaderConfig with required configuration\n2. Set headerConfig in VerloopConfig\n3. Set overrideHeaderLayout to false in VerloopConfig\n\n```kotlin\nval headerConfig = HeaderConfig.Builder()\n    .brandLogo(\"https://logo-url\")\n    .title(\"Verloop\")\n    .titleColor(\"#FFFFFF\")\n    .titlePosition(Position.LEFT)\n    .titleFontSize(18.0f)\n    .subtitle(\"Support automation\")\n    .subtitleColor(\"#FFFFFF\")\n    .subtitlePosition(Position.LEFT)\n    .subtitleFontSize(12.0f)\n    .backgroundColor(\"#d451db\")\n    .build()\n\nval verloopConfig = VerloopConfig.Builder()\n    .clientId(\"client_id\")\n    .overrideHeaderLayout(false)\n    .headerConfig(headerConfig)\n    .fields(customFields)\n    .build()\n```\n\n### Notification\n\nThis will work only after you have added FCM token at the time of creation of the verloop config\nobject\n\n```kotlin\nconfig.fcmToken(\"FCMTOKEN-FOR-DEVICE\").build()\n```\n\nNow, to let Verloop handle Notifications, simply add this line in your `FirebaseMessagingService`\nclass\n\n```kotlin\n@Override\nfun onMessageReceived(remoteMessage: RemoteMessage) {\n    // set a drawable to use as icon for notifications\n    val icon = R.drawable.notification_image\n\n    // Notifications will be auto-ignored if it's not from Verloop. Default notification channel name will be \"Verloop Chat Message\"\n    VerloopNotification.showNotification(\n        this,\n        icon,\n        remoteMessage.getData(),\n        \"Your Notification Channel Name\"\n    )\n\n    // Do anything else with your message.\n}\n```\n\n### Handle Notification click\n\nIn your Launcher activity override onCreate and onNewIntent as given below.\n\n```kotlin\n\noverride fun onCreate(savedInstanceState: Bundle?) {\n    super.onCreate(savedInstanceState)\n    setContentView(R.layout.activity_test)\n    // ...\n    if (intent != null) {\n        onNewIntent(intent)\n    }\n    // ...\n}\n\noverride fun onNewIntent(intent: Intent?) {\n    super.onNewIntent(intent)\n    if (intent != null \u0026\u0026 intent.extras != null \u0026\u0026 intent.extras?.containsKey(\"verloop\") == true) {\n        val json = intent.extras?.getString(\"verloop\")\n        try {\n            val jsonObject = JSONObject(json)\n            if (jsonObject.has(\"client_id\")) {\n                var clientId = jsonObject.getString(\"client_id\")\n                if (clientId != null) {\n                    var config = VerloopConfig.Builder().clientId(clientId).build()\n                    Verloop(this, config).showChat()\n                }\n            }\n        } catch (e: JSONException) {\n            Log.e(TAG, e.message.toString())\n        }\n    }\n}\n\n\n```\n\n### Button click listener\n\nAt the time of having the conversation, bot shows button for faster replies. Button click listeners\ncan be added using:\n\n```kotlin\nconfig?.setButtonClickListener(object : LiveChatButtonClickListener {\n    override fun buttonClicked(title: String?, type: String?, payload: String?) {\n        // Add the app logic for button click\n    }\n})\n```\n\n### URL click listener\n\nIf the user clicks on any URL provided by the bot or by the agent, then you can listen to the URL\nand take the action in the app. Actions can be like re-routing based on the product link etc. URL\nclick listeners can be added using:\n`overrideUrlClick`: keep it as true if you want to handle the url internally in your app. Else keep\nit false if you want to open a browser when url is clicked.\n\n```kotlin\nconfig?.setUrlClickListener(object : LiveChatUrlClickListener {\n    override fun buttonClicked(url: String?) {\n        // Add the app logic for url click\n    }\n}, overrideUrlClick)\n```\n\n# User session management\n\nWhen the user logs out of your app, make sure to call\n\n```kotlin\nverloop.logout()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverloop%2Fandroid-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverloop%2Fandroid-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverloop%2Fandroid-sdk/lists"}