Playmaker Updates & Downloads > Share New Actions

Android Vibrate Advance

(1/2) > >>

2x Action to set custom vibrations on an Android phone.

Android Vibrate Advance
Option 1. Set the length of vibration in milliseconds
Option 2. Set a vibration pattern in milliseconds with a loop(repeat).

Android Vibrate Advance Array
Using: ArrayList - Only for pattern setup with a loop(repeat). Set a pattern from an int array

Android Vibrate Advance Array2
Using: Array - Only for pattern setup with a loop(repeat). Set a pattern from an int array

Pattern setup:
If set incorrectly, you may get odd behavior(s) as a result!

How does it work:
Element 0 = 0 (start the pattern - Gap in vibration)
Element 1 = Vibrate
Element 2 = Gap in vibration
Element 3 = Vibrate
Odds are the vibrate and evens are the gaps.

The first index(first pattern) is the start of the pattern and it is a gap. Meaning that 0 is an immediate start. You can delay the start of the vibration by setting the first index to xxxms. Then it is vibrate - gap - vibrate - gap etc.

Repeat: 0 means repeat the pattern starting at the beginning (loop). -1 means repeat/loop is off. Anything above >0 is the amount of times it will vibrate the pattern.

Action Options
Cancel vibration: Will cancel the current vibration. You need to re-enter the action with 'cancel vibration' fsmbool set to true. Do not do this immediately after calling vibrate as it may not have time to even begin vibrating.

Disable Sleep Timeout: When the phone goes to sleep / lock, the vibration will stop. When set to true, the phone will not sleep. Use the 'SetSleepTimeOut' action to reset to whatever setup you need after the vibration is finished.

action in Ecosystem or

A big thanks to PlaymakerNOOB for all his feedback and advice.

Works great!  Love it!  Thanks!!!!

*** Update bump

Got my hand on an Android phone and the cancel vibration was not working. It is now working. Updated in ecosystem..

AndroidVibrateAdvanceArray.cs is designed for use with playmaker arraymaker proxy, but since 1.8 we dont need those anymore.  Can this be updated to no longer need the proxy?

Ok... hope your wrong cause i still use ArrayList due to the inspector control and hashtable. I will make another action for the array.


[0] Message Index

[#] Next page

Go to full version