获得设备的触觉振动的代码
检查设备的触觉(振动)在设备可用的代码。// PRIVILEGE needed to be set in tizen-manifest.xml:
// http://tizen.org/privilege/haptic
#include <dlog.h> // for logging purposes
#include <device/haptic.h>
static void
get_device_haptic_count() {
int number;
if(device_haptic_get_count(&number) == DEVICE_ERROR_NONE) {
LOGI("Number of vibrators: %d", number);
} else {
LOGE("Error occured");
}
}
页:
[1]