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"/>

```
You can use Alarm. 

```
var appId = tizen.application.getCurrentApplication().appInfo.id; 
var alarm = new tizen.AlarmRelative(delay);
console.log('Setting relative alarm to ' + delay + ' seconds.');
tizen.alarm.add(alarm, appId);

```

Add this code fragment when your app receives information from server.