Vibration not working with build pipeline

Hi there,

I encountered this Bug:

Testing the mobile vibration example project in web on my phone works fine.
But when I open the example on my PC and build the sample game (with the given build pipeline “Export to Android”), my phone doesn’t vibrate. :disappointed_relieved:

Because it is the same game there must be going something wrong in the build pipeline, I suggest. :thinking:

Any ideas or workarounds?
OniGiri

p.s. I have tested this with 2 different phones (Samsung [Android 6.0.1] and Huawei [Android 7.0] - same problem on both devices: browser vibrating, apk not vibrating)

1 Like

In the case of manual export, you need to add the cordova plugin for the resource you will use in the application.

For example to add the vibration feature:

cordova plugin add cordova-plugin-vibration

Follow the official link of the cordova website if you have more questions about the plugins:

I hope I have helped those who still have this problem.

Nope that’s not true. Here it works from the browser, so it is clearly using a web API. No need to install any plug-in. This sounds like a Cordova bug.

Oh, never mind, Cordova needs that plug-in apparently. I’ll add it as a dependency once my extension dependency PR is finished and merged

1 Like