title: Is there a way to make instructions with 300ms between them?
body: <p>I have this problem: I should vibrate the phone for 500ms *, 300ms of pause, 500ms * of vibration, 300ms of pause and finally 500ms * of vibration. I tried using Handler but unfortunately it's like they add up in one wait time. Is there a specific way to do all these operations sequentially and by putting a delay between them? A thousand thanks.</p>
  <p>Time varies depending on many factors</p>
  <pre><code>    val vibration = requireActivity().getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
      Handler(Looper.getMainLooper()).postDelayed({
          vibration.vibrate(code.code.duration1.toLong())
      }, 600)
      Handler(Looper.getMainLooper()).postDelayed({
          vibration.vibrate(code.code.duration2.toLong())
      }, 2000)
      Handler(Looper.getMainLooper()).postDelayed({
          vibration.vibrate(code.code.duration3.toLong())
          id.setImageDrawable(AppCompatResources.getDrawable(requireActivity(), R.drawable.ic_play))
      }, 3600)
  </code></pre>