kSystemSoundID_Vibrate when haptics not available
Haptics not work when screen is locked, as mentioned in #94 which is not merged. So, play kSystemSoundID_Vibrate, when haptic engine not works.
@benjamindean and what's wrong with that? What is the default behavior?
@benjamindean and what's wrong with that? What is the default behavior?
Users should be able to vibrate with only duration. And duration can be of any value.
OK, will revert it. But... It is not possible to support background vibrations automatically. Apply my first commit in this PR, write a simple app which vibrates when You would use compass or whatever, on iPhone ofcourse, press or swipe to go to home screen... App should vibrate using KSystemSoundID_VIbration, or whatever... but, the plugin did not receive an exception from CHHaptic. It sometimes happens when CHHaptic works when you're switching to another app, home screen or locking the screen. The best idea is to add legacy parameter, but the flutter programmer should know when the app is not shown, then decide to vibrate using Core Haptics only when the app is visible, othervise with legacy: true parameter.