Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to vibrate android java

import android.os.Vibrator;
...
Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
// Vibrate for 500 milliseconds
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
    v.vibrate(VibrationEffect.createOneShot(500, VibrationEffect.DEFAULT_AMPLITUDE));
} else {
    //deprecated in API 26 
    v.vibrate(500);
}
Comment

PREVIOUS NEXT
Code Example
Java :: icon button java 
Java :: como utilizar random en java 
Java :: How to connect java class file to xml file 
Java :: java find substring between two strings 
Java :: maven spring-boot-configuration-processor install 
Java :: java double buffering jpanel 
Java :: java jackson cast to list 
Java :: android settextcolor programmatically 
Java :: java deltaTime 
Java :: big screen jframe 
Java :: sleep for milliseconds in java 
Java :: java read last line of file 
Java :: how to clear stringbuilder in java 
Java :: jfilechooser file filter 
Java :: how to detenct free the end achievement spigot 
Java :: how to make background image transparent in android studio 
Java :: Integer i = new Integer(257); byte x = i.byteValue(); System.out.print(x); 
Java :: similarity between abstract class and interface java 
Java :: pyramid star pattern in java 
Java :: filesaver javafx 
Java :: android run background service on startup 
Java :: int a=08 java 
Java :: android action key 
Java :: leetcode 416 
Java :: how to collect objective in java 
Java :: long max value java 
Java :: java string multiply 
Java :: IntStream.generate 
Java :: topological sort java 
Java :: java int length 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =