benjamindean/flutter_vibration

Vibrate without user interaction

Closed this issue · 3 comments

Hi! how to vibrate without user interaction? i'm making flutter app that read qr codes, and i want vibrate as feedback once qr is readed.

The vibrate function is usefull when i tap a button or i have interaction with the UI, but if i call from a stream or subscription the vibration is not triggered.

Regards

Hey! Can you provide an example? It should work, but I suspect that when it comes to streams it might not due to some platform channel restrictions.

ok @benjamindean in couple of hours i will do it. And yes, event comes from a stream... Yesterday searching i found that haptic feedback only can be triggered with user interaction, so i think that is a api device restriction (but is only a supose, i didn't find it in official Android/Flutter page).

Have you been able to solve the issue? I will close it for now and will reopen if needed.