vibration

how to use Vibration while recording iphone5 IOS?

二次信任 提交于 2019-11-28 13:50:46
I am working on a iphone5 app and i need some advice on the vibration motor. i goggled the things but cant find how can i manually rotate my iPhone from the code.please guide me... or give any link or ideas.. What i want to do is vibrate the phone while recordign the video . but my problem is when i start the vibration it cant recrod the video.. i found that it will not work when audio is capturing running.. so i tried with mute the sound while recording but its not working still following is my code.. // // APPViewController.m // // // Created by Rafael Garcia Leiva on 29/04/13. // Copyright

How do you make the iPhone vibrate for arbitrary durations?

假装没事ソ 提交于 2019-11-28 05:06:17
In the iPhone 2.x firmware, can you make the iPhone vibrate for durations other than the system-defined: AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); In jailbroken phones, you used to be able to use the MeCCA.framework to do this: http://pastie.org/94481 MeCCA_Vibrator *v = new MeCCA_Vibrator; v->activate(1); sleep(5); v->deactivate(); But MeCCA.framework doesn't exist on my 2.x iPhone. KevinButler Yes, this is something that has caused AppStore rejections in the past, and probably will again...which means it is still possible to do it. Answering my own question, here's how to do it:

Reducing wiimote pitch/roll variations

两盒软妹~` 提交于 2019-11-28 02:20:28
I want to use the wiimote to control a cursor WITHOUT the infrared sensor bar. I'm using the pitch and roll values for this. The problem is that when the pitch is close to 0 degrees, the roll is very unstable, and when the pitch is close to 90 degrees, it is itself very unstable, but the roll is fine. Im polling the wiimote very frequently, so im averaging the last 20 values for both pitch and roll, and I can get the cursor to go where I want. The only problem is that there is still alot of uncontrolable shaking. Any ideas on how I can reduce it? (Or even get a more precise position without

iPhone - How do I know if the vibrate is on or off for iOS?

☆樱花仙子☆ 提交于 2019-11-27 14:00:07
问题 Do you know how I may know if the iPhone is on vibrate mode ? I don't find anything about this on the Web... Too tired to see ? I want to display an icon in the app so that the user can know looking at it if the phone is on vibrate mode or not. Tha app has also different behaviours depending on if the user wants to be disturbed (vibrate off) or not (vibrate on). Thank you. 回答1: You should be able to achieve this using: #import "AudioToolbox/AudioToolbox.h" - (void) ifSilentModeThenShowIcon {

How to enable haptic feedback on button view

天大地大妈咪最大 提交于 2019-11-27 10:30:04
问题 I want to add haptic feedback to my application's buttons and control them programmatically to show button state (enabled and disabled). The default haptic feedback setter works only for long press. How can i make it work for simple button clicks. And is there a way to have haptic feedback on events like touch move? 回答1: Here is an answer, though it might not be the best implementation: import android.view.View; import android.os.Vibrator; public class Main extends Activity implements

Vibration listener in Android

﹥>﹥吖頭↗ 提交于 2019-11-27 08:47:35
问题 Is it possible to listen for phone vibration in Android? Basically, I need my background component to wake-up and do some stuff whenever the phone vibrates. 回答1: Is it possible to listen for phone vibration in Android? Sorry, no, not without custom firmware. 来源: https://stackoverflow.com/questions/7343366/vibration-listener-in-android

how to use Vibration while recording iphone5 IOS?

人走茶凉 提交于 2019-11-27 07:57:41
问题 I am working on a iphone5 app and i need some advice on the vibration motor. i goggled the things but cant find how can i manually rotate my iPhone from the code.please guide me... or give any link or ideas.. What i want to do is vibrate the phone while recordign the video . but my problem is when i start the vibration it cant recrod the video.. i found that it will not work when audio is capturing running.. so i tried with mute the sound while recording but its not working still following is

How to make iPhone vibrate using Swift?

本小妞迷上赌 提交于 2019-11-27 05:59:01
I need to make the iPhone vibrate, but I don't know how to do that in Swift. I know that in Objective-C, you just write: import AudioToolbox AudioServicesPlayAlertSound(kSystemSoundID_Vibrate); But that is not working for me. Steve Rosenberg Short example: import UIKit import AudioToolbox class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate)) } } load onto your phone and it will vibrate. You can put it in a function or IBAction as you wish. Adam Smaka In iOS 10 on iPhone 7 or 7 Plus, try: let

Disable vibration for a notification

二次信任 提交于 2019-11-27 02:32:07
问题 I'm writing an app using notification. Google developer guidelines encourages developers to provide settings to customize the notifications (disable vibration, set notification sound...), so I am trying to disable vibration for notifications if the user set it that way. I am using NotificationCompat.Builder to create the notification, like this: NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(Application.getContext()) .setDefaults(Notification.DEFAULT_ALL)

How do you make the iPhone vibrate for arbitrary durations?

我的梦境 提交于 2019-11-27 00:47:17
问题 In the iPhone 2.x firmware, can you make the iPhone vibrate for durations other than the system-defined: AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); In jailbroken phones, you used to be able to use the MeCCA.framework to do this: http://pastie.org/94481 MeCCA_Vibrator *v = new MeCCA_Vibrator; v->activate(1); sleep(5); v->deactivate(); But MeCCA.framework doesn't exist on my 2.x iPhone. 回答1: Yes, this is something that has caused AppStore rejections in the past, and probably will