android[Api]Vibrator_振动器
来源:互联网 发布:微时代营销软件 编辑:程序博客网 时间:2024/05/01 07:47
Class Overview
设备上的振动器控制类
如果你的进程退出,你将会停止任何设置了的震动
获得系统振动器的一个实例,调用getSystemService(String)
VIBRATOR_SERVICE
为参数Summary
Turn the vibrator off.
Check whether the hardware has a vibrator.
Vibrate with a given pattern.
Vibrate constantly for the specified period of time.
Public Methods
public abstract void cancel ()
Turn the vibrator off.
关掉振动器。
This method 。requires the caller to hold the permission VIBRATE
.
这种方法要求调用方允许振动。
public abstract boolean hasVibrator ()
Check whether the hardware has a vibrator.
检查硬件是否有一个振动器。
Returns
- True if the hardware has a vibrator, else false.
public abstract void vibrate (long[] pattern, int repeat)
Vibrate with a given pattern.
设置震动的模式
Pass in an array of ints that are the durations for which to turn on or off the vibrator in milliseconds. The first value indicates the number of milliseconds to wait before turning the vibrator on. The next value indicates the number of milliseconds for which to keep the vibrator on before turning it off. Subsequent values alternate between durations in milliseconds to turn the vibrator off or to turn the vibrator on.
To cause the pattern to repeat, pass the index into the pattern array at which to start the repeat, or -1 to disable repeating.
This method requires the caller to hold the permission VIBRATE
.
传入的整数数组的持续时间来打开或关闭振动器,以毫秒为单位。第一个值表示将振动器之前等待的毫秒数。下一个值表示震动的毫秒数,之后振动器将其关闭。随后值之间的交替时间以毫秒为单位,关掉振动器或启动振动器。
Parameters
public abstract void vibrate (long milliseconds)
Vibrate constantly for the specified period of time.
在指定的时间内不断的震动
This method requires the caller to hold the permission VIBRATE
.
这种方法要求调用方允许振动。
Parameters
获取方式(Vibrator) getSystemService(VIBRATOR_SERVICE);需要权限<uses-permission android:name="android.permission.VIBRATE"/>
- android[Api]Vibrator_振动器
- android振动器
- Android 振动器
- android振动器
- Vibrator--android 振动器
- Android 的振动器
- android的振动器Vibrator
- android 振动器系统
- Android 的振动器
- android振动器(Vibrator)
- Android 振动器系统架构
- Android振动器的使用
- Android中的振动器---Vibrator
- Android Vibrator 振动器
- 初学Android,手机振动器(六十七)
- Android振动器(Vibrator)系统详解
- Android振动器(Vibrator)系统详解
- android手动调用振动器(Vibrator)
- scott用户无法登陆
- Delphi中WebBrowser的使用技巧汇总
- nginx 搭建python 环境 (django) phper转pythoner 大白话教程
- 博客收藏
- 安装oracle 11gr2 提示"Invalid source path '../stage/Components/oracle.jdk/1.5.0.17.0/1/DataFile“
- android[Api]Vibrator_振动器
- 写邮件注意事项(简)
- Ubuntu无法进入图形化界面
- Spring环境搭建之:通过PropertyPlaceholderConfigurer加载属性配置文件:
- PCA主成分分析简单理解
- mysql查看当前执行线程show processlist
- 关于cout未声明的标识符的解决
- 手机防盗方略
- Linux学习记录--服务