{"id":21803354,"url":"https://github.com/cesarvaliente/geofencesdemobaseproject","last_synced_at":"2026-04-11T20:43:38.407Z","repository":{"id":141835863,"uuid":"13603956","full_name":"CesarValiente/GeofencesDemoBaseProject","owner":"CesarValiente","description":"This project must be used together the project GeofencesDemo, this is just the structure of the project, but it needs the main functions that are located in GeofencesDemo","archived":false,"fork":false,"pushed_at":"2013-10-16T09:51:44.000Z","size":648,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-28T21:45:36.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/CesarValiente.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}},"created_at":"2013-10-15T22:29:15.000Z","updated_at":"2014-10-20T00:24:44.000Z","dependencies_parsed_at":"2023-03-13T10:28:39.792Z","dependency_job_id":null,"html_url":"https://github.com/CesarValiente/GeofencesDemoBaseProject","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CesarValiente/GeofencesDemoBaseProject","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesarValiente%2FGeofencesDemoBaseProject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesarValiente%2FGeofencesDemoBaseProject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesarValiente%2FGeofencesDemoBaseProject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesarValiente%2FGeofencesDemoBaseProject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CesarValiente","download_url":"https://codeload.github.com/CesarValiente/GeofencesDemoBaseProject/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesarValiente%2FGeofencesDemoBaseProject/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274609465,"owners_count":25316621,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-11-27T11:41:46.717Z","updated_at":"2026-04-11T20:43:33.354Z","avatar_url":"https://github.com/CesarValiente.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"GeofencesDemoBaseProject\n========================\n\nThis project must be used together the project GeofencesDemo, this is just the structure of the project, but it needs the main functions that are located in GeofencesDemo.\n\nIn the demo we are going to follow the next steps, so the way to do it is just follow the order and copy and paste the functions from the project GeofencesDemo to this one (GeofencesDemoBaseProject).\n\n1- Add Google Play Services as a library.\n\n2- Add Geofence permission in your Androidmanifest:\n\n\t2.1 ACCESS_FINE_LOCATION\n\n3- Check that Google Services apk is installed, include in the MainActivity:\t \n\n\t 3.1 servicesConnected() \n\n\t 3.2 onActivityResult()\n\n\t 3.3 ErrorDialogFragment()\n\n4- Add the following whole classes in the package data:\n\n\t4.1 SimpleGeofence\n\n\t4.2 SimpleGeofenceStorage\n\n5- Add: \n\n\t5.1 createGeofences() in the MainActivity \n\n\t5.2 createRequestPendingIntent() in the GeofenceRequester\n\n6- In the GeofenceRequester:\n\nAdd geofences \n\n\t6.1 getLocationClient()\n\n\t6.2 addGeofences()\t\n\n\t6.3 requestConnection()\n\n\t6.4 onConnected()\n\t\nAdd the Geofence to the LocationListener:\n\n\t6.5 continueAddGeofences()\n\nCheck the result returned after add the Geofence:\n\n\t6.6 onAddGeofencesResult()\n\n7- ConnectionCallbacks in the GeofenceRequester, add:\n\n\t7.1 onDisconnected()\n\nHandle connection errors, add:\n\n\t7.2 onConnectionFailed()\n\n8- Add de package service, and inside of it the whole class:\n\n\t8.1 ReceiveTransitionIntentService\n\nAdd the service node to:\n\n\t8.2 AndroidManifest\n\n9- Remove geofences, same strategy than the addGeofences:\n\n\t9.1 removeGeofences() in the MainActivity\t\n\n\t9.2 getLocationClient() to GeofenceRemover, where we have an instance of this class\n\nThe rest is everything in the GeofenceRemover too:\n\nTwo different types of remove Geofences:\n\n\tBy a list:\n\n\t\t9.3 removeGeofencesById()\n\n\tBy intent:\n\n\t\t9.4 removeGeofencesByIntent()\n\nAdd: \n\n\t9.5 requestConnection() method used to connect to the LocationClient service.\t\t\n\nAdd:\n\n\t9.6 onConnected() which is the listener to continue with the removing action\n\nRemove geofences, sending a request to the LocationServices:\n\n\t9.7 continueRemoveGeofences()\n\nAdd the listeners after we have removed successfully the Geofences:\n\n\tBy list:\n\n\t\t9.8 onRemoveGeofencesByRequestIdsResult()\n\n\tBy intent:\n\n\t\t9.9 onRemoveGeofencesByPendingIntentResult()\n\nAdd handle error functions:\n\n\t9.10 onDisconnected()\n\n\t9.11 onConnectionFailed()\t\t\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesarvaliente%2Fgeofencesdemobaseproject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcesarvaliente%2Fgeofencesdemobaseproject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesarvaliente%2Fgeofencesdemobaseproject/lists"}