Page 1 of 1

trigger a notification.

Posted: Mon Jul 13, 2015 1:18 pm
by TonyS

Is is possible for a notification to be triggered without logging it the system or setting up a schedule?

I have a db connected to my app that is maintained separately. When data changes on that db I want to send a notification instantly to one person. Is this possible?


trigger a notification.

Posted: Mon Jul 13, 2015 2:40 pm
by Bruce Stuart

Tony,

I emailed you separately, however I believe, letting the experts chime in here as well :

  1. No need for a user to be logged in.

  2. If your data source is an Appery db it's easily handled via an appery server script.

  3. If the data source is not an Apperydb ... You can :

    a. From a stored proc on your source, can an appery service whose sole job is to do notifications to a 'user' ... And the parameter ot the script could be a customer Number, etc... Where at least at some level, you've joined the customers and their devices somewhere on the Appery platform .

    B. You could run an API call from the appery script that calls your platform ... And asks for a result set to be returned with device id's that need to receive a notification ....

    Both a and b answers above are dependent upon your app doing something 'special' when a device is used by one of your customers .... At startup you know that you , for both iOS and Android platforms will get visibility to the device ID through a local storage variable automatically through the Appery platform ( search the online docs for 'notification device ID local storage' to get the local storage variable name). You can take this device ID and either on the Appery collection .. Join device ID with customer identifier, or send a request to you other data source to update a similar collection on say a SQL lite db.

    Appery team please correct or revise.

    Best,
    Bruce


trigger a notification.

Posted: Mon Jul 13, 2015 2:44 pm
by Bruce Stuart

There's also choice C ... Run a script from your platform that calls an appery server script ... That takes an inbound parameter of deviceID, and your stored proc on your sql server db calls the Appery service Web script ( that you wrote ) to do simple notification to one or more devices ...based in that parameter...


trigger a notification.

Posted: Mon Jul 13, 2015 3:06 pm
by TonyS

Thanks Bruce:)


trigger a notification.

Posted: Mon Jul 13, 2015 3:24 pm
by TonyS

Actually the PHP route looks pretty straight forward (famous last words) haha