{"id":50531043,"url":"https://github.com/situmtech/cordova-mrm-safety","last_synced_at":"2026-06-03T13:31:15.493Z","repository":{"id":354225186,"uuid":"1211431455","full_name":"situmtech/cordova-mrm-safety","owner":"situmtech","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-27T16:37:22.000Z","size":37,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-27T18:31:21.298Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/situmtech.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-15T11:41:49.000Z","updated_at":"2026-04-16T12:15:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/situmtech/cordova-mrm-safety","commit_stats":null,"previous_names":["situmtech/cordova-mrm-safety"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/situmtech/cordova-mrm-safety","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/situmtech%2Fcordova-mrm-safety","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/situmtech%2Fcordova-mrm-safety/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/situmtech%2Fcordova-mrm-safety/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/situmtech%2Fcordova-mrm-safety/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/situmtech","download_url":"https://codeload.github.com/situmtech/cordova-mrm-safety/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/situmtech%2Fcordova-mrm-safety/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33867802,"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-06-03T02:00:06.370Z","response_time":59,"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":"2026-06-03T13:31:14.525Z","updated_at":"2026-06-03T13:31:15.487Z","avatar_url":"https://github.com/situmtech.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"233\" src=\"https://situm.com/wp-content/themes/situm/img/logo-situm.svg\" style=\"margin-bottom:1rem\" /\u003e\n  \u003ch1 align=\"center\"\u003e@situm/cordova-mrm-safety\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\" style=\"text-align:center\"\u003e\nSitum inertial safety module for Cordova. It provides Tap, Fall and Inactivity detection,\ndesigned to work together with active Situm positioning.\n\u003c/p\u003e\n\n\u003cdiv align=\"center\" style=\"text-align:center\"\u003e\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n![Cordova](https://img.shields.io/badge/Cordova-Android-blueviolet)\n![Latest version:](https://img.shields.io/npm/v/@situm/react-native/latest)\n\n\u003c/div\u003e\n\n## Getting Started\n\nThis plugin is intended to be integrated into a Cordova Android app together with `@situm/cordova`.\nThe basic setup is described below.\n\n## Running the example\n\nCheck the [example README](../example/README.md) to run a complete demo app using this plugin.\n\n## Requirements\n\n- Cordova CLI (`npm i -g cordova`)\n- Android platform added to the app (`cordova platform add android`)\n- Android SDK + JDK compatible with your Cordova setup\n- Situm Cordova plugin installed in host app: `@situm/cordova`\n\n## Install the plugin in a host Cordova app\n\nRun all commands from your host Cordova app root.\n\n1. Install Situm plugin:\n\n```bash\ncordova plugin add @situm/cordova\n```\n\n2. Install this plugin (Artifactory-backed dependency resolution):\n\n```bash\ncordova plugin add @situm/cordova-mrm-safety\n```\n\n3. Build Android:\n\n```bash\ncordova build android\n```\n\n## Minimal usage\n\nRecommended order: start Situm positioning first, then start inertial detectors.\n\n```js\ncordova.plugins.Situm.setUserPass(email, password);\ncordova.plugins.Situm.requestLocationUpdates({\n  buildingIdentifier: \"YOUR_BUILDING_ID\",\n});\n\nwindow.InertialEvents.onEvent((event) =\u003e {\n  // event.type: \"tap\" | \"fall\" | \"inactivity\" | \"error\"\n  // event.timestamp: epoch millis\n  console.log(\"Inertial event\", event);\n});\n\nwindow.InertialEvents.enableBackground();\n\nwindow.InertialEvents.startTap({ taps: 3, sensitivity: 8 });\nwindow.InertialEvents.startFall({ sensitivity: 0.5, lieTimeSec: 30 });\nwindow.InertialEvents.startInactivity({\n  sensitivity: 0.5,\n  idleTimeSec: 30,\n  ignoreHorizontal: true,\n});\n```\n\nTo stop:\n\n```js\nwindow.InertialEvents.stopTap();\nwindow.InertialEvents.stopFall();\nwindow.InertialEvents.stopInactivity();\nwindow.InertialEvents.stopAll();\ncordova.plugins.Situm.removeUpdates();\n```\n\n## Important behavior\n\nDetectors may be running, but inertial callbacks are emitted only while Situm positioning is running (`LocationManager.isRunning() == true`).\n\n## Background Mode\n\nTo continue detecting emergency events even when the app is in the background, the screen is off, or the app has been minimized, you must enable **Background Mode**.\n\n### What does Background Mode do?\n\nThis mode starts a **Foreground Service of type `health`**.\n\nForeground Services are designed to perform ongoing operations that the user should be aware of. They display a persistent notification, giving the service higher priority so it can reliably detect emergency events in the background.\n\n\u003e [!IMPORTANT]  \n\u003e This Foreground Service is used exclusively to detect potential emergencies that users may need to report, even when the app is not actively in use.\n\n### Permissions added automatically\n\nWhen you add this plugin, the following permissions will be automatically added to your `AndroidManifest.xml`:\n\n```xml\n\u003cuses-permission android:name=\"android.permission.HIGH_SAMPLING_RATE_SENSORS\" /\u003e\n\u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE\" /\u003e\n\u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE_HEALTH\" /\u003e\n```\n\nYou don't need to require in runtime the before mentioned permissions as they are granted at install time.\n\nEnable background inertial detection:\n\n```js\nwindow.InertialEvents.enableBackground();\n// then startTap/startFall/startInactivity\n```\n\nDisable background mode:\n\n```js\nwindow.InertialEvents.disableBackground();\n```\n\nNotes:\n\n- Android will show a persistent foreground notification.\n- If the app task is removed from recent apps, the service stops.\n\n## Troubleshooting\n\n1. No inertial events are received\n   - Verify Situm login succeeded and `requestLocationUpdates(...)` is active.\n\n2. Android permission errors\n   - Grant runtime location/BLE permissions.\n\n## Versioning\n\nThis package is uploaded to npm as @situm/cordova-mrm-safety. To upload a new version, first make sure to update the \"version\" parameter at the package.json of the plugin so npm detects is a new version. You can update the plugin version by executing the command:\n\n```bash\nnpm version patch # To upgrade the patch number of the version\n```\n\nThen, execute the following commands:\n\n```bash\nnpm login # Login with the mobile account\nnpm pack --dry-run # To check out what will be pushed before actually uploading a new version\nnpm publish\n```\n\n---\n\n## License\n\nThis project is licensed under the MIT license.\n\n---\n\n## More information\n\nMore info is available at our [Developers Page](https://situm.com/docs/01-introduction/).\n\n---\n\n## Support information\n\nFor any question or bug report, please send an email to [support@situm.com](mailto:support@situm.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitumtech%2Fcordova-mrm-safety","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsitumtech%2Fcordova-mrm-safety","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitumtech%2Fcordova-mrm-safety/lists"}