{"id":34791524,"url":"https://github.com/woosmap/geofencing-example-android","last_synced_at":"2026-05-27T14:05:49.468Z","repository":{"id":200930630,"uuid":"701297135","full_name":"Woosmap/geofencing-example-android","owner":"Woosmap","description":"Initial commit","archived":false,"fork":false,"pushed_at":"2023-11-28T15:23:07.000Z","size":177,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-12-26T21:14:40.186Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/Woosmap.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}},"created_at":"2023-10-06T10:50:31.000Z","updated_at":"2023-10-18T07:27:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"60eb4837-dee4-4dee-b756-7216a4fe43de","html_url":"https://github.com/Woosmap/geofencing-example-android","commit_stats":null,"previous_names":["woosmap/geofencing-example-android"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Woosmap/geofencing-example-android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Woosmap%2Fgeofencing-example-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Woosmap%2Fgeofencing-example-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Woosmap%2Fgeofencing-example-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Woosmap%2Fgeofencing-example-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Woosmap","download_url":"https://codeload.github.com/Woosmap/geofencing-example-android/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Woosmap%2Fgeofencing-example-android/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33568949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"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":"2025-12-25T10:00:07.463Z","updated_at":"2026-05-27T14:05:49.455Z","avatar_url":"https://github.com/Woosmap.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Woosmap Geofencing SDK Example for Android\n\nThe Woosmap Geofencing SDK is a mobile software development kit focused on gathering efficiently the users’ location, triggering events based on region monitoring, and providing categorized users’ zones of interest from geographical and temporal clusters.\n\nThe SDK simplifies the integration of the location context in your mobile application by taking care of lower-level functionalities such as data collection or battery management.\n\n## Documentation\n\nAll feature descriptions and guides to implement the Woosmap Geofencing Android SDK are available on the [Woosmap developers documentation](https://developers.woosmap.com/products/geofencing-sdk/get-started/).\n\n## Getting Started\n\n### Setup Your Account\n\nWhen you [sign up](https://www.woosmap.com/en/sign_up?utm_campaign=Woosmap+Sign-up\u0026utm_source=Developers-documentation) for a Woosmap account, you’ll enter your login/password and an email address, and we’ll send you an activation email.\n\nIn the activation email, click on the link to activate your account. Once you activate the account login to [Woosmap Console](https://console.woosmap.com/) and follow the steps below.\n\n* [Create An Organization](https://developers.woosmap.com/get-started/#create-an-organization)\n* [Create A Project And API Keys](https://developers.woosmap.com/get-started/#create-a-project-and-api-keys)\n* [Register a Woosmap Private API key](https://developers.woosmap.com/support/api-keys/#registering-a-woosmap-private-api-key)\n\n## Example\n\n### Load assets in the Woosmap platform and enable Store Search API\n\nIn this repository, a sample code is provided for testing quickly the Geofencing Android SDK. Once this code built, a sample app allows you to monitor Point of Interest (previously loaded in the Woosmap Platform). Before runing the example, each POI has to be created as an asset in the Woosmap Console and the Store Search API must be enabled:\n\n**Create an asset for each POI you want to monitor with a geofence**\n\u003cimg width=\"800\" alt=\"image\" src=\"https://github.com/Woosmap/geofencing-example-android/assets/79836861/c907d76b-b5e0-449b-8ac6-7a24d69dd6c3\"\u003e\n\n**Enable Woosmap Store Search API**\n\u003cimg width=\"800\" alt=\"image\" src=\"https://github.com/Woosmap/geofencing-example-android/assets/79836861/4f143c5f-d72f-4eb5-a828-7fe661d74f38\"\u003e\n\n### Run the sample app\n\nTo run the example, first clone this repository and replace the private key in `res/strings.xml` with your own private key. Make sure you have secured your private key.\n\nThe sample application has four components. \n\n* List of locations obtained from `LocationReadyCallback` callback of `LocationReadyListener`.\n\n* List of events obtained using `RegionLogReadyCallback` callback of `RegionLogReadyListener`.\n\n* A floating action button that starts and stops tracking.\n\n* A floating action button that clears all the data from local SQLite DB.\n\n\n\u003cimg src=\"https://github.com/Woosmap/geofencing-example-android/assets/1289966/e1f4c498-3088-4360-b5ef-c5eb2ae18850\"  width=\"300\"\u003e\n\n\u003cimg src=\"https://github.com/Woosmap/geofencing-example-android/assets/1289966/0326f979-9b35-45db-a50f-9dd97a418188\"  width=\"300\"\u003e\n\n\u003cimg src=\"https://github.com/Woosmap/geofencing-example-android/assets/1289966/9d52d21e-7b12-4874-a999-ce92a5fe3af3\"  width=\"300\"\u003e\n\n\n### Permissions\n\nSample app also shows how to request `ACCESS_COARSE_LOCATION` and `ACCESS_FINE_LOCATION` permissions. For optimal experience, it is also desired that the app has `ACCESS_BACKGROUND_LOCATION` permission granted. \n\nIf you wish to [track BLE beacons](https://developers.woosmap.com/products/geofencing-sdk/android-sdk/guides/monitor-beacons/) then it is advised that the Bluetooth permissions are granted as well. \n\nSince the sample app posts notifications when user location transitions between Geofence Regions, it is advised that the app should also request `POST_NOTIFICATIONS` permissions (Required only on Android 13 and above).\n\n### Fetching locations\n\nIn the sample app, a list of locations is populated using `LocationReadyCallback`. Whenever the SDK reports a new location, it is appended to the list. However, these locations are also stored in a local SQLite database. To fetch these locations you can use the following code.\n\n```kotlin\n// Get all positions\nval movingPositions = WoosmapDb.getInstance(\n            applicationContext\n        ).movingPositionsDao.getMovingPositions(-1)\n\n\n// Observe for only newly added locations\nval movingPositionList = WoosmapDb.getInstance(applicationContext).movingPositionsDao.getLiveDataMovingPositions(-1)\n\nmovingPositionList.observe(this) { movingPositions -\u003e\n    Log.d(\n        \"MyApplication\",\n        \"Newly obtained location length is ${movingPositions.size} \"\n    )\n}\n```\n\n### Fetching region logs\n\nSample app depends on `LocationReadyCallback` of `RegionLogReadyListener` interface to determine the entry and exit events of the Geofence regions. When user location  transitions inside a Geofence region, `LocationReadyCallback` is invoked along with an object of `RegionLog` which helps to determine if the region was entered or exited. The same callback is invoked when the user location moves outside a Geofence region. These transition logs (`RegionLogs`) are also stored in the local SQLite database. To fetch these `RegionLogs` use the following,\n\n```kotlin\n// Get all region logs\nval regionLogs = WoosmapDb.getInstance(applicationContext).regionLogsDAO.allRegionLogs\n\n// Observe newly added region logs\nval liveRegionLogs = WoosmapDb.getInstance(applicationContext).regionLogsDAO.allLiveRegionLogs\n\nliveRegionLogs.observe(\n    this\n) { regionLogs -\u003e\n    Log.d(\n        \"MyApplication\",\n        \"Newly added region log length is ${regionLogs.size}\"\n    )\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoosmap%2Fgeofencing-example-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoosmap%2Fgeofencing-example-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoosmap%2Fgeofencing-example-android/lists"}