SMS Push Notifications in Worklight
ThejaswiniR 120000MVTD Visits (6888)
And if you are one of those curious ones who looked at the whats new section, you would have seen a lot of interesting new features.
One of the interesting features that has great potential in growth markets and elsewhere is the "Extended Notification API to support SMS notifications".
Okay, what exactly does it mean?
The feature is similar to the now ubiquitous push notification of smart phones albeit , in the form of SMS messages. This makes it possible for anyone to experience the advantages of push notifications, even to those who do want to use data network to get notified of information.
Now that you are excited about the feature, lets see a use-case where this could be used.
Lets say that you want to be cognizant of the balance changes of your bank account or about the stock prices of your favorite stock.
And you would want an app where you want to choose the services to subscribe.
In that case, using SMS notifications would make more sense because, you may not always be connected to internet, but would want to be informed.
I am sure that you now see the business value in it and are eager to know the details about it. So, lets deep dive into the nitty gritty of it.
The flow of the scenario can be easily understood by the referencing to the diagram below.
The show starts when a user wants to subscribe to a service(for example, the balance notification service of a bank). Using the app on the phone, the user subscribes to the service. This is step 1.
Next,in step 2, the app communicates with the Worklight server and passes the required information to the Worklight server and tells it that this user wants to be subscribed to the particular service. The Worklight server persists this information in a database of your choice(The database information needs to be provided in work
Later, whenever the balance is changed, the external service will intimate the Worklight server about the change and will request it to send the notification to the user. This is the step 3.
In step 4, The Worklight server verifies if the user is subscribed to the service and if he is indeed subscribed to the service, then it requests the 3rd party gateway to send the notification the notification to the mobile phone. The 3rd party gateway details are provided to the server in the SMSConfig.xml which is located in the server folder of the project.
The gateway then sends the SMS notification to the phone and the updates reaches the phone in an SMS message.
The API level details and a sample of it can be downloaded here.