stop Vibrator - Android Hardware

Android examples for Hardware:Vibrator

Description

stop Vibrator

Demo Code


//package com.java2s;

import android.os.Vibrator;

public class Main {
    public static boolean vibratorRun = true;
    private static Vibrator vibrator;

    public static void stop() {
        // &&vibrator.hasVibrator()
        if (vibratorRun) {
            if (vibrator != null) {
                vibrator.cancel();//  ww w.j  av  a  2 s  .  com
                System.gc();
            }
        }
    }
}

Related Tutorials