I have some custom logic that do the same sound as in notifications when some event appears, and if it's silent or vibrate mode I do vibration.
So I have two questions:
Is it possible to call some function that will do notification sound or vibration the same as in notifications depends on current ringer mode?
If not is it possible to call vibration with the same pattern as in notifications? I'm looking for pattern e.g
new long[] {0, 100, 100, 100}
maybe somebody has seen it in android sources?