public class VibrationPattern extends Object
You can use this class to create a one-shot or periodic vibration and set vibration parameters, such as the vibration counts, duration, and intensity.
SystemCapability.Sensors#MISC_DEVICE| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
VibrationPattern.EffectFlagType |
Indicates the vibration effect type of a vibrator.
|
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static String |
VIBRATOR_TYPE_ALLSCREEN_SLIP_BACK |
Describes the vibration effect of the vibrator when a user swipes leftward or rightward in
full-screen mode.
|
static String |
VIBRATOR_TYPE_ALLSCREEN_UPGLIDE_MULTITASK |
Describes the vibration effect of the vibrator when a user swipes up in full-screen mode
to initiate multiple tasks.
|
static String |
VIBRATOR_TYPE_BATTERY_CHARGING |
Describes the vibration effect of the vibrator when the charger is connected.
|
static String |
VIBRATOR_TYPE_CALCULATOR_DELETE_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the Delete
key on the calculator.
|
static String |
VIBRATOR_TYPE_CALL_ON_OFF |
Describes the vibration effect of the vibrator when an incoming call is answered or ended.
|
static String |
VIBRATOR_TYPE_CALL_RING |
Describes the vibration effect of the vibrator for incoming calls with only vibrations.
|
static String |
VIBRATOR_TYPE_CAMERA_CLICK |
Describes the vibration effect of the vibrator when the camera is being pressed.
|
static String |
VIBRATOR_TYPE_CAMERA_CLICK_UP |
Describes the vibration effect of the vibrator when a user releases the shutter on the
camera.
|
static String |
VIBRATOR_TYPE_CAMERA_FOCUS |
Describes the vibration effect of the vibrator when the camera is focusing.
|
static String |
VIBRATOR_TYPE_CAMERA_GEAR_SLIP |
Describes the vibration effect of the vibrator when the camera mode is being flipped.
|
static String |
VIBRATOR_TYPE_CAMERA_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the viewfinder.
|
static String |
VIBRATOR_TYPE_CAMERA_MODE_SWITCH |
Describes the vibration effect of the vibrator when the camera mode is switched.
|
static String |
VIBRATOR_TYPE_CAMERA_PORTRAIT_SWITCH |
Describes the vibration effect of the vibrator when the camera portrait mode is switched.
|
static String |
VIBRATOR_TYPE_CLOCK_STOPWATCH |
Describes the vibration effect of the vibrator when the clock stopwatch is counting.
|
static String |
VIBRATOR_TYPE_CLOCK_TIMER |
Describes the vibration effect of the vibrator when a user adjusts the timer.
|
static String |
VIBRATOR_TYPE_COMMON_LONG_PRESS1 |
Describes the vibration effect of the vibrator when a user touches and holds the text to
edit it.
|
static String |
VIBRATOR_TYPE_CONTACTS_LETTERS_INDEX |
Describes the vibration effect of the vibrator when the contacts are indexed alphabetically.
|
static String |
VIBRATOR_TYPE_CONTROL_DATE_SCROLL |
Describes the vibration effect of the vibrator when a user adjusts the calendar date.
|
static String |
VIBRATOR_TYPE_CONTROL_LETTERS_SCROLL |
Describes the vibration effect of the vibrator when a user sets the time zone using the
alphabetical index.
|
static String |
VIBRATOR_TYPE_CONTROL_SEARCH_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the search box.
|
static String |
VIBRATOR_TYPE_CONTROL_TEXT_CHOOSE_CURSOR_MOVE |
Describes the vibration effect of the vibrator when the text selection cursor is moved.
|
static String |
VIBRATOR_TYPE_CONTROL_TEXT_EDIT |
Describes the vibration effect of the vibrator when a user touches and holds the editing
text.
|
static String |
VIBRATOR_TYPE_CONTROL_TIME_SCROLL |
Describes the vibration effect of the vibrator when a user adjusts the clock time.
|
static String |
VIBRATOR_TYPE_CONTROL_WIDGET_OPERATION |
Describes the vibration effect of the vibrator when the drawer control is enabled or
disabled.
|
static String |
VIBRATOR_TYPE_DESKTOP_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds an icon on
the home screen.
|
static String |
VIBRATOR_TYPE_DESKTOP_PAGE_EDIT_CLICK |
Describes the vibration effect of the vibrator when a user clicks the page editing tool.
|
static String |
VIBRATOR_TYPE_DESKTOP_PAGE_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the home screen.
|
static String |
VIBRATOR_TYPE_DESKTOP_WIDGET_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds a widget on
the home screen to edit it.
|
static String |
VIBRATOR_TYPE_DIALLER_CLICK |
Describes the vibration effect of the vibrator when a user clicks the dialer.
|
static String |
VIBRATOR_TYPE_DIALLER_DELETE_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the Delete
key on the dialer.
|
static String |
VIBRATOR_TYPE_DIALLER_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the dialer.
|
static String |
VIBRATOR_TYPE_FINGERPRINT_IN_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the
fingerprint recognition area during fingerprint enrolling.
|
static String |
VIBRATOR_TYPE_FINGERPRINT_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the
fingerprint recognition area.
|
static String |
VIBRATOR_TYPE_FINGERPRINT_UNLOCK_FAIL |
Describes the vibration effect of the vibrator when fingerprint unlock on a locked screen
fails.
|
static String |
VIBRATOR_TYPE_FLOAT_TASKS_LONGPRESS |
Describes the vibration effect of the vibrator when a user touches and holds the
navigation dock button.
|
static String |
VIBRATOR_TYPE_GALLERY_ALBUMS_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the gallery.
|
static String |
VIBRATOR_TYPE_GALLERY_PHOTOS_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds a photo.
|
static String |
VIBRATOR_TYPE_GALLERY_UPGLIDE_RELATED |
Describes the vibration effect of the vibrator when a user swipes up on a picture to view
its information.
|
static String |
VIBRATOR_TYPE_GRADE_STRENGTH1 |
Describes the level-1 (light) vibration effect of the Baidu input method.
|
static String |
VIBRATOR_TYPE_GRADE_STRENGTH2 |
Describes the level-2 vibration effect of the Baidu input method.
|
static String |
VIBRATOR_TYPE_GRADE_STRENGTH3 |
Describes the level-3 vibration effect of the Baidu input method.
|
static String |
VIBRATOR_TYPE_GRADE_STRENGTH4 |
Describes the level-4 vibration effect of the Baidu input method.
|
static String |
VIBRATOR_TYPE_GRADE_STRENGTH5 |
Describes the level-5 (heavy) vibration effect of the Baidu input method.
|
static String |
VIBRATOR_TYPE_HIVOICE_CLICK |
Describes the vibration effect of the vibrator when a user clicks HiVoice.
|
static String |
VIBRATOR_TYPE_LOCKSCREEN_FACE_UNLOCK_FAIL |
Describes the vibration effect of the vibrator when face unlock on a locked screen fails.
|
static String |
VIBRATOR_TYPE_LOCKSCREEN_FACE_UNLOCK_RETRY |
Describes the vibration effect of the vibrator when a user retries face unlock on a locked
screen.
|
static String |
VIBRATOR_TYPE_LOCKSCREEN_NUMBER_UNLOCK_FAIL |
Describes the vibration effect of the vibrator when password unlock on a locked screen fails.
|
static String |
VIBRATOR_TYPE_LOCKSCREEN_ONEHAND_KEYBOARD_SWITCH |
Describes the vibration effect of the vibrator when a user switches the keyboard in
one-hand mode on a locked screen.
|
static String |
VIBRATOR_TYPE_LOCKSCREEN_UNLOCK_CLICK |
Describes the vibration effect of the vibrator when a user clicks a locked screen to
unlock it.
|
static String |
VIBRATOR_TYPE_LOCKSCREEN_UNLOCK_SLIP |
Describes the vibration effect of the vibrator when a user swipes to unlock the screen or
to open the camera.
|
static String |
VIBRATOR_TYPE_LOCKSCREEN_UPGLIDE_SWITCHES |
Describes the vibration effect of the vibrator when a user swipes up on the shortcut bar
at the bottom of the magazine unlock screen.
|
static String |
VIBRATOR_TYPE_NOTEPAD_NOTE_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the notepad.
|
static String |
VIBRATOR_TYPE_RINGTONE_AMUSEMENT_PARK |
Describes the vibration effect of the vibrator for the Amusement ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_BOUNCE |
Describes the vibration effect of the vibrator for the Bounce ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_BREATHE_FREELY |
Describes the vibration effect of the vibrator for the Breathfreely ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_CARTOON |
Describes the vibration effect of the vibrator for the Cartoon ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_CHILLED |
Describes the vibration effect of the vibrator for the Chilled ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_CLASSIC_BELL |
Describes the vibration effect of the vibrator for the Classic Bell ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_CONCENTRATE |
Describes the vibration effect of the vibrator for the Concentrate ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_DAY_LILY |
Describes the vibration effect of the vibrator for the Day lily ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_DIGITAL_RINGTONE |
Describes the vibration effect of the vibrator for the Digital Ringtone ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_DREAM |
Describes the vibration effect of the vibrator for the Dream ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_DREAM_IT_POSSIBLE |
Describes the vibration effect of the vibrator for the Dream It Possible ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_DYNAMO |
Describes the vibration effect of the vibrator for the Dynamo ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_FANTASY_WORLD |
Describes the vibration effect of the vibrator for the Fantasy world ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_FLIPPED |
Describes the vibration effect of the vibrator for the Flipped ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_FOREST_DAY |
Describes the vibration effect of the vibrator for the Forest Day ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_FREE |
Describes the vibration effect of the vibrator for the Free ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_HALO |
Describes the vibration effect of the vibrator for the Halo ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_HARP |
Describes the vibration effect of the vibrator for the Harp ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_HELLO_YA |
Describes the vibration effect of the vibrator for the Hello Ya ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_MENUET |
Describes the vibration effect of the vibrator for the Menuet ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_NEON |
Describes the vibration effect of the vibrator for the Neon ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_NOTES |
Describes the vibration effect of the vibrator for the Notes ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_PULSE |
Describes the vibration effect of the vibrator for the Pulse ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_SAILING |
Describes the vibration effect of the vibrator for the Sailing ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_SAX |
Describes the vibration effect of the vibrator for the Sax ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_SPIN |
Describes the vibration effect of the vibrator for the Spin ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_SUMMER_AFTERNOON |
Describes the vibration effect of the vibrator for the Summerafternoon ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_SUNLIT_GARDEN |
Describes the vibration effect of the vibrator for the Sunlit Garden ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_SURGING_POWER |
Describes the vibration effect of the vibrator for the Surging Power ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_TUNE_CLEAN |
Describes the vibration effect of the vibrator for the Tune Clean ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_TUNE_LIVING |
Describes the vibration effect of the vibrator for the Tune Living ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_TUNE_ORCHESTRAL |
Describes the vibration effect of the vibrator for the Tune Orchestral ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_WESTLAKE |
Describes the vibration effect of the vibrator for the Westlake ringtone.
|
static String |
VIBRATOR_TYPE_RINGTONE_WHISTLE |
Describes the vibration effect of the vibrator for the Whistle ringtone.
|
static String |
VIBRATOR_TYPE_SYSTEMUI_NOTIFICATIONS_EXPAND |
Describes the vibration effect of the vibrator when a user swipes down on the status bar
to show all shortcuts.
|
static String |
VIBRATOR_TYPE_SYSTEMUI_NOTIFICATIONS_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds a
notification message.
|
static String |
VIBRATOR_TYPE_SYSTEMUI_NOTIFICATIONS_MOVE |
Describes the vibration effect of the vibrator when a user swipes down from the status bar
to open the notification panel.
|
static String |
VIBRATOR_TYPE_SYSTEMUI_SCREEN_RECORD_STOP |
Describes the vibration effect of the vibrator when a user presses the key for stopping
recording.
|
static String |
VIBRATOR_TYPE_SYSTEMUI_SWITCHES_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds a shortcut
switch.
|
static String |
VIBRATOR_TYPE_SYSTEMUI_SWITCHES_SORT_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the shortcut
switches to sort them.
|
static String |
VIBRATOR_TYPE_VIRTUALNAVIGATION_CLICK_BACK |
Describes the vibration effect of the vibrator when a user touches and holds the Back
button in virtual navigation mode.
|
static String |
VIBRATOR_TYPE_VIRTUALNAVIGATION_CLICK_HOME |
Describes the vibration effect of the vibrator when a user touches and holds the Home
button in virtual navigation mode.
|
static String |
VIBRATOR_TYPE_VIRTUALNAVIGATION_CLICK_MULTITASK |
Describes the vibration effect of the vibrator when a user clicks multiple tasks in
virtual navigation mode.
|
static String |
VIBRATOR_TYPE_VIRTUALNAVIGATION_LONGPRESS_HOME |
Describes the vibration effect of the vibrator when a user touches and holds the virtual
navigation bar.
|
static String |
VIBRATOR_TYPE_WALLET_TIME_SCROLL |
Describes the vibration effect of the vibrator when a user adjusts the calendar time.
|
static String |
VIBRATOR_TYPE_WATCH_ALARMCLOCK_NOTIFICATION |
Describes the vibration effect of the vibrator when the alarm clock vibrates.
|
static String |
VIBRATOR_TYPE_WATCH_APPLICATION_MESSAGE_NOTIFICATION |
Describes the vibration effect of the vibrator when an application message is received.
|
static String |
VIBRATOR_TYPE_WATCH_BAROMETER_WARNING |
Describes the vibration effect of the vibrator when the barometer sends a notification.
|
static String |
VIBRATOR_TYPE_WATCH_BATTERY_CHARGING_SUCCESS |
Describes the vibration effect of the vibrator when the charger is connected.
|
static String |
VIBRATOR_TYPE_WATCH_BLUETOOTHBREAK_WARNING |
Describes the vibration effect of the vibrator when the Bluetooth is disconnected.
|
static String |
VIBRATOR_TYPE_WATCH_BREATHTAKE_SPEED1 |
Describes the vibration effect of the vibrator when the breath-take speed is fast during a
breathing exercise.
|
static String |
VIBRATOR_TYPE_WATCH_BREATHTAKE_SPEED2 |
Describes the vibration effect of the vibrator when the breath-take speed is moderate
during a breathing exercise.
|
static String |
VIBRATOR_TYPE_WATCH_BREATHTAKE_SPEED3 |
Describes the vibration effect of the vibrator when the breath-take speed is slow during a
breathing exercise.
|
static String |
VIBRATOR_TYPE_WATCH_CARDPAY_FAIL |
Describes the vibration effect of the vibrator when the operation such as payment or card
swiping fails.
|
static String |
VIBRATOR_TYPE_WATCH_CARDPAY_SUCCESS |
Describes the vibration effect of the vibrator when the operation such as payment or card
swiping is successful or when the card reminder is switched.
|
static String |
VIBRATOR_TYPE_WATCH_CROWN_STRENGTH0 |
Describes the vibration effect of the vibrator on the wearable at intensity 0.
|
static String |
VIBRATOR_TYPE_WATCH_CROWN_STRENGTH1 |
Describes the vibration effect of the vibrator when a user rotates the crown.
|
static String |
VIBRATOR_TYPE_WATCH_CROWN_STRENGTH2 |
Describes the vibration effect of the vibrator when a user rotates the crown to adjust
values such as the volume and date.
|
static String |
VIBRATOR_TYPE_WATCH_CROWN_STRENGTH3 |
Describes the vibration effect of the vibrator when a user rotates the crown until it
cannot be rotated any further.
|
static String |
VIBRATOR_TYPE_WATCH_EXCERCISE_HEARTBEAT_WARNING |
Describes the vibration effect of the vibrator when a notification is received to indicate
a fast or slow heartbeat in an exercise.
|
static String |
VIBRATOR_TYPE_WATCH_EXERCISE_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the screen to
customize exercise data.
|
static String |
VIBRATOR_TYPE_WATCH_EXERCISE_NOTIFICATION |
Describes the vibration effect of the vibrator during an exercise.
|
static String |
VIBRATOR_TYPE_WATCH_EXERCISE_START_END_PAUSE |
Describes the vibration effect of the vibrator when a user performs an exercise operation,
including starting, pausing, or ending an exercise, or pressing the power button.
|
static String |
VIBRATOR_TYPE_WATCH_HEARTBEATHIGH_WARNING |
Describes the vibration effect of the vibrator when a notification is received to indicate
a fast or slow heartbeat in daily monitoring.
|
static String |
VIBRATOR_TYPE_WATCH_LAUNCHER_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds an
application icon on the Launcher grid and list.
|
static String |
VIBRATOR_TYPE_WATCH_LOWBATTERY_WARNING |
Describes the vibration effect of the vibrator when a low-battery notification is received.
|
static String |
VIBRATOR_TYPE_WATCH_MESSAGE_NOTIFICATION |
Describes the vibration effect of the vibrator when messages such as SMS messages and
emails are received.
|
static String |
VIBRATOR_TYPE_WATCH_PHONEPAIR_REQUIRING |
Describes the vibration effect of the vibrator when a user triggers a pairing request.
|
static String |
VIBRATOR_TYPE_WATCH_PHONEPAIR_SUCCESS |
Describes the vibration effect of the vibrator when the pairing is successful.
|
static String |
VIBRATOR_TYPE_WATCH_POWER_OFF |
Describes the vibration effect of the vibrator on the wearable power off.
|
static String |
VIBRATOR_TYPE_WATCH_POWER_ON |
Describes the vibration effect of the vibrator on the wearable power on.
|
static String |
VIBRATOR_TYPE_WATCH_REMOTECAMERA_LONG |
Describes the vibration effect of the vibrator when the countdown for taking a photo
reaches 3 seconds.
|
static String |
VIBRATOR_TYPE_WATCH_REMOTECAMERA_SHORT |
Describes the vibration effect of the vibrator when the countdown for taking a photo
reaches 2 seconds and 1 second, respectively.
|
static String |
VIBRATOR_TYPE_WATCH_SITLONGTIME_NOTIFICATION |
Describes the vibration effect of the vibrator when an activity reminder is received.
|
static String |
VIBRATOR_TYPE_WATCH_SPARETYPE_STRENGTH1 |
Describes the vibration effect of the vibrator on the wearable at intensity 1.
|
static String |
VIBRATOR_TYPE_WATCH_SPARETYPE_STRENGTH2 |
Describes the vibration effect of the vibrator on the wearable at intensity 2.
|
static String |
VIBRATOR_TYPE_WATCH_SPARETYPE_STRENGTH3 |
Describes the vibration effect of the vibrator on the wearable at intensity 3.
|
static String |
VIBRATOR_TYPE_WATCH_SPO2MEASURE_FINISH |
Describes the vibration effect of the vibrator when measurement of the oxygen saturation
is complete.
|
static String |
VIBRATOR_TYPE_WATCH_SYSTEM_EMERGENCY_WARNING |
Describes the vibration effect of the vibrator when an emergency notification is received.
|
static String |
VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH0 |
Describes the vibration effect of the vibrator on the wearable at intensity 0.
|
static String |
VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH1 |
Describes the vibration effect of the vibrator on the wearable at intensity 1.
|
static String |
VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH2 |
Describes the vibration effect of the vibrator on the wearable at intensity 2.
|
static String |
VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH3 |
Describes the vibration effect of the vibrator on the wearable at intensity 3.
|
static String |
VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH4 |
Describes the vibration effect of the vibrator on the wearable at intensity 4.
|
static String |
VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH5 |
Describes the vibration effect of the vibrator on the wearable at intensity 5.
|
static String |
VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH6 |
Describes the vibration effect of the vibrator on the wearable at intensity 6.
|
static String |
VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH7 |
Describes the vibration effect of the vibrator on the wearable at intensity 7.
|
static String |
VIBRATOR_TYPE_WATCH_TILES_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the card list
to change the card sequence.
|
static String |
VIBRATOR_TYPE_WATCH_TIMER_NOTIFICATION |
Describes the vibration effect of the vibrator when the timer stops timing.
|
static String |
VIBRATOR_TYPE_WATCH_WATCHFACE_CHANGE_LONG_PRESS |
Describes the vibration effect of the vibrator when a user touches and holds the screen to
change the watch face.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static VibrationPattern |
createPeriod(int[] timing,
int count) |
Creates a periodic vibration effect with a given timing sequence.
|
static VibrationPattern |
createPeriod(int[] timing,
int[] intensities,
int count) |
Creates a periodic vibration effect with a given timing sequence and intensity.
|
static VibrationPattern |
createSingle(int duration,
int intensity) |
Creates a one-shot vibration effect.
|
int |
getCount() |
Obtains the vibration counts of a vibrator.
|
int |
getDuration() |
Obtains the one-shot vibration duration of a vibrator.
|
int[] |
getIntensities() |
Obtains the array of intensities in a periodic vibration.
|
int |
getIntensity() |
Obtains the intensity of a one-shot vibration.
|
int[] |
getTiming() |
Obtains the array of the timing sequence in a periodic vibration.
|
void |
setCount(int count) |
Sets the vibration counts of a vibrator.
|
void |
setDuration(int duration) |
Sets the one-shot vibration duration of a vibrator.
|
void |
setIntensities(int[] intensities) |
Sets the array of intensities of a periodic vibration.
|
void |
setIntensity(int intensity) |
Sets the intensity of a one-shot vibration.
|
void |
setTiming(int[] timing) |
Sets the array of the timing sequence in a periodic vibration.
|
public static final String VIBRATOR_TYPE_ALLSCREEN_SLIP_BACK
public static final String VIBRATOR_TYPE_ALLSCREEN_UPGLIDE_MULTITASK
public static final String VIBRATOR_TYPE_BATTERY_CHARGING
public static final String VIBRATOR_TYPE_CALCULATOR_DELETE_LONG_PRESS
public static final String VIBRATOR_TYPE_CALL_ON_OFF
public static final String VIBRATOR_TYPE_CALL_RING
public static final String VIBRATOR_TYPE_CAMERA_CLICK
This constant applies to the scenarios when a user is pressing the shutter to take a photo, to record a video, or to capture a snapshot and is pausing the recording.
public static final String VIBRATOR_TYPE_CAMERA_CLICK_UP
This constant applies to the scenarios in which a user releases the shutter during photo shooting, video recording, or snapshot capturing.
public static final String VIBRATOR_TYPE_CAMERA_FOCUS
public static final String VIBRATOR_TYPE_CAMERA_GEAR_SLIP
This constant applies to the scenarios when a user adjusts aperture settings, sets the beauty effect level for rear camera, for video recording, or in 3D dynamic panoramic mode, sets the smooth level in portrait mode, adjusts the ISO sensitivity or the shutter speed in night mode, and sets the filters.
public static final String VIBRATOR_TYPE_CAMERA_LONG_PRESS
This constant applies to the scenarios in which a user touches and holds the viewfinder to display the metering frame or focus frame.
public static final String VIBRATOR_TYPE_CAMERA_MODE_SWITCH
public static final String VIBRATOR_TYPE_CAMERA_PORTRAIT_SWITCH
This constant applies to the scenarios when a user sets the skin tone and blur for front camera and sets the blur for rear camera.
public static final String VIBRATOR_TYPE_CLOCK_STOPWATCH
public static final String VIBRATOR_TYPE_CLOCK_TIMER
public static final String VIBRATOR_TYPE_COMMON_LONG_PRESS1
public static final String VIBRATOR_TYPE_CONTACTS_LETTERS_INDEX
public static final String VIBRATOR_TYPE_CONTROL_DATE_SCROLL
public static final String VIBRATOR_TYPE_CONTROL_LETTERS_SCROLL
public static final String VIBRATOR_TYPE_CONTROL_SEARCH_LONG_PRESS
public static final String VIBRATOR_TYPE_CONTROL_TEXT_CHOOSE_CURSOR_MOVE
public static final String VIBRATOR_TYPE_CONTROL_TEXT_EDIT
public static final String VIBRATOR_TYPE_CONTROL_TIME_SCROLL
public static final String VIBRATOR_TYPE_CONTROL_WIDGET_OPERATION
public static final String VIBRATOR_TYPE_DESKTOP_LONG_PRESS
public static final String VIBRATOR_TYPE_DESKTOP_PAGE_EDIT_CLICK
public static final String VIBRATOR_TYPE_DESKTOP_PAGE_LONG_PRESS
public static final String VIBRATOR_TYPE_DESKTOP_WIDGET_LONG_PRESS
public static final String VIBRATOR_TYPE_DIALLER_CLICK
public static final String VIBRATOR_TYPE_DIALLER_DELETE_LONG_PRESS
public static final String VIBRATOR_TYPE_DIALLER_LONG_PRESS
public static final String VIBRATOR_TYPE_FINGERPRINT_IN_LONG_PRESS
public static final String VIBRATOR_TYPE_FINGERPRINT_LONG_PRESS
public static final String VIBRATOR_TYPE_FINGERPRINT_UNLOCK_FAIL
public static final String VIBRATOR_TYPE_FLOAT_TASKS_LONGPRESS
public static final String VIBRATOR_TYPE_GALLERY_ALBUMS_LONG_PRESS
public static final String VIBRATOR_TYPE_GALLERY_PHOTOS_LONG_PRESS
public static final String VIBRATOR_TYPE_GALLERY_UPGLIDE_RELATED
public static final String VIBRATOR_TYPE_GRADE_STRENGTH1
public static final String VIBRATOR_TYPE_GRADE_STRENGTH2
public static final String VIBRATOR_TYPE_GRADE_STRENGTH3
public static final String VIBRATOR_TYPE_GRADE_STRENGTH4
public static final String VIBRATOR_TYPE_GRADE_STRENGTH5
public static final String VIBRATOR_TYPE_HIVOICE_CLICK
public static final String VIBRATOR_TYPE_LOCKSCREEN_FACE_UNLOCK_FAIL
public static final String VIBRATOR_TYPE_LOCKSCREEN_FACE_UNLOCK_RETRY
public static final String VIBRATOR_TYPE_LOCKSCREEN_NUMBER_UNLOCK_FAIL
public static final String VIBRATOR_TYPE_LOCKSCREEN_ONEHAND_KEYBOARD_SWITCH
A user may switch the keyboard for setting the numeric password, pattern password, and hybrid password.
public static final String VIBRATOR_TYPE_LOCKSCREEN_UNLOCK_CLICK
For example, a user may click the screen to enter the lock screen password, press the Delete key, make an emergency call, or press the shortcut button at the bottom.
public static final String VIBRATOR_TYPE_LOCKSCREEN_UNLOCK_SLIP
public static final String VIBRATOR_TYPE_LOCKSCREEN_UPGLIDE_SWITCHES
public static final String VIBRATOR_TYPE_NOTEPAD_NOTE_LONG_PRESS
public static final String VIBRATOR_TYPE_RINGTONE_AMUSEMENT_PARK
public static final String VIBRATOR_TYPE_RINGTONE_BOUNCE
public static final String VIBRATOR_TYPE_RINGTONE_BREATHE_FREELY
public static final String VIBRATOR_TYPE_RINGTONE_CARTOON
public static final String VIBRATOR_TYPE_RINGTONE_CHILLED
public static final String VIBRATOR_TYPE_RINGTONE_CLASSIC_BELL
public static final String VIBRATOR_TYPE_RINGTONE_CONCENTRATE
public static final String VIBRATOR_TYPE_RINGTONE_DAY_LILY
public static final String VIBRATOR_TYPE_RINGTONE_DIGITAL_RINGTONE
public static final String VIBRATOR_TYPE_RINGTONE_DREAM
public static final String VIBRATOR_TYPE_RINGTONE_DREAM_IT_POSSIBLE
public static final String VIBRATOR_TYPE_RINGTONE_DYNAMO
public static final String VIBRATOR_TYPE_RINGTONE_FANTASY_WORLD
public static final String VIBRATOR_TYPE_RINGTONE_FLIPPED
public static final String VIBRATOR_TYPE_RINGTONE_FOREST_DAY
public static final String VIBRATOR_TYPE_RINGTONE_FREE
public static final String VIBRATOR_TYPE_RINGTONE_HALO
public static final String VIBRATOR_TYPE_RINGTONE_HARP
public static final String VIBRATOR_TYPE_RINGTONE_HELLO_YA
public static final String VIBRATOR_TYPE_RINGTONE_MENUET
public static final String VIBRATOR_TYPE_RINGTONE_NEON
public static final String VIBRATOR_TYPE_RINGTONE_NOTES
public static final String VIBRATOR_TYPE_RINGTONE_PULSE
public static final String VIBRATOR_TYPE_RINGTONE_SAILING
public static final String VIBRATOR_TYPE_RINGTONE_SAX
public static final String VIBRATOR_TYPE_RINGTONE_SPIN
public static final String VIBRATOR_TYPE_RINGTONE_SUMMER_AFTERNOON
public static final String VIBRATOR_TYPE_RINGTONE_SUNLIT_GARDEN
public static final String VIBRATOR_TYPE_RINGTONE_SURGING_POWER
public static final String VIBRATOR_TYPE_RINGTONE_TUNE_CLEAN
public static final String VIBRATOR_TYPE_RINGTONE_TUNE_LIVING
public static final String VIBRATOR_TYPE_RINGTONE_TUNE_ORCHESTRAL
public static final String VIBRATOR_TYPE_RINGTONE_WESTLAKE
public static final String VIBRATOR_TYPE_RINGTONE_WHISTLE
public static final String VIBRATOR_TYPE_SYSTEMUI_NOTIFICATIONS_EXPAND
public static final String VIBRATOR_TYPE_SYSTEMUI_NOTIFICATIONS_LONG_PRESS
public static final String VIBRATOR_TYPE_SYSTEMUI_NOTIFICATIONS_MOVE
public static final String VIBRATOR_TYPE_SYSTEMUI_SCREEN_RECORD_STOP
public static final String VIBRATOR_TYPE_SYSTEMUI_SWITCHES_LONG_PRESS
public static final String VIBRATOR_TYPE_SYSTEMUI_SWITCHES_SORT_LONG_PRESS
public static final String VIBRATOR_TYPE_VIRTUALNAVIGATION_CLICK_BACK
public static final String VIBRATOR_TYPE_VIRTUALNAVIGATION_CLICK_HOME
public static final String VIBRATOR_TYPE_VIRTUALNAVIGATION_CLICK_MULTITASK
public static final String VIBRATOR_TYPE_VIRTUALNAVIGATION_LONGPRESS_HOME
public static final String VIBRATOR_TYPE_WALLET_TIME_SCROLL
public static final String VIBRATOR_TYPE_WATCH_ALARMCLOCK_NOTIFICATION
public static final String VIBRATOR_TYPE_WATCH_APPLICATION_MESSAGE_NOTIFICATION
public static final String VIBRATOR_TYPE_WATCH_BAROMETER_WARNING
public static final String VIBRATOR_TYPE_WATCH_BATTERY_CHARGING_SUCCESS
public static final String VIBRATOR_TYPE_WATCH_BLUETOOTHBREAK_WARNING
public static final String VIBRATOR_TYPE_WATCH_BREATHTAKE_SPEED1
public static final String VIBRATOR_TYPE_WATCH_BREATHTAKE_SPEED2
public static final String VIBRATOR_TYPE_WATCH_BREATHTAKE_SPEED3
public static final String VIBRATOR_TYPE_WATCH_CARDPAY_FAIL
public static final String VIBRATOR_TYPE_WATCH_CARDPAY_SUCCESS
public static final String VIBRATOR_TYPE_WATCH_CROWN_STRENGTH0
public static final String VIBRATOR_TYPE_WATCH_CROWN_STRENGTH1
This constant applies to the scenarios in which a user rotates the crown of a wearable to scroll or zoom the screen display, or rotates the crown of a wearable on the minus one screen or on its secondary details screen, on the Launcher grid and list, or on the card list.
public static final String VIBRATOR_TYPE_WATCH_CROWN_STRENGTH2
public static final String VIBRATOR_TYPE_WATCH_CROWN_STRENGTH3
public static final String VIBRATOR_TYPE_WATCH_EXCERCISE_HEARTBEAT_WARNING
public static final String VIBRATOR_TYPE_WATCH_EXERCISE_LONG_PRESS
public static final String VIBRATOR_TYPE_WATCH_EXERCISE_NOTIFICATION
This constant applies to the scenarios when notifications are received to remind users of the following:
public static final String VIBRATOR_TYPE_WATCH_EXERCISE_START_END_PAUSE
public static final String VIBRATOR_TYPE_WATCH_HEARTBEATHIGH_WARNING
public static final String VIBRATOR_TYPE_WATCH_LAUNCHER_LONG_PRESS
public static final String VIBRATOR_TYPE_WATCH_LOWBATTERY_WARNING
public static final String VIBRATOR_TYPE_WATCH_MESSAGE_NOTIFICATION
public static final String VIBRATOR_TYPE_WATCH_PHONEPAIR_REQUIRING
public static final String VIBRATOR_TYPE_WATCH_PHONEPAIR_SUCCESS
public static final String VIBRATOR_TYPE_WATCH_POWER_OFF
public static final String VIBRATOR_TYPE_WATCH_POWER_ON
public static final String VIBRATOR_TYPE_WATCH_REMOTECAMERA_LONG
public static final String VIBRATOR_TYPE_WATCH_REMOTECAMERA_SHORT
public static final String VIBRATOR_TYPE_WATCH_SITLONGTIME_NOTIFICATION
public static final String VIBRATOR_TYPE_WATCH_SPARETYPE_STRENGTH1
public static final String VIBRATOR_TYPE_WATCH_SPARETYPE_STRENGTH2
public static final String VIBRATOR_TYPE_WATCH_SPARETYPE_STRENGTH3
public static final String VIBRATOR_TYPE_WATCH_SPO2MEASURE_FINISH
public static final String VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH0
public static final String VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH1
public static final String VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH2
public static final String VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH3
public static final String VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH4
public static final String VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH5
public static final String VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH6
public static final String VIBRATOR_TYPE_WATCH_SYSTEMTYPE_STRENGTH7
public static final String VIBRATOR_TYPE_WATCH_SYSTEM_EMERGENCY_WARNING
public static final String VIBRATOR_TYPE_WATCH_TILES_LONG_PRESS
public static final String VIBRATOR_TYPE_WATCH_TIMER_NOTIFICATION
public static final VibrationPattern createSingle(int duration, int intensity)
This method is used to control a vibrator to vibrate at a specified intensity
throughout a specified duration. Its return result is used to pass a value to the
VibrationPattern parameter in the
VibratorAgent.start(int, VibrationPattern) method to
customize the effect of a one-shot vibration.
duration - Indicates the duration of a one-shot vibration, in milliseconds. The value
range is 0-1800000 ms (30 minutes).intensity - Indicates the vibration intensity. The value range is 0–255.VibratorAgent parameter for a custom vibration.VibratorAgentpublic static final VibrationPattern createPeriod(int[] timing, int[] intensities, int count)
This method is used to control a vibrator to vibrate for specified counts at a given
intensity based on the timing sequence. When the specified number of counts is reached,
the vibrator stops vibrating. Its return result is used to pass a value to the
VibrationPattern parameter in the
VibratorAgent.start(int, VibrationPattern) method to
customize the effect of a periodic vibration.
timing - Indicates the timing sequence for the vibration, in milliseconds. The timing
sequence is presented by alternating values in an array. The first value in the array is
the period to wait before vibrating, the second value in the array is the duration that
the vibration lasts, and so on. The value range is 0-1800000 ms (30 minutes), and the
total vibration duration cannot exceed 1800000 ms (30 minutes). For example,
timing sequence array {1000,2000,2000,1000} represents that the vibrator stops vibration
for 1000 ms, vibrates for 2000 ms, then stops for 2000 ms, and vibrates again for 1000 ms.intensities - Indicates the vibration intensity. The value range is 0–255. The values
for the vibration intensity are set in accordance with the values for the timing sequence.
For example, the timing sequence array is {1000,2000,2000,1000} and the vibration
intensity array is {120,200,110,125}. When the vibrator stops vibration, values 120
and 110 in the intensity array are invalid; when the vibrator is vibrating,
values 200 and 125 are valid and the vibration lasts 2000 ms and 1000 ms,
respectively.count - Indicates the number of times for the vibrator to repeat vibration. The value
range is 0–100.VibratorAgent parameter for a custom vibration.VibratorAgentpublic static final VibrationPattern createPeriod(int[] timing, int count)
This method is used to control a vibrator to vibrate for specified counts based on the
timing sequence. When the specified number of counts is reached, the vibrator stops
vibrating. Its return result is used to pass a value to the VibrationPattern
parameter in the
VibratorAgent.start(int, VibrationPattern) method to
customize the effect of a periodic vibration.
timing - Indicates the timing sequence for the vibration, in milliseconds. The timing
sequence is presented by alternating values in an array. The first value in the array is
the period to wait before vibrating, the second value in the array is the duration that
the vibration lasts, and so on. The value range is 0-1800000 ms (30 minutes), and the
total vibration duration cannot exceed 1800000 ms (30 minutes). For example,
timing sequence array {1000,2000,2000,1000} represents that the vibrator stops vibration
for 1000 ms, vibrates for 2000 ms, then stops for 2000 ms, and vibrates again for 1000 ms.count - Indicates the number of times for the vibrator to repeat vibration. The value
range is 0–100.VibratorAgent parameter for a custom vibration.VibratorAgentpublic int getIntensity()
public void setIntensity(int intensity)
intensity - Indicates the vibration intensity. The value range is 0–255.public int getCount()
public void setCount(int count)
count - Indicates the vibration counts. The value range is 0–100.public int getDuration()
public void setDuration(int duration)
duration - Indicates the duration in which the one-shot vibration lasts, in
milliseconds.public int[] getIntensities()
public void setIntensities(int[] intensities)
intensities - Indicates the array of vibration intensities of the vibrator.public int[] getTiming()
public void setTiming(int[] timing)
timing - Indicates the array of the timing sequence of the vibrator.