Custom notifications and alerts on mobile for Android, IOS

We get lot of notifications, alerts as message, sound and vibrations on our smartphone. These notifications are for a particular app. When app is configured to receive notifications and some update is there we receive an alert in form of message, popup, notification, vibration, light or sound. Like in case of popular Whatsapp app we receive sound for the tone we have set, vibration and blinking light when we receive a message. In this article I am covering how to create custom notifications or alerts for your own things. This would require some coding and some usage of apps. If you can create a smartphone app then this article is not for you. If you want to do it without creating a smartphone of your own then by using existing apps this can be done.

What kind of alerts we are talking about?

Website form filled, website visitor, website visit count, Facebook page count, website down and more. Things you want to monitor or get stats and to which you have access. For different requirements different setup should be done to populate RSS Feed table.

What is required?

PHP, MySQL, RSS Reader app (with notification functionality)

What is Idea behind custom notifications and alerts?

Idea is to create a RSS Feed and RSS reader app will read your personalized feed and alert you. You will populate RSS Feed for your alerts using PHP, MySQL.

How to create custom notifications and alert?

RSS Feed Item table in database is required. This table will hold all alert items. Create a page on this Item Table server which will add item to this table. Call this page from different applications or server using CURL or get url functions along with parameters (these parameters will be alert data). Next create RSS Feed from this Item Table. Use this RSS Feed URL to put in RSS Reader app (this app should have notification features). When this app will read your Feed it will notify/alert for new items in feed. This way you have information on what you are tracking. Generally this RSS Feed app should have notification feature, schedule reading of feed (by providing time interval).

If you want to monitor multiple things then provide an identifier in Item Table. Update RSS Feed logic accordingly to fetch items as per identifier. In RSS Reader provide URL with this identifier to have different feeds.

To track different things required setup has to be done.

  • To get alerts when user fill forms: When you insert data in database after that make a call to Item Add Page using CURL and pass parameters with data you want in Feed
  • When users visit a page: When page is loaded then make a call to Item Add Page using CURL and pass parameters with data you want in Feed (this may result in many items in Item table based on user visits)
  • Website Down: From a different server ping your website and when it is down make a call to Item Add Page using CURL and pass parameters with data you want in Feed
  • Facebook Like: Run a cron job to monitor changes in number of Facebook Like and when change is there make a call to Item Add Page using CURL and pass parameters with data (number of Likes and date) you want in Feed
  • Calendar: This functionality is present as App in smartphones but if you want to create your own custom alerts then create something like calendar functionality in your website and fill your Item table when some event is there is calendar (need to use cron jobs and other functionalities to create/read calendar)

Leave a Comment