BerryFarm / berrymuch

🍇 Power user Unix distribution for Blackberry 10
50 stars 10 forks source link

Triggering Notifications #74

Open sw7ft opened 3 months ago

sw7ft commented 3 months ago

This is how you can trigger notifications, you can use this to build programs with bash or python that also allow for notifications. For example, i run a couple of bash programs that connect to an api, the bash program runs a loop checking for messages and if new messages are found i send a notifcation to the blackberry hub.

echo "msg::notify\ndat:json:{\"itemid\":\"yourItemIdHere\",\"title\":\"YourTitle\",\"subtitle\":\"YourSubtitle\",\"target\":\"YourTarget\",\"targetAction\":\"YourTargetAction\",\"payload\":\"YourPayload\",\"payloadType\":\"YourPayloadType\",\"payloadURI\":\"YourPayloadURI\"}" >> /pps/services/notify/control