Class Info |
|---|
public final class HapticAttributes 振动波形属性类。 |
Qualifier and Type | Field and Description |
|---|---|
public static final int | 默认振动效果场景。 |
public static final int | 媒体振动效果场景。 |
public static final int | 闹钟振动效果场景。 |
public static final int | 通知振动效果场景。 |
public static final int | 铃声振动效果场景。 |
public static final int | 游戏振动效果场景。 |
Parameters
Name | Description |
|---|---|
flags | 预留参数。 |
Method |
|---|
public void setUsage(int usage) 设置振动波形使用场景。 |
Parameters
Name | Description |
|---|---|
usage | 表示振动波形的使用场景。在{@link com.huawei.devices.hapticsengine.HapticAttributes}中用整型常量定义了振动波形的使用场景。例如:用户可通过采用{@code HapticAttributes.USAGE_GAME}设置振动波形的使用场景为游戏场景。 |