Vibrator

It’s clearly the vibrator plugin and not the texttospeech plugin.

I removed the vibrator plugin from the app ->NO SUCCESS

I removed the vibrator plugin from build settings ->SUCCESS

I have tried both this:

 plugins = { ["plugin.vibrator"] = { publisherId = "com.spiralcodestudio", supportedPlatforms = { iphone=false, android=true } }, },

And this:

 plugins = { ["plugin.vibrator"] = { publisherId = "com.spiralcodestudio", supportedPlatforms = { iphone=true, android=true } }, },

Both fails. I have to remove the line completely for the app to build.

This fails as well:

 plugins = { ["plugin.vibrator"] = { publisherId = "com.spiralcodestudio" }, },

Corona Simulator 2016.2980, freshly deauthorized/reautorized.

Thanks, for reporting. I am looking into that since yesterday. The problem is that I use same utility files in many plugins, which collide with each other when app is built using several of them. It should be easy to fix, just need to find the right solution.

Ok, thanks!

Try now.

Hi,

I’ve just tried again. With 2980. Deauthorized and logged in again to be sure to get the latest version of the plugin.

Unfortunately I still get a linker error (log attached).

runewinse, thanks, I’ll fix soon.

runewinse, please try now.

Lerg, now it seems to link ok! Haven’t tried if the vibrator functionality works though… But I will, when I get my hands on some iOS devices.

Thanks!

Hmm… I’m getting the same linking error again. Is it somehow related to the recent fixes in texttospeech?

Corona SDk 2987, and Sierra MacOS

runewinse, yes! Will fix asap.

Fixed, please test.

Tested ok. Thanks!

Hi Lerg!

I’m thinking about using the plugin but just wanted to know what happens if I call .vibrate() on a device that can’t vibrate. Does the plugin handle those situations without additional measure like .hasVibrator()?

Also, I’m curious if those functions could be used like haptic feedback on Android devices if I keep the duration short?

Hi!
It won’t vibrate if you call .vibrate() on a non supported device.

The minimal duration and it’s feel highly depends on the device, generally I wouldn’t recommend using vibration for haptic feedback.

Just to be sure, it won’t cause a runtime error or anything that would break the game, right?

It didn’t break my game, but you should check vibrator.hasVibrator() nevertheless


Some of my players (very, very small percentage) get the following message:

Runtime Error

java.lang.NullPointerException: Attempt to read from field ‘android.os.VibrationEffect com.android.server.Vibrator Service$Vibration.mEffect’ on a null object reference

I don’t really know what that message wants to tell me, as I am just calling “vibrator.vibrate(int between 1 and 10)”

And I know that these players have already had a few vibrations, so it should work in general.

Updated the plugin with a fix for Android 8.0 crash. Please update your apps.

Google deprecated a method I was using and apparently broke it.

Congrats on the release Lerg!

Thanks for a great plugin!

Is there any example code to use the Haptic feedback feature? I would love an example to show what’s possible