How to shake a phone (vibration)

Hi guys!

How to shake an iOs device?

system.vibrate() does not work?

Currently I am focused on iOs devices, not Android…

Thanks!
Ivan

wiggle it?

There is a plugin for that:

https://marketplace.coronalabs.com/plugin/vibrator

Per docs only iPhone 7 and iPhone 7+ can vibrate. So I will skip it for now.

Thanks Ed.

Bummer

system.vibrate() should work. You can’t control how hard or how long, but it works. I’ve used it in games before. 

Rob

It did not worked on my iPad 2 mini…
I will test it on iPhone 4S.

Do you think it depends on Volume user selects or…

I will say this a apple limitation, not a corona limitation. Apple added Taptic engine api in iOS 10( which is still pretty limited) and only for iPhone 7 and 7+. Which does not make any sense to me, because iPhone 6s and 6s + have Taptic engines inside them. 

Android requires a permission:  “android.permission.VIBRATE”

Other than that system.vibrate() should work. I just tested it on my iPhone 6 running iOS 10.2.1 and it worked as expected.

Rob

wiggle it?

There is a plugin for that:

https://marketplace.coronalabs.com/plugin/vibrator

Per docs only iPhone 7 and iPhone 7+ can vibrate. So I will skip it for now.

Thanks Ed.

Bummer

system.vibrate() should work. You can’t control how hard or how long, but it works. I’ve used it in games before. 

Rob

It did not worked on my iPad 2 mini…
I will test it on iPhone 4S.

Do you think it depends on Volume user selects or…

I will say this a apple limitation, not a corona limitation. Apple added Taptic engine api in iOS 10( which is still pretty limited) and only for iPhone 7 and 7+. Which does not make any sense to me, because iPhone 6s and 6s + have Taptic engines inside them. 

Android requires a permission:  “android.permission.VIBRATE”

Other than that system.vibrate() should work. I just tested it on my iPhone 6 running iOS 10.2.1 and it worked as expected.

Rob