Why shake my cell phone?
There are many silly and/or inappropriate reasons to shake a cell phone. However, the purpose of this article is to explain the specific causes of mobile phone vibration.
Game feedback
Let's start with an obvious example: game. When you play a game, you may not always be able to provide users with all the information they need. (Especially when their fingers are on the screen .) Give them some tactile feedback to let them know that they are being attacked or that they have something to pay attention.
Button feedback
This may be very common for you, but for every button in your program, tactile feedback can let users know that they have pressed the corresponding button. In Windows Phone, the default button becomes a solid color when it is pressed, but many times users are not sure if they have clicked it (especially when this operation takes several seconds ). Provide them with a fast vibration to let them know that they have achieved their goals.
Push notification
The other is obvious, but the time when the vibration feedback is not fully utilized is push notification. By default, if you receive an email, short message, or so on, your phone will shake (or ring ). We can use the same user experience in the program. When a user is warned of something, the phone can vibrate. This is especially important when your program is passive. For example, a program is tracking your location and you are passing through the neighbor's house. If the signal disappears or reaches the target distance, only one vibration is needed to let users know without looking at their mobile phones. In the same example, you can even report to them every 1/4 miles, so that they will realize how far they are going.
How to shake a cell phone?
Thanks a lot. This is incredibly simple. You only need two lines of code to implement it, but you will spend a lot of time adjusting it to meet your specific needs. This is the most basic code:
Vibratecontroller Vc = vibratecontroller. Default; VC. Start (timespan. frommilliseconds (100 ));
How long does it take to vibrate?
There is no uniform standard for how long the prompt should shake, but I will follow some rules and share with you:
- It is suitable for clicking a button for 1/10 seconds (this is also the shortest time for vibratecontroller to vibrate ).
- 2 seconds = your user will say, "What's wrong with my phone number? ". 2 seconds is too long for any prompt.
- 300 milliseconds (about 1/3 seconds) seems to be the right time for a stable vibration prompt. In this way, your users will not think that the phone is faulty.
- Fast pulse vibration is another good way to let users know what is happening.