Question: For example: Given a string, return an object containing tallies of each letter.
 letterTally('potato'); // {'p':1, 'o':2, 't':2, 'a':1}

Here is what I have so far, but it's not working:

```js
var letterTally = function(str, obj) {
  var length = str.length;
  var current = str.charAt(0);
  if (length === 0) {
    return obj;
  } else if (obj[current]) {
    obj[current] ++;
  } else {
    obj[current] = 1;
  }

  return letterTally(str.slice(1), obj);

};
```

Answer: 
The following method:

You can turn on the screen light first then vibrate.

```
tizen.power.turnScreenOn();
navigator.vibrate(1000);

```

doesn't work quite yet. I had to add a delay for the vibration:

```
tizen.power.turnScreenOn();
setTimeout(function (){
    navigator.vibrate(1000);
}, 500);

```

EDIT: Also add from the other answers to the config.xml file,

```
<tizen:setting background-support="enable" background-vibration="enable" />
<tizen:privilege name="http://tizen.org/privilege/power"/>

```
This works for me.

Find the `application.lauch` parameter id in your **config.xml**.

See the example below and the desired privilege and settings.

**config.xml:**

```
<tizen:application id="SHrC13kzHD.Alarm" package="SHrC13kzHD" required_version="2.3.2"/>
<tizen:privilege name="http://tizen.org/privilege/power"/>
<tizen:privilege name="http://tizen.org/privilege/internet"/>
<tizen:privilege name="http://tizen.org/privilege/notification"/>
<tizen:privilege name="http://tizen.org/privilege/application.launch"/>
<tizen:setting background-support="enable" encryption="disable" hwkey-event="enable"/>

function multiVibration() {
  tizen.power.turnScreenOn();   
  tizen.application.launch("SHrC13kzHD.Alarm", onsuccess);
  function onsuccess() {
    console.log("Application launched successfully");
  }
  /* Vibrate SOS */
  setTimeout(function (){  navigator.vibrate([100,30,100,30,100,200,200,30,200,30,200,200,100,30,100,30,100]);
    }, 500);
}

//test
multiVibration();

```