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

```
First Method:

You can turn on the screen light first then vibrate.

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

```

It is tricky, but works.

Second Method:

1. Create a service application which is receive data from server
2. Create your UI app which need to launch for desired feature.
3. Make reference in UI app which points to service app
4. When Service receives data from server, then it will vibrate and lunch the UI app.

In Service app,

```
var alarm = new tizen.AlarmRelative(10);
var service = new tizen.ApplicationService("http://tizen.org/appsvc/operation/view","http://www.tizen.org");
tizen.alarm.add(alarm, "org.your.app.id", service);
console.log("Alarm added with id: " + alarm.id);

```

5. If you need to send data from Service app to UI app, then use message port.