振动器Vibrator
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //获取系统的Vibrator服务 vibrator = (Vibrator) getSystemService(Service.VIBRATOR_SERVICE); //控制手机震动1秒 vibrator.vibrate(1000); } }
文件列表
.zip
(预估有个42文件)
Vibrator
.project
844B
project.properties
563B
src
com
example
vibrator
MainActivity.java
542B
AndroidManifest.xml
947B
res
暂无评论