For an example:
Code: Select all
// This is a sample code for a basic rule you can create.
// When the script is saved, the code is pushed to the Android phone and pops a "Hello World" notification.
// Trigger the function when the screen unlocks
device.screen.on("unlock", function(){
var notification = device.notifications.createNotification('Hello world!');
notification.show();
console.log('Hello World notification was sent to the phone');
});
The api is very simple and easy to use.
I thought that you guys might like this, so I posted it
You can get more information about the app and get the app here: on{x} homepage
The documentation can be found here: on{x} docs