{"id":13848796,"url":"https://github.com/tbouron/ShakeDetector","last_synced_at":"2025-07-12T13:32:36.880Z","repository":{"id":15211133,"uuid":"17939561","full_name":"tbouron/ShakeDetector","owner":"tbouron","description":"This library provides a easy way to detect a shake movement using the build-in accelerometer and fire a callback on the UI thread every times it happens.","archived":false,"fork":false,"pushed_at":"2018-08-29T19:18:47.000Z","size":665,"stargazers_count":254,"open_issues_count":1,"forks_count":53,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-07-01T10:56:24.682Z","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/tbouron.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":"2014-03-20T11:08:47.000Z","updated_at":"2023-11-03T06:10:00.000Z","dependencies_parsed_at":"2022-08-28T17:20:35.107Z","dependency_job_id":null,"html_url":"https://github.com/tbouron/ShakeDetector","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbouron%2FShakeDetector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbouron%2FShakeDetector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbouron%2FShakeDetector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbouron%2FShakeDetector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbouron","download_url":"https://codeload.github.com/tbouron/ShakeDetector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213949807,"owners_count":15661676,"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":[],"created_at":"2024-08-04T19:00:57.941Z","updated_at":"2024-08-04T19:03:23.766Z","avatar_url":"https://github.com/tbouron.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"Shake Detector library for Android (ShakeDetector)\n========\n\nThis library provides a easy way to detect a shake movement using the build-in accelerometer and fire\na callback on the UI thread every times it happens.\n\nUsage\n=======\n\nShake Detector library is pushed to Maven Central as an AAR, so you just need to add the following dependency to your `build.gradle`\n\n    dependencies {\n        implementation 'com.github.tbouron.shakedetector:library:1.0.0@aar'\n    }\n\nThe API is designed to follow closely an activity or fragment lifecycle. Here is an example of how\nto use it within an activity\n\n    public class myActivity extends Activity {\n        @Override\n        protected void onCreate(Bundle savedInstanceState) {\n            super.onCreate(savedInstanceState);\n            setContentView(R.layout.my_activity);\n\n            ShakeDetector.create(this, new OnShakeListener() {\n                @Override\n                public void OnShake() {\n                    Toast.makeText(getApplicationContext(), \"Device shaken!\", Toast.LENGTH_SHORT).show();\n                }\n            });\n        }\n\n        @Override\n        protected void onResume() {\n            super.onResume();\n            ShakeDetector.start();\n        }\n\n        @Override\n        protected void onStop() {\n            super.onStop();\n            ShakeDetector.stop();\n        }\n\n        @Override\n        protected void onDestroy() {\n            super.onDestroy();\n            ShakeDetector.destroy();\n        }\n    }\n\nYou can also change the default configuration by using the following method:\n\n    ShakeDetector.updateConfiguration(float sensibility, int numberOfShake);\n\nFor more information, please check out [the source code of the example app on Github](https://github.com/tbouron/ShakeDetector/blob/master/example/src/main/java/com/github/tbouron/shakedetector/example/MainActivity.java)\n\nExample app\n=======\n\nYou can test the library through **[example app published on Google Play](https://play.google.com/store/apps/details?id=com.github.tbouron.shakedetector.example)**\n\n\u003cimg src=\"https://raw.githubusercontent.com/tbouron/ShakeDetector/master/art/screenshots/en/device-2014-03-21-095736.png\" width=\"150\" hspace=\"20\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/tbouron/ShakeDetector/master/art/screenshots/en/device-2014-03-21-095822.png\" width=\"150\" hspace=\"20\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/tbouron/ShakeDetector/master/art/screenshots/en/device-2014-03-21-095850.png\" width=\"150\" hspace=\"20\"\u003e\n\nAuthor\n=======\n\nThomas Bouron - [tbouron@gmail.com](mailto:tbouron@gmail.com) - [Google+](https://plus.google.com/u/0/104567775398355774153/posts)\n\nLicense\n=======\n\n    Copyright 2014 Thomas Bouron.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbouron%2FShakeDetector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbouron%2FShakeDetector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbouron%2FShakeDetector/lists"}