1. Download our Official Android App: Forums for Android!

Apps Vibrator help

Discussion in 'Android Development' started by brade, May 29, 2010.

  1. brade

    brade Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    6
    Joined:
    May 11, 2010

    May 11, 2010
    6
    0
    5
    I set up my Vibrator:

    final Vibrator vibe = (Vibrator) getSystemService
    (Context.VIBRATOR_SERVICE);

    but when I call:

    vibe.vibrate(100);

    my app force closes...
    any ideas?
     

    Advertisement

  2. IanGClifton

    IanGClifton Well-Known Member
    Rank:
    None
    Points:
    58
    Posts:
    111
    Joined:
    Feb 7, 2010

    Did you request the permission in the AndroidManifest? <uses-permission android:name="android.permission.VIBRATE" />
     
    brade likes this.
  3. brade

    brade Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    6
    Joined:
    May 11, 2010

    May 11, 2010
    6
    0
    5
    No I didn't!!! Thank you!!!
     

Share This Page

Loading...