找回密码
 立即注册
查看: 2082|回复: 0

获得设备的触觉振动的代码

[复制链接]
发表于 2015-8-19 15:01:02 | 显示全部楼层 |阅读模式
检查设备的触觉(振动)在设备可用的代码。
  1. //    PRIVILEGE needed to be set in tizen-manifest.xml:
  2. //    http://tizen.org/privilege/haptic

  3. #include <dlog.h> // for logging purposes
  4. #include <device/haptic.h>

  5. static void
  6. get_device_haptic_count() {
  7.         int number;

  8.         if(device_haptic_get_count(&number) == DEVICE_ERROR_NONE) {
  9.                 LOGI("Number of vibrators: %d", number);
  10.         } else {
  11.                 LOGE("Error occured");
  12.         }
  13. }
复制代码
欢迎来到泰泽网:http://www.tizennet.com/ 泰泽论坛:http://bbs.tizennet.com/ 好没有内涵哦,快到设置中更改这个无聊的签名吧!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|泰泽应用|泰泽论坛|泰泽网|小黑屋|Archiver|手机版|泰泽邮箱|泰泽网 ( 蜀ICP备13024062号-1 )

GMT+8, 2024-4-20 07:02 , Processed in 0.066436 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表