{"id":15110398,"url":"https://github.com/android/codelab-activity_transitionapi","last_synced_at":"2026-04-22T08:01:22.873Z","repository":{"id":43291051,"uuid":"132642674","full_name":"android/codelab-activity_transitionapi","owner":"android","description":"Codelab walks you through tracking activity transition changes (start/stop run, walk, idle, drive, etc.).","archived":false,"fork":false,"pushed_at":"2026-03-14T14:26:43.000Z","size":23746,"stargazers_count":25,"open_issues_count":13,"forks_count":9,"subscribers_count":37,"default_branch":"master","last_synced_at":"2026-04-21T03:54:32.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/android.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-08T17:29:26.000Z","updated_at":"2026-04-18T18:26:57.000Z","dependencies_parsed_at":"2022-07-22T05:32:09.359Z","dependency_job_id":null,"html_url":"https://github.com/android/codelab-activity_transitionapi","commit_stats":null,"previous_names":["android/codelab-activity_transitionapi","googlecodelabs/activity_transitionapi-codelab"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/android/codelab-activity_transitionapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android%2Fcodelab-activity_transitionapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android%2Fcodelab-activity_transitionapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android%2Fcodelab-activity_transitionapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android%2Fcodelab-activity_transitionapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/android","download_url":"https://codeload.github.com/android/codelab-activity_transitionapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android%2Fcodelab-activity_transitionapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32126709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T07:37:52.372Z","status":"ssl_error","status_checked_at":"2026-04-22T07:37:51.635Z","response_time":58,"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":[],"created_at":"2024-09-25T23:44:43.901Z","updated_at":"2026-04-22T08:01:22.834Z","avatar_url":"https://github.com/android.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Detecting User Activity changes using Activity Recognition Transition API\n=========================================================================\nThe codelab can be found [here](https://codelabs.developers.google.com/codelabs/activity-recognition-transition/index.html?index=..%2F..index#6).\n\nWe carry phones with us everywhere, but until now, it's been hard for apps to adjust their\nexperience to a user's continually changing environment and activity.\n\nTo do this in the past, developers spent valuable engineering time combining various signals\n(location,sensor, etc.) to determine when an activity like walking or driving had started or ended.\nEven worse, when apps are independently and continuously checking for changes in user activity,\nbattery life suffers.\n\nThe Activity Recognition Transition API solves these problems by providing a simple API that does\nall the processing for you and just tells you what you actually care about: when a user's activity\nhas changed. Your app simply subscribes to a transition in activities you are  interested in and the\nAPI notifies you of the changes\n\nAs an example, a messaging app can ask, \"tell me when the user has entered or exited a vehicle\", to\nset the user's status as busy. Similarly, a parking detection app can ask,\"tell me when the user has\nexited a vehicle and started walking\", to save the user's parking location.\n\nIn this codelab, you will learn how to use the Activity Recognition Transition API to determine when\na user starts/stop an activity like walking or running.\n\n\nPre-requisites\n--------------\nAndroid API Level \u003e v14\nAndroid Build Tools \u003e v21\nGoogle Support Repository\n\nAndroid Studio 3.5 or later to run the code\nA device/emulator running on Oreo or later (this codelab targets Android 10)\n\nFamiliarity with Android development and some familiarity with callbacks.\n\n\nGetting Started\n---------------\nVisit the [codelab here](https://github.com/googlecodelabs/activity_transitionapi-codelab). Feel\nfree to look at the complete module to see how the final code works.\n\n\nSupport\n-------\n\nPatches are encouraged, and may be submitted by forking this project and submitting a pull request\nthrough GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid%2Fcodelab-activity_transitionapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandroid%2Fcodelab-activity_transitionapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid%2Fcodelab-activity_transitionapi/lists"}