WatchShaker
Experimental Shake Gesture Detection API for Apple Watch
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 5 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.1%) to scientific vocabulary
Keywords
Repository
Experimental Shake Gesture Detection API for Apple Watch
Basic Info
- Host: GitHub
- Owner: ezefranca
- License: mit
- Language: Swift
- Default Branch: main
- Homepage: https://cs.paperswithcode.com/paper/experimental-shake-gesture-detection-api-for#code
- Size: 3 MB
Statistics
- Stars: 240
- Watchers: 9
- Forks: 22
- Open Issues: 2
- Releases: 11
Topics
Metadata Files
README.md
WatchShaker
Simple motion detector for ⌚️ (watchOS) shake gesture.
WatchShaker is a watchOS helper to get your ⌚️ shake movements
This project was presented at ICECCME 2024. The work is available at IEEE Xplore. You can also find a preprint on Papers with Code.
Requirements
- watchOS 7.0+
- Xcode 15.0+
Installation
Swift Package Manager
Once you have your Swift package set up, adding WatchShaker as a dependency is as easy as adding it to the dependencies value of your Package.swift.
swift
dependencies: [
.package(url: "https://github.com/ezefranca/WatchShaker.git")
]
Manually
- Download and drop
WatchShakerfolder in your project to your watch target. - Congratulations!
Usage example
@StateObject style
```swift import SwiftUI import WatchShaker
struct ContentView: View {
@StateObject var shaker:WatchShaker = WatchShaker(shakeSensibility: .shakeSensibilityNormal, delay: 0.2)
var body: some View {
VStack {
if shaker.isShakerAvailable {
Text("I'm shook! ⌚️⌚️⌚️")
Text("\(shaker.shake.sensibility)")
Text("\(shaker.shake.direction)")
}
}
}
} ```
Closure Style
```swift import WatchKit import Foundation import WatchShaker
class InterfaceController: WKInterfaceController {
var shaker:WatchShaker = WatchShaker(shakeSensibility: .shakeSensibilityNormal, delay: 0.2)
override func awake(withContext context: Any?) {
super.awake(withContext: context)
}
override func willActivate() {
super.willActivate()
shaker.start()
shaker.startWatchShakerUpdates = { shakeSensibility, error in
guard error == nil else
{
print(error?.localizedDescription)
return
}
print("I'm shook! ⌚️⌚️⌚️")
}
}
override func didDeactivate() {
super.didDeactivate()
shaker.stop()
}
} ```
Delegate Style
```swift import WatchKit import Foundation
class InterfaceController: WKInterfaceController {
override func awake(withContext context: Any?) {
super.awake(withContext: context)
// Configure interface objects here.
}
var shaker:WatchShaker = WatchShaker(shakeSensibility: .shakeSensibilityNormal, delay: 0.2)
override func willActivate() {
super.willActivate()
shaker.delegate = self
shaker.start()
}
override func didDeactivate() {
super.didDeactivate()
shaker.stop()
}
}
extension InterfaceController: WatchShakerDelegate { func watchShaker(_ watchShaker: WatchShaker, didShakeWith sensibility: ShakeSensibility) { print("I'm shook! ⌚️⌚️⌚️") }
func watchShaker(_ watchShaker: WatchShaker, didFailWith error: Error) {
print(error.localizedDescription)
}
} ```
Optional Directions
If you are interested, you can get the direction of the shake in the didShakeWith method.
swift
func watchShaker(_ watchShaker: WatchShaker, didShakeWith sensibility: ShakeSensibility,
direction: ShakeDirection) {
print("I'm shook! ⌚️⌚️⌚️ \(direction)")
}
ShakeDirection is a simple enum that gives you up, down, left, or right directions. The image below shows how each direction is determined.
This gentleman below, for example, is clearly doing a shake with ShakeDirection.shakeDirectionRight 😂
Contribute
We would love for you to contribute to WatchShaker! Check the LICENSE file for more info.
Meta
Docs: Here
Ezequiel França – @ezefranca and all the awesome Contributors
Distributed under the MIT license. See LICENSE for more information.
Owner
- Name: Ezequiel Santos
- Login: ezefranca
- Kind: user
- Location: Lisbon, Portugal
- Company: @miniclip
- Website: ezefranca.com
- Twitter: ezefranca
- Repositories: 709
- Profile: https://github.com/ezefranca
💼 Mobile Developer @miniclip 📲👾 📚 Phd Student @iade-pt 👨🏻💻
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "F. Santos" given-names: "Ezequiel" orcid: "https://orcid.org/0000-0001-9321-8444" title: "WatchShaker" version: 1.0.0 doi: 10.5281/zenodo.5224580 date-released: 2021-08-19 url: "https://github.com/ezefranca/WatchShaker"
GitHub Events
Total
- Watch event: 7
- Push event: 1
Last Year
- Watch event: 7
- Push event: 1
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Ezequiel Santos | e****p@g****m | 66 |
| Lorenz So | l****o@g****m | 3 |
| Gus Verdun | g****c@a****m | 3 |
| Marko Hlebar | m****r@g****m | 2 |
| Ezequiel Santos | e****s@s****k | 2 |
| Ezequiel França | e****s@p****r | 2 |
| Ezequiel França | e****s@b****m | 2 |
| Nathan Mak | n****k@i****m | 1 |
| DigitalDaring | 4****g | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 9
- Total pull requests: 6
- Average time to close issues: 8 months
- Average time to close pull requests: 29 days
- Total issue authors: 6
- Total pull request authors: 5
- Average comments per issue: 1.56
- Average comments per pull request: 1.17
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ghv (4)
- ezefranca (1)
- noahbino (1)
- lazerwalker (1)
- vanditmehta (1)
Pull Request Authors
- markohlebar (2)
- lorenzhk (1)
- ghv (1)
- DigitalDaring (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 4
- Total maintainers: 1
cocoapods.org: WatchShaker
watchOS shake moviment
- Homepage: https://github.com/ezefranca/WatchShaker
- Documentation: https://cocoadocs.org/docsets/WatchShaker/
- License: MIT
-
Latest release: 0.1.0
published over 5 years ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- muukii/actions-xcode-install-simulator 1.0.0 composite
- github.com/ezefranca/WatchShaker