{"id":29087727,"url":"https://github.com/kartiknagar333/chicagoctabustracker","last_synced_at":"2026-05-02T05:03:21.964Z","repository":{"id":288756408,"uuid":"968338008","full_name":"kartiknagar333/ChicagoCTABusTracker","owner":"kartiknagar333","description":"An Android app to track CTA buses in real-time, providing bus routes, stops, and arrival predictions using the CTA Bus Tracker API.","archived":false,"fork":false,"pushed_at":"2025-06-26T13:31:32.000Z","size":296,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T14:32:44.208Z","etag":null,"topics":["admob","android-app","api","cta-api","java","location-services","synchronized-methods","ui-ux-design","unityads","volley-library","xml"],"latest_commit_sha":null,"homepage":"","language":"Java","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/kartiknagar333.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}},"created_at":"2025-04-17T23:05:08.000Z","updated_at":"2025-06-26T13:31:35.000Z","dependencies_parsed_at":"2025-04-21T08:16:16.868Z","dependency_job_id":null,"html_url":"https://github.com/kartiknagar333/ChicagoCTABusTracker","commit_stats":null,"previous_names":["kartiknagar333/chicagoctabustracker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kartiknagar333/ChicagoCTABusTracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartiknagar333%2FChicagoCTABusTracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartiknagar333%2FChicagoCTABusTracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartiknagar333%2FChicagoCTABusTracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartiknagar333%2FChicagoCTABusTracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kartiknagar333","download_url":"https://codeload.github.com/kartiknagar333/ChicagoCTABusTracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartiknagar333%2FChicagoCTABusTracker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262362084,"owners_count":23299126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["admob","android-app","api","cta-api","java","location-services","synchronized-methods","ui-ux-design","unityads","volley-library","xml"],"created_at":"2025-06-28T02:06:18.661Z","updated_at":"2026-05-02T05:03:21.882Z","avatar_url":"https://github.com/kartiknagar333.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChicagoCTABusTracker\n\nThis app allows users to track CTA buses in real-time, providing information about routes, stops, and bus arrival predictions. It integrates the CTA Bus Tracker API to provide up-to-date bus data and utilizes several modern Android features for enhanced functionality.\n\n## App Highlights\n\n- **SplashScreen API**: Displays a splash screen while data is being loaded.\n- **Location Services**: Determines the user's location and displays nearby bus stops within 1000m.\n- **Ad Integration**: Displays banner ads in each activity using **AdMob** or **Unity Ads**.\n- **Data Caching**: Caches route, direction, and stop data for 24 hours for performance optimization.\n- **Real-Time Bus Predictions**: Shows predicted bus arrival times for selected stops.\n- **Custom Alerts**: Displays customer service alerts for routes and directions (Extra Credit feature).\n\n## Features\n\n### MainActivity\n- Displays all CTA bus routes.\n- A **search field** filters the route list based on entered text.\n- Tapping on a route shows available directions and stops within 1000m of the user’s location.\n\n### StopsActivity\n- Displays stops for the selected route and direction within 1000m of the user's location.\n- Selecting a stop opens **PredictionsActivity**, showing predicted bus arrivals.\n\n### PredictionsActivity\n- Displays predicted bus arrival times for the selected stop.\n- Swiping down in the PredictionsActivity refreshes bus arrival data.\n- Tapping on a prediction shows the distance and time from the selected stop.\n\n## API Integration\n\nThe app retrieves data from the [CTA Bus Tracker API](https://www.transitchicago.com/developers/bustracker/). The following endpoints are used:\n\n- **Routes**: [Retrieve routes](http://www.ctabustracker.com/bustime/api/v2/getroutes)\n- **Route Directions**: [Retrieve directions](http://www.ctabustracker.com/bustime/api/v2/getdirections)\n- **Stops**: [Retrieve stops](http://www.ctabustracker.com/bustime/api/v2/getstops)\n- **Predictions**: [Retrieve predictions](http://www.ctabustracker.com/bustime/api/v2/getpredictions)\n- **Vehicles**: [Retrieve vehicle info](http://www.ctabustracker.com/bustime/api/v2/getvehicles)\n\n### API Endpoints:\n- **`getroutes`**: Retrieves a list of routes in the CTA system.\n- **`getdirections`**: Retrieves available directions for a specific route.\n- **`getstops`**: Retrieves bus stops for a specific route and direction.\n- **`getpredictions`**: Retrieves predictions for a specific stop or vehicle.\n- **`getvehicles`**: Retrieves current vehicle information for a specific bus.\n\n## Distance Calculation\n\nThe app uses the **location services** to get the user's current location and calculate the distance to each bus stop. Only stops within **1000 meters (1 km)** of the user’s location are displayed. The distance is calculated using the **Haversine formula** or the `Location.distanceTo()` method.\n\n## Setup\n- Obtain an API key from [CTA Bus](https://www.ctabustracker.com/account)  Tracker.\n- Add your API key to the app's [configuration](app/build.gradle.kts).\n  \n```java\n....\n buildTypes {\n        debug {\n            buildConfigField(\"String\", \"API_KEY\", \"\\\"Your API KEY\\\"\")\n        }\n....\n```\n\n## Download APK for Testing\nYou can download the APK file for testing from the release below:\n- [Download v1.0 Testing APK](https://github.com/kartiknagar333/ChicagoCTABusTracker/releases/tag/v1.0)\n\u003cbr\u003e  \n\n## Screenshots\n- **MainActivity**\n  \u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/b3a401ee-17cd-4eca-b499-c9fd78eb52a0\" alt=\"Home\" width=\"336\" height=\"748\" /\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n- **StopsActivity**\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/97ef62f7-ec69-4910-b9f0-a70767abf663\" alt=\"Home\" width=\"336\" height=\"748\"/\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n- **PredictionsActivity**\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/7381c262-8c30-42be-8f62-c8bb896244aa\" alt=\"Home\" width=\"336\" height=\"748\" hspace = \"10px\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/52760460-d068-4bce-9924-968ba777c867\" alt=\"Home\" width=\"336\" height=\"748\" hspace = \"10px\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/a55fe957-fcd7-446e-ac95-74812f9d08af\" alt=\"Home\" width=\"336\" height=\"748\" /\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartiknagar333%2Fchicagoctabustracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkartiknagar333%2Fchicagoctabustracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartiknagar333%2Fchicagoctabustracker/lists"}