vibrate

    0热度

    2回答

    我在motionBegan函数内使用此代码。当我摇动我的设备时,它会震动。有没有办法增加延迟,以便在1秒钟之后振动开始? AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))

    0热度

    1回答

    我在xcode中创建了一个应用程序,该应用程序永远随着按钮振动,并停止使用按钮,但是当我在iPhone上测试它时,它不会振动。帮帮我? var timer: Timer? @IBAction func button1(_ sender: UIButton) { AudioServicesPlaySystemSound(kSystemSoundID_Vibrate) ti

    -2热度

    2回答

    我有这个代码可以让我的手机不断振动。但1次振动后停止。我的计时器有问题吗? var timer: Timer? @IBAction func button1(_ sender: UIButton) { AudioServicesPlayAlertSound(kSystemSoundID_Vibrate) timer?.invalidate() timer = Ti

    0热度

    1回答

    我正在使用加速器数据的cordova应用程序。但我需要该应用程序来了解由于手机振动而产生的加速,以便对其进行解释。 据我所知,有支持创建通过振动API在HTML5中的振动,但是有没有办法触发/监听与其他应用程序或操作系统触发的振动相对应的事件?

    0热度

    1回答

    用户是否开启或关闭屏幕我想通过振动通知用户。如果屏幕打开,这个效果很好: Vibrator vibrator = (Vibrator) getApplicationContext().getSystemService(Context.VIBRATOR_SERVICE); long sleep = 100; long vibrate = 500;

    0热度

    1回答

    我试图在android 4.4.2 webview应用程序上运行振动,它不起作用。我使用这个演示:Vibration API 。如果我在手机上运行代码(在Chrome浏览器上),它的工作非常好,但是如果我从android webview运行代码,它不起作用。 我在AndroidManifest.xml文件中添加权限: android.permission.INTERNET android.perm

    0热度

    2回答

    嗨,并且非常感谢大家对于已经很好地给予的帮助。首先让我说我从来没有使用android编程!我知道其他一些语言,但我最好是初学者。我被给了这个应用程序,以改变它从哔哔声振动。 thiyagab得这么好给我下面的代码: import android.os.Vibrator; ... Vibrator v = (Vibrator) this.getSystemService(Context.VIBR

    -2热度

    1回答

    我做一个定时器的内部应用程序(在Studio),当计时器达到0,其振动。我想使手机在屏幕锁定时仍然振动。有什么建议么? 这是我的主要活动: EditText timerWrite; ImageButton power; ImageButton check; TextView minsLeft; CountDownTimer countDownTimer =

    0热度

    1回答

    测试在Safari,我收到此错误: 未定义不是一个对象(评价“navigator.notification.vibrate”) 错误在模拟器或设备: 警告:998:未能建立健全,ERR = -50 我已经加入了插件到我的项目,通过试图再次添加它证实。我收到消息“已经被添加。” 感谢, 韦恩

    0热度

    2回答

    Android的震动我想建立一个简单的应用程序,用于振动上点击复选框后再次点击停止: 目前它看起来像这样: import android.content.Context; import android.os.Vibrator; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import