vibration

Intensity of custom iPhone vibration

只谈情不闲聊 提交于 2019-12-04 13:27:30
问题 This is a question related to Are there APIs for custom vibrations in iOS?. I am able to create custom vibration patterns, but have no control over the intensity. This is copied over from Kevin Cao's answer that enables custom vibration patterns: NSMutableDictionary* dict = [NSMutableDictionary dictionary]; NSMutableArray* arr = [NSMutableArray array ]; [arr addObject:[NSNumber numberWithBool:YES]]; //vibrate for 2000ms [arr addObject:[NSNumber numberWithInt:2000]]; [arr addObject:[NSNumber

How to provide customized vibration on specific incoming calls

六月ゝ 毕业季﹏ 提交于 2019-12-04 08:56:12
问题 The program functions like this: the user has a list of phone numbers, for which the cellphone could vibrate upon an incoming call only when no other system-wide application would provide vibration (such as in mute mode). I know that this is somehow against the rules, for that an application should respect the users' settings, but the application is limited to some certain users with this need. I have tried two ways but neither of them are satisfying: Listen to the telephony state and

Detect the device is vibrating?

旧巷老猫 提交于 2019-12-03 14:34:44
I have used the below code to vibrate the device. public void vibrator() { try { Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); vibrator.vibrate(5000); } catch (Exception e) { Log.d(TAG, "vibrator exception: " + e); } } Can we programmatically detect this event (check is device vibrating)? antoniodvr No, you can't. Same question is here . You can check only if the device vibrating is supported: Vibrator mVibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); boolean hasVibrator = mVibrator.hasVibrator(); See more: Android Vibrator Introduction The

iOS switch off vibrate on silent programmatically [Private API]

空扰寡人 提交于 2019-12-03 14:30:33
I would like to keep my iPhone from vibrate when it's on Silent Mode even when it is ON in settings. I want to do it programmatically from an App. This is for me, so I can use a private API. Is there an api which manage Sounds in Settings? Do you know any solution? Thank you, Flo I think the following code can do the trick. You need to trigger it from somewhere though (haven't understand if you want it to be fired with the button or from within an app). NSString *sbPath = @"/var/mobile/Library/Preferences/com.apple.springboard.plist"; NSMutableDictionary *sbDict = [[NSMutableDictionary alloc]

Vibrate iPhone 6S manually like peek and pop?

自古美人都是妖i 提交于 2019-12-03 07:40:31
How can I manually trigger a single click-like vibration like the ones that happen when using peek&pop, or application shortcuts? It seems that these guys have found a way to do it for iOS 9 for phones with Taptic Engine (including the iPhone 6S). http://unifiedsense.com/development/using-taptic-engine-on-ios.html I'm not sure if it applies to iOS 8 or any other phones. They've essentially retrieved the Taptic Engine interface from UIDevice and called actuateFeedback with an integer corresponding to Peek or Pop. Unfortunately these apps would likely be rejected by the App Store, if that's your

Make the wearable vibrate from within an android wear app [closed]

做~自己de王妃 提交于 2019-12-03 06:02:58
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm writing a simple wearable app to my LG watch that sends vibrations to the watch on constant intervals and show some mock data. Although I've looked for an answer, I could't find a way to make the watch vibrate. Any help would be appriciated. 回答1: @Drew, thank you! If anyone else is interested, here's a code

How to provide customized vibration on specific incoming calls

若如初见. 提交于 2019-12-03 01:25:45
The program functions like this: the user has a list of phone numbers, for which the cellphone could vibrate upon an incoming call only when no other system-wide application would provide vibration (such as in mute mode). I know that this is somehow against the rules, for that an application should respect the users' settings, but the application is limited to some certain users with this need. I have tried two ways but neither of them are satisfying: Listen to the telephony state and directly trigger the vibration service with my own pattern (with Vibrator.vibrate() ). This method is

Android; detect if the Vibrate setting in the device is on or off, esp for the case when it rings but does not vibrate

孤人 提交于 2019-12-02 18:31:41
问题 App requirement: To detect when a phone is on Ringing mode with the Vibrate Setting being OFF so the problem comes down to : detect whether the Vibrate Setting is OFF or ON Relevant information: To start with, Vibrator has no method like isVibratorModeOn() and the Flags related to Vibrate and EXTRA_VIBRATE_... are all marked deprecated with: This constant was deprecated in API level 16. Applications should maintain their own vibrate policy based on current ringer mode that can be queried via

How to cancel the timer and renew the same timer?

拜拜、爱过 提交于 2019-12-02 11:55:19
问题 I am creating an app that vibrate and beep every 30 sec and when I log out the vibrate and beep must be cancelled and when I log in the vibrate and beep should resume. NOTE: it must vibrate and beep for every 30 sec until I log out In my app I am using TimerTask for this implementation this is the code for vibrate and beep using TimerTask static TimerTask Task; final static Handler handler = new Handler(); static Timer t = new Timer(); public static void vib() { Task = new TimerTask() {

Android; detect if the Vibrate setting in the device is on or off, esp for the case when it rings but does not vibrate

无人久伴 提交于 2019-12-02 08:12:38
App requirement: To detect when a phone is on Ringing mode with the Vibrate Setting being OFF so the problem comes down to : detect whether the Vibrate Setting is OFF or ON Relevant information: To start with, Vibrator has no method like isVibratorModeOn() and the Flags related to Vibrate and EXTRA_VIBRATE_... are all marked deprecated with: This constant was deprecated in API level 16. Applications should maintain their own vibrate policy based on current ringer mode that can be queried via getRingerMode(). But under getRingerMode() , we won't exactly know if the vibrate setting is off or not