Making the iPhone vibrate
How can the iPhone be set to vibrate once? For example, when a player loses a life or the game is over, the iPhone should vibrate. 12 Answers 12
How can the iPhone be set to vibrate once? For example, when a player loses a life or the game is over, the iPhone should vibrate. 12 Answers 12
I wrote an Android application. Now, I want to make the device vibrate when a certain action occurs. How can I do this? 13 s 13 Try: import android.os.Vibrator; … Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); // Vibrate for 500 milliseconds if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { v.vibrate(VibrationEffect.createOneShot(500, VibrationEffect.DEFAULT_AMPLITUDE)); } else { //deprecated in API 26 v.vibrate(500); … Read more