简体   繁体   中英

ShakeGesture library WP7 - Shake count

i've being reading about your ShakeGesture library and it's really good! But i was wondering if there is a way for use this library for count the numbers of a shake. For example, i want to have an app where the user needs to shake the phone 30 times. If the user shakes it 10 times, something will happen. If 20 times, other thing will happen.

Is something like this possible?

The ShakeGesture library doesn't include a way of reporting how many times a device was moved as part of a shake.

However, it does allow you to customize the MinimumRequiredMovesForShake . You could try creating multiple instances of the listener, each configured to listen for a different number of moves and then handle the events differently.

your looking for the Accelerometer to stop moving, then calculate that accordingly. This should help: accelerometer stop count

:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM