{"id":41198669,"url":"https://github.com/khushpanchal/rvtimetracker","last_synced_at":"2026-01-22T20:39:38.763Z","repository":{"id":197039345,"uuid":"697863077","full_name":"khushpanchal/RVTimeTracker","owner":"khushpanchal","description":"RVTimeTracker - RecyclerView Time Tracker, a finely crafted library designed to accurately calculate viewing time for each item in RecyclerView.","archived":false,"fork":false,"pushed_at":"2024-01-25T23:04:24.000Z","size":191,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-28T19:07:28.689Z","etag":null,"topics":["analytics","android","kotlin","recyclerview","timetracker","tracker","tracking"],"latest_commit_sha":null,"homepage":"","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/khushpanchal.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}},"created_at":"2023-09-28T16:15:12.000Z","updated_at":"2024-01-11T01:27:23.000Z","dependencies_parsed_at":"2023-10-05T05:18:12.814Z","dependency_job_id":"3b880a5a-869c-43b6-8183-df03f285c578","html_url":"https://github.com/khushpanchal/RVTimeTracker","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"33ddbaa326da1a99b341ecf6ffafc6f376331d5a"},"previous_names":["khushpanchal/rvtimetracker"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/khushpanchal/RVTimeTracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khushpanchal%2FRVTimeTracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khushpanchal%2FRVTimeTracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khushpanchal%2FRVTimeTracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khushpanchal%2FRVTimeTracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khushpanchal","download_url":"https://codeload.github.com/khushpanchal/RVTimeTracker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khushpanchal%2FRVTimeTracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28670520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T19:36:09.361Z","status":"ssl_error","status_checked_at":"2026-01-22T19:36:05.567Z","response_time":144,"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":["analytics","android","kotlin","recyclerview","timetracker","tracker","tracking"],"created_at":"2026-01-22T20:39:38.106Z","updated_at":"2026-01-22T20:39:38.755Z","avatar_url":"https://github.com/khushpanchal.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://jitpack.io/v/khushpanchal/RVTimeTracker.svg)](https://jitpack.io/#khushpanchal/RVTimeTracker)\n\n\u003cimg src=https://github.com/khushpanchal/RVTimeTracker/blob/master/assets/RVTimeTracker.jpg \u003e\n\n# RVTimeTracker -  RecyclerView Time Tracker\n\nRVTimeTracker (RecyclerView Time Tracker) is an Android library designed to precisely track the time spent by users viewing items in a RecyclerView. Whether you're building an app that needs detailed insights into user interactions or simply want to optimize the user experience, RVTimeTracker has you covered.\n\n## Installation\n\nTo integrate RecyclerView Time Tracker library into your Android project, follow these simple steps:\n\n1. Update your settings.gradle file with the following dependency.\n   \n```Groovy\ndependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        google()\n        mavenCentral()\n        maven { url 'https://jitpack.io' } // this one\n    }\n}\n```\n\n2. Update your module level build.gradle file with the following dependency.\n   \n```Groovy\ndependencies {\n        implementation 'com.github.khushpanchal:RVTimeTracker:1.0.1'\n}\n```\n\n## Usage\n\nInitialization:\n\nInitializing RVTimeTracker is a breeze:\n\n```Kotlin\n// Initialize the RecyclerView Time Tracker library in your activity or fragment\nRVTimeTracker.init(\n    recyclerView = binding.recyclerView, // The RecyclerView to be tracked for item view times.\n    minTimeInMs = 1000, // (optional, default = 0): Minimum time in milliseconds a view needs to be visible to be tracked. Value should be greater than 0\n    minHeightInRatio = 0.45, // (optional, default = 0.5): Minimum height ratio a view should have to be tracked. Value should be between 0 and 1\n    minWidthInRatio = 0.45, // (optional, default = 0.5): Minimum width ratio a view should have to be tracked. Value should be between 0 and 1\n    dataLimit = 8, // (optional, default = 10): Number of data after which \"trackAll\" lambda block will be invoked with the list of tracked data.\n    trackItem = { trackInfo -\u003e // Lambda function to be executed when any item moves out of the visible screen. (Contain TrackInfo)\n        Log.i(\"TrackData\", trackInfo.toString())\n    },\n    trackAll = { trackInfoList -\u003e // Lambda function to be executed when the dataLimit is reached or after onStop lifecycle method of the RecyclerView context is called. (Contains List\u003cTrackInfo\u003e)\n        for (item in trackInfoList) {\n            Log.i(\"TrackDataAll\", item.toString())\n        }\n    }\n)\n```\n\nRVTimeTracker provides valuable data in the form of TrackInfo, including view tags(passed by client), item position, and view duration, to gain deep insights into user interactions.\nLibrary will give the following class instance at each callback\n\n```Kotlin\ndata class TrackInfo(\n      val viewTag: String, // used as key for storing tracking info. Can be used to pass meta data that can be retired at client side\n      val itemPosition: Int, // position of item being tracked\n      val viewDuration: Long // Time spent in millisecond on each item being tracked\n)\n```\n\n## Important Note\n\nFor seamless tracking, it's essential to use a unique view tag for each view inside `onBindViewHolder`. The view tag acts as a key to store tracking information. For example, if you're displaying a list of names in your RecyclerView, ensure that each item has a unique view tag. RVTimeTracker will throw `IllegalArgumentException` if view does not contain view tag.\n\nFor example: Recycler view showing list of names, then:\n\n```Kotlin\ndata class Name(val id: String, val name: String)\n\nval itemList = listOf(\n    Name(\"John\", UUID.randomUUID().toString()),\n    Name(\"Jane\", UUID.randomUUID().toString()),\n    Name(\"Alice\", UUID.randomUUID().toString()),\n    // Add more data items...\n)\n```\n\nInside `onBindViewHolder`:\n\n```Kotlin\noverride fun onBindViewHolder(holder: YourViewHolder, position: Int) {\n    val item = itemList[position]\n    // Set the unique view tag for each item\n    holder.itemView.tag = item.id\n    // Bind other views...\n}\n```\n\n## Sample Logs\n\n\u003cimg src=https://github.com/khushpanchal/RVTimeTracker/blob/master/assets/RVTimeTracker_Visual.jpg \u003e\n\nCheck out these sample logs to see the kind of insights you can gain with RVTimeTracker (RecyclerView Time Tracker):\n\n```\nTrackInfo(viewTag=d73bbb42-c43b-4c5c-9b2b-7e9fb7c6f66b, itemPosition=0, viewDuration=30448)\nTrackInfo(viewTag=e9c758ff-4eae-423a-afa0-3dd7b18e4e2a, itemPosition=1, viewDuration=54317)\nTrackInfo(viewTag=571a4cb8-0b54-4f5a-bfd1-f98444c97049, itemPosition=2, viewDuration=55322)\n```\n\n## Blog\n\nCheck out the blog: https://medium.com/@khush.panchal123/introducing-rvtimetracker-recyclerview-time-tracker-ad9cae2940f9\n\n## Contribution\n\nEnhance your app's user experience and gain insights into user interactions with RVTimeTracker.\nIf you have feedback, want to report an issue, or contribute to RVTimeTracker, head over to [GitHub repository](https://github.com/khushpanchal/RVTimeTracker/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhushpanchal%2Frvtimetracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhushpanchal%2Frvtimetracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhushpanchal%2Frvtimetracker/lists"}