+ Reply to Thread
Results 1 to 2 of 2

Thread: Vibrate my phone for a specific amount time

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    15

    Vibrate my phone for a specific amount time

    I want to create a vibrate function that will vibrate the phone for a specific amount of time.

  2. #2
    Junior Member
    Join Date
    May 2012
    Posts
    27
    Here is the code for that
    Code:
    Vibrator vibrate = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
    // Vibrate for 300 milliseconds
    long milliseconds = 300;
    vibrate.vibrate(milliseconds);

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts