Created
May 21, 2014 01:27
-
-
Save joneilloine/cd54a3210081af56e3c1 to your computer and use it in GitHub Desktop.
Test push app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The Pusher | |
* | |
* Author: jesse | |
* Date: 2013-06-20 | |
*/ | |
// Automatically generated. Make future change here. | |
definition( | |
name: "The Pusher", | |
namespace: "joneilloine", | |
author: "jesse", | |
description: "Just a simple app that you can tap to trigger a push notification", | |
category: "My Apps", | |
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png", | |
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience%402x.png" | |
) | |
preferences { | |
section("Configure") { | |
input "message", "text", title: "What should the pusher push on you?", multiple: false, required: false | |
} | |
} | |
def installed(settings) { | |
log.debug "Installed" | |
subscribe(app) | |
} | |
def updated(settings) { | |
log.debug "Updated" | |
unsubscribe() | |
subscribe(app) | |
} | |
def appTouch (evt) { | |
log.debug "App Touched" | |
def m = message ?: "Pushy, push, push!" | |
sendPush(m) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment