Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.
balajikadambi edited this page Jan 10, 2019 · 3 revisions

Welcome to the tag-based-push-notifications wiki!

Short Name

Tag based Push Notifications using IBM Mobile Foundation

Short Description

This code pattern shows how developers can leverage IBM Mobile Foundation service to implement tag based push notifications for hybrid mobile applications.

Offering Type

Cloud

Introduction

Push notifications have become integral part of mobile applications. For companies to advertise their latest offerings, or for banks or any of the financial institutions to alert customers on transactions, or to notify customers on any important announcements push notifications come in handy. Real time information like weather updates or travel related updates are very useful. If the customer installed a mobile application and subscribed to notifications, then it is the quickest and easiest way for businesses to convey a message to end user and request them to take action if needed. In this developer code pattern, we show you how to send tag based push notifications for hybrid mobile applications.

Author

By Devipriya Selvarajan and Balaji Kadambi

Code

https://github.com/IBM/tag-based-push-notifications

Demo

Work in progress..

Video

Work in progress..

Overview

This code pattern gives you step by step instructions for developing an Ionic/Cordova based hybrid mobile app that leverages Mobile Foundation service to implement tag based push notifications When you have completed this code pattern, you will understand: • How to achieve tag-based push notification using IBM Mobile Foundation

• How to create push notification tags on Mobile Foundation server using REST API

• How to send notifications using Mobile Foundation REST APIs.

• How to utilize Cloudant geospatial index queries to find a set of locations within a given radius of user location.

Flow

Architecture diagram - Tag based Push notifications

  1. User1 launches the mobile app, enters his/her credentials on the login screen or chooses social login to sign-in to the app. On successful login, the home page shows the grievances reported within a radius of 1000m of user's current location. User1 clicks open the 'Watch Area' page and selects a location in the map and clicks on ‘Receive notifications’. This invokes the push notification subscription API with the tag name same as the area name chosen by the user.
  2. The tag-based subscription request reaches the server. If the tag does not already exist, it is created on the server and then the application subscription for that tag is successfully completed
  3. User2 launches the mobile app, enters his/her credentials on the login screen or chooses social login to sign-in to the app.
  4. In the home page, user clicks on + button to report a new civic problem. A new page is shown where user can enter a description for the new civic problem as well as capture image and geo-location of the problem spot. User clicks on Submit button. This action invokes the resource adapter.
  5. Mobile app uploads the textual data to Cloudant NoSQL DB via resource adapter.
  6. Mobile app creates a thumbnail image by resizing the captured image and uploads both the captured image and thumbnail to Cloud Object Storage.
  7. Back on the home page the updated list of problem reports are shown.
  8. When the new issue is submitted by User2, a call to Push Adapter is made, to send a notification to all the users who subscribed for receiving notification on the issues reported for that area.
  9. Push Adapter sends the notification to APNS/GCM
  10. APNS/GCM sends the notification to all the tag based notification subscribers (in this case User1). Included Component

Included Components

  • Cloudant NoSQL DB: A fully managed data layer designed for modern web and mobile applications that leverages a flexible JSON schema.
  • Cloud Object Storage: A highly scalable cloud storage service, designed for high durability, resiliency and security.
  • Mobile Foundation: A scalable mobile access gateway powered by the market-leading IBM Mobile Foundation Technology. The service offers a comprehensive set of mobile backend capabilities such as, App life cycle, Push, Analytics, Feature Toggle, Security and Authentication and offline synch.

Featured Technologies

  • Mobile: Systems of engagement are increasingly using mobile technology as the platform for delivery.

Blog

Mobile application notifications are of 2 types – local and remote. Remote notifications are also called as Push notifications, as these are pushed from the server side to the mobile client. Push notifications add value to the business and their customers. So, they have become integral part of mobile applications. IBM Mobile Foundation provides a unified set of API methods to send either push or SMS notifications to iOS, Android, Windows 8.1 Universal, Windows 10 UWP and Cordova (iOS, Android) applications. The notifications are sent from the MobileFirst Server to the vendor (Apple, Google, Microsoft, SMS Gateways) infrastructure, and from there to the relevant devices. The unified notification mechanism makes the entire process of communicating with the users and devices completely transparent to the developer. Notification are of different types: tag based, unicast, broadcast, interactive and silent. MobileFirst Platform Foundation exposes a REST API endpoint that can be accessed by clients. You can create an IBM MobileFirst™ Platform Foundation push notification architecture using the enterprise back-end calling method. This architecture relies on the enterprise back-end system to deliver messages to a MobileFirst Server cluster by calling push REST APIs.

Push notifications

IBM Code developer pattern titled Tag based notification for Hybrid mobile applications gives you step by step instructions for implementing push notifications in enterprise mobile apps by using IBM Mobile Foundation Unified Push APIs.

When you have completed this code pattern, you will understand: • How to achieve tag-based push notification using IBM Mobile Foundation

• How to create push notification tags on Mobile Foundation server using REST API

• How to send notifications using Mobile Foundation REST APIs.

• How to utilise Cloudant geospatial index queries to find a set of locations within a given radius of user location.