The PushSend application sends secure (i.e. HTTPS) notification messages from RISC OS applications, usually to your mobile phone, via Pushover. The notification contains a string.
The AcornSSL module is used to handle the secure communication.
Information required for the application is stored as environment variables, set up in the !Run file, so can be altered to suit once you have created your Pushover application (an easy process).
When the app is run, it sends a message to Pushover notifying startup, and it sits on the icon bar waiting for a Wimp message, whereupon it sends a web message to Pushover.
You will need to download a Pushover app for your mobile phone (Android or iOS) or browser (Chrome, Firefox or Safari). The Android app is available from the Google Play Store; the iOS app is available from the App Store. The browser app is available from the Pushover website, https://pushover.net
You must create your own Pushover application. For this you will have to sign up to Pushover. You will get a free period of 7 days, after which, if you wish to continue to use the service, you will need to pay. Currently this is a one-time payment of a few pounds. Creating the app is very easy; instructions are on the Pushover web site and there is no point in repeating them here. You will need to copy the User Key and the App Token, both of which are long random-looking strings, because the are needed by PushSend (this RISC OS application) to communicate specifically with your Pushover application and thereby send the notifications to your device. See below.
Pushover asks for a PNG app icon. They don't make it very clear that this is optional. I've provided a PNG of a RISC OS cog along with this app in case you want to remind yourself that the notification has come from a RISC OS system.
PushSend$ServerName is the address to send the web request to - this is api.pushover.net and you should not alter it.
PushSend$HostName is the host you're sending to - this is /1/messages.json and you shouldnot alter it.
PushSend$ServerPort is the port number: 443, for HTTPS. You should not alter it.
PushSend$UserKey is the very long User Key that Pushover generated for you when you registered your application.
PushSend$AppToken is the very long App Token that Pushover generated for you when you registered your application.
To make it easy to send these notifications from BASIC, use NotifyLib. There is a minimal test application called Test01, which should make clear what to do. There are four steps:
1) LIBRARY <PushSend$Dir>.NotifyLib
3) Ensure that the PushSend app is running (should be visible on the icon bar).
4) To send a message: PROCpushsend_send_message("Here is my message")
Note that PROCpushsend_send_message sends a Wimp message, which can only be done from within a Wimp application.
Send a Wimp UserMessage (i.e. 17), with message action &89DC40 in block + 16, and your control-terminated message string in block + 20 onwards, and the length of the block in block + 0 (21 to 256, including the terminating character, a whole number of words). This limits the length of the message to 235 characters maximum plus the terminator.
You can download PushSend here.
0.07 2019 December 27 First issue
Page last updated 2019 December 27