Monaca Onsen UI Discord Chat Github Repo

Vibration in Monaca

  • Hello

    I have been struggling with monaca trying to get my phone vibrate but it doesnt seems to work.
    Even the HelloWorld example doesnt vibrate and I have checked all.

    The phone I am using is a Samsung S4 that actually vibrates with normal JavaScript code:


    but when I try it in a Monaca App, it doesn’t work.

    Someone knows what I am doing wrong? Thank you

  • @Racafe I just tested this and it worked on a Samsung Galaxy S6.

            window.fn = {};
            window.fn.vibrate = function() {
        <ons-button onclick="fn.vibrate()">Vibrate</ons-button>

    Maybe try using brackets around your time.

  • Your solution works!!! Thank you!!