Code example for Vibrator

Methods: cancel

0
                    if (pattern != null) { 
                        mVibrator.vibrate(pattern, -1); 
                    } 
                    return; 
                case MESSAGE_STOP_VIBRATE: 
                    mVibrator.cancel(); 
                    return; 
            } 
        } 
    }; 
 
    /** 
     * {@link BroadcastReceiver} for receiving updates for our context - device 
     * state. 
     */ 
    private BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
        @Override 
        public void onReceive(Context context, Intent intent) { 
            String action = intent.getAction(); 
 
            if (AudioManager.RINGER_MODE_CHANGED_ACTION.equals(action)) {