{"id":46469544,"url":"https://github.com/setgreet/setgreet-android-sdk","last_synced_at":"2026-03-06T06:03:48.498Z","repository":{"id":280904728,"uuid":"938952707","full_name":"setgreet/setgreet-android-sdk","owner":"setgreet","description":"Setgreet SDK for Android — Add no-code in-app flows (onboarding, surveys, announcements) to your Kotlin/Java app. Publish instantly, no Play Store update needed.","archived":false,"fork":false,"pushed_at":"2026-03-04T00:52:13.000Z","size":126,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-04T03:51:37.920Z","etag":null,"topics":["android","android-sdk","feature-announcement","gradle","growth","in-app-experiences","in-app-messaging","jetpack-compose","kotlin","mobile-onboarding","mobile-sdk","monetization","no-code","nps-survey","onboarding","sdk","setgreet","user-engagement","user-onboarding"],"latest_commit_sha":null,"homepage":"https://setgreet.com","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/setgreet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-02-25T18:56:41.000Z","updated_at":"2026-03-04T00:52:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"ea2f7ba6-40ba-4259-b247-371826c759f9","html_url":"https://github.com/setgreet/setgreet-android-sdk","commit_stats":null,"previous_names":["setgreet/setgreet-android-sdk"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/setgreet/setgreet-android-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setgreet%2Fsetgreet-android-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setgreet%2Fsetgreet-android-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setgreet%2Fsetgreet-android-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setgreet%2Fsetgreet-android-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/setgreet","download_url":"https://codeload.github.com/setgreet/setgreet-android-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setgreet%2Fsetgreet-android-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30164532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T04:43:31.446Z","status":"ssl_error","status_checked_at":"2026-03-06T04:40:30.133Z","response_time":250,"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":["android","android-sdk","feature-announcement","gradle","growth","in-app-experiences","in-app-messaging","jetpack-compose","kotlin","mobile-onboarding","mobile-sdk","monetization","no-code","nps-survey","onboarding","sdk","setgreet","user-engagement","user-onboarding"],"created_at":"2026-03-06T06:03:28.702Z","updated_at":"2026-03-06T06:03:47.908Z","avatar_url":"https://github.com/setgreet.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Setgreet Android SDK\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.setgreet/setgreet.svg?label=maven%20central)](#)\n\nSetgreet Android SDK allows you to show Setgreet flows in your Android app.\n\n## Requirements\n\n- Android 6.0 (API level 23) and above\n\n## Installation\n\nAdd mavenCentral() to your project's build.gradle.kts file:\n\n```gradle.kts\nallprojects {\n    repositories {\n        mavenCentral()\n    }\n}\n```\n\nAdd the following to your app's build.gradle.kts file:\n\n```gradle.kts\ndependencies {\n    implementation(\"com.setgreet:setgreet:LATEST_VERSION\")\n}\n```\n\n## Usage\n\n### Initialization\n\n- Setgreet App Key: You can find your App Key at [Apps page](https://app.setgreet.com/apps).\n\nInitialize the SDK in your Application class or where you want:\n\n```kotlin\nclass MyApplication : Application() {\n\n    override fun onCreate() {\n        super.onCreate()\n\n        Setgreet.initialize(\n            context = this,\n            appKey = \"APP_KEY\",\n            config = SetgreetConfig(\n                debugMode = false\n            )\n        )\n    }\n}\n```\n\n### Identify User\n\nIdentifies a user for Setgreet analytics and flow management.\n\n**Parameters:**\n\n- `userId` (String): The unique identifier for the user\n- `attributes` (Optional): Additional user attributes\n- `operation` (Optional): The operation type for user attributes (CREATE or UPDATE)\n- `locale` (Optional): User's locale (e.g., \"en-US\"). If not provided, uses device's default locale\n\n**Example:**\n\n```kotlin\nSetgreet.identifyUser(\n    userId = \"user123\",\n    attributes = mapOf(\n        \"name\" to \"John Doe\",\n        \"email\" to \"john@example.com\",\n        \"plan\" to \"premium\"\n    ),\n    operation = Operation.CREATE,\n    locale = \"en-US\"\n)\n```\n\n### Reset User\n\nClears user identification data and resets user session state for logout scenarios. A new anonymous ID is generated after reset.\n\n**Example:**\n\n```kotlin\nSetgreet.resetUser()\n```\n\n### Anonymous ID\n\nThe SDK automatically generates an anonymous ID on initialization, which persists across app launches. When `identifyUser` is called, the anonymous identity is merged with the identified user. A new anonymous ID is generated when `resetUser()` is called.\n\n```kotlin\nval anonId = Setgreet.anonymousId\n```\n\n### Show Flow\n\n- Setgreet Flow ID: The flow ID is a unique identifier for the flow you want to show. You can get the flow ID from the flow's URL at the web app. For example, if the flow URL is `https://app.setgreet.com/flows/1234`, the flow ID is `1234`.\n\nTo show the Setgreet flow, call the following method:\n\n```kotlin\nSetgreet.showFlow(flowId = \"FLOW_ID\")\n```\n\n### Track Screen\n\nTracks a screen view for analytics and potential flow triggers.\n\n**Parameters:**\n\n- `screenName` (String): The name of the screen being viewed\n- `properties` (Optional): Additional properties associated with the screen view\n\n**Example:**\n\n```kotlin\nSetgreet.trackScreen(\n    screenName = \"product_detail\",\n    properties = mapOf(\n        \"product_id\" to \"prod_123\",\n        \"category\" to \"electronics\",\n        \"price\" to 299.99\n    )\n)\n```\n\n### Track Event\n\nTracks custom events for analytics and flow triggers.\n\n**Parameters:**\n\n- `eventName` (String): The name of the custom event\n- `properties` (Optional): Additional properties associated with the event\n\n**Example:**\n\n```kotlin\nSetgreet.trackEvent(\n    eventName = \"purchase_completed\",\n    properties = mapOf(\n        \"order_id\" to \"ord_456\",\n        \"total_amount\" to 299.99,\n        \"payment_method\" to \"credit_card\",\n        \"items_count\" to 3\n    )\n)\n```\n\n## Flow Callbacks\n\nListen to flow lifecycle events to track user interactions and flow completion.\n\n**Available Callbacks:**\n\n- `onFlowStarted`: Called when a flow begins displaying\n- `onFlowCompleted`: Called when user completes all screens in the flow\n- `onFlowDismissed`: Called when user dismisses the flow before completion\n- `onScreenChanged`: Called when user navigates between screens\n- `onActionTriggered`: Called when user interacts with buttons\n- `onPermissionRequested`: Called when a permission request completes\n- `onError`: Called when an error occurs during flow operations\n\n**Example:**\n\n```kotlin\nSetgreet.setFlowCallbacks {\n    onFlowStarted { event -\u003e\n        Log.d(\"Setgreet\", \"Flow ${event.flowId} started with ${event.screenCount} screens\")\n    }\n\n    onFlowCompleted { event -\u003e\n        Log.d(\"Setgreet\", \"Flow completed: ${event.flowId}, duration: ${event.durationMs}ms\")\n    }\n\n    onFlowDismissed { event -\u003e\n        Log.d(\"Setgreet\", \"Flow dismissed: ${event.reason} at screen ${event.screenIndex + 1}\")\n    }\n\n    onScreenChanged { event -\u003e\n        Log.d(\"Setgreet\", \"Screen changed: ${event.fromIndex + 1} -\u003e ${event.toIndex + 1}\")\n    }\n\n    onActionTriggered { event -\u003e\n        Log.d(\"Setgreet\", \"Action: ${event.actionType}\")\n        event.actionName?.let { customEvent -\u003e\n            Log.d(\"Setgreet\", \"Custom event name: $customEvent\")\n        }\n    }\n\n    onPermissionRequested { event -\u003e\n        Log.d(\"Setgreet\", \"Permission ${event.permissionType}: ${event.result}\")\n    }\n\n    onError { event -\u003e\n        Log.e(\"Setgreet\", \"Error: ${event.errorType} - ${event.message}\")\n    }\n}\n```\n\n### Event Types\n\n| Event | Description | Key Properties |\n| ----- | ----------- | -------------- |\n| `FlowStarted` | Flow begins presenting | `flowId`, `screenCount` |\n| `FlowCompleted` | User completes the flow | `flowId`, `durationMs` |\n| `FlowDismissed` | Flow dismissed before completion | `flowId`, `reason`, `screenIndex` |\n| `ScreenChanged` | User navigates between screens | `fromIndex`, `toIndex` |\n| `ActionTriggered` | Button action triggered | `actionType`, `actionName` |\n| `PermissionRequested` | Permission request completed | `permissionType`, `result` |\n| `FlowError` | Error during flow operations | `errorType`, `message` |\n\n### Dismiss Reasons\n\n| Reason | Description |\n| ------ | ----------- |\n| `USER_CLOSE` | User tapped the close button |\n| `USER_SKIP` | User tapped the skip button |\n| `BACK_PRESS` | User pressed the back button |\n| `SWIPE_DOWN` | User swiped down to dismiss |\n| `REPLACED` | Flow was replaced by another flow |\n| `PROGRAMMATIC` | Flow was closed programmatically |\n| `COMPLETED` | Flow reached its end node |\n\n### Action Types\n\n| Action | Description |\n| ------ | ----------- |\n| `NEXT` | Navigate to next screen |\n| `PREVIOUS` | Navigate to previous screen |\n| `SKIP` | Skip the current screen |\n| `DISMISS` | Close/dismiss the flow |\n| `URL` | Open a URL |\n| `REQUEST_NOTIFICATION_PERMISSION` | Request notification permission |\n| `REQUEST_LOCATION_PERMISSION` | Request location permission |\n| `REQUEST_CAMERA_PERMISSION` | Request camera permission |\n| `REQUEST_REVIEW` | Request Play Store review |\n| `SHARE` | Open share sheet |\n| `OPEN_SETTINGS` | Open app settings |\n\n### Permission Types\n\n| Type | Description |\n| ---- | ----------- |\n| `notification` | Push notification permission |\n| `location` | Location access permission |\n| `camera` | Camera access permission |\n\n### Permission Results\n\n| Result | Description |\n| ------ | ----------- |\n| `granted` | Permission was granted by the user |\n| `denied` | Permission was denied by the user |\n| `permanently_denied` | Permission was permanently denied |\n| `already_granted` | Permission was already granted |\n| `not_required` | Permission request was not required |\n\n## Configuration\n\n### SetgreetConfig\n\n```kotlin\nSetgreetConfig(\n    debugMode = false,          // Enable debug logging\n)\n```\n\n### Operation Types\n\n- `Operation.CREATE`: Create a new user record\n- `Operation.UPDATE`: Update an existing user record\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetgreet%2Fsetgreet-android-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsetgreet%2Fsetgreet-android-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetgreet%2Fsetgreet-android-sdk/lists"}