WaveMaker Docs

WaveMaker Docs

  • Get started
  • Widgets
  • How-to
  • Enterprise
  • Releases
  • Blog
  • Sign-in

›Mobile Integrations

Getting started

  • Introduction
  • Walkthrough

Pages

  • Pages Overview
  • Creating a Page
  • Layout and Styles

    • Page Layout
    • Templates
    • Themes
    • Accessibility

    Page Configure

    • Page Artefacts
    • Page Cache
    • Partial Page
    • Page Parameters
    • Examples

    Page Actions

    • Navigation
    • Events

    Custom Development

    • Theme Editor
    • Manual Theme
    • Create Template

SSPA

  • Micro Frontend App

Databases

  • Database Services Overview
  • Database Tools
  • Database Designing

    • Working with Databases
    • Data Modelling
    • DataBase Schema Modes
    • Working with DB Schema
    • Database Views
    • Temporal Support

    Accessing Database

    • Accessing Database

    Queries and Procedures

    • Working with Queries
    • Working with Stored Procedures
    • Version Queries & Procedures
    • Blob Queries and Procedures
    • Queries & Procedures - Java Services

    Database Variables & API

    • Database CRUD
    • CRUD Event Listeners
    • Database APIs
    • Database Service APIs

REST & SOAP

  • Web Services Overview
  • Restful

    • REST Services
    • Secure Server-side Properties
    • REST Request Timeouts
    • REST Services using OAuth 2.0

    SOAP

    • Working with SOAP Services
    • Imported SOAP APIs

    Websocket

    • Working with WebSockets

    APIs

    • API Designer
    • Mocking APIs
    • Swagger Import

    Variables

    • CRUD Variable
    • Service Variable
    • WebSocket Variable

Java Services

  • Java Service
  • Java Services

    • Java Integration Services
    • DB Service Integration
    • Variables for Invocation
    • Generated REST APIs (API Designer)

    Java Services Variables & API

    • Variable for Java Service
    • Java Service APIs

    Source Files

    • Resources and Third-party Libraries
    • Using 3rd party JavaScript files
    • Using 3rd party jar files

Variables & Actions

    Variables

    • Variables Overview
    • Model Variable
    • Device Variables

    Binding

    • Variable Binding
    • Custom Formatter

    Actions

    • Actions
    • Navigation Action
    • Login Action
    • Logout Action
    • Timer Action
    • Notification Action

    Events

    • Events
    • JavaScript Access

Security

    App Security

    • Overview
    • Authentication
    • Authorization
    • Access Levels & Permissions
    • Login Configuration
    • Session Persistence
    • SSL Encryption
    • XSS antisamy policy configuration
    • OWASP
    • XSS Prevention
    • Central Authentication System
    • Token Based Authentication
    • SAML Integration
    • Secure Connection for Deployed Apps
    • Concurrent Sessions
    • HostHeader Injection

    Security Variable and API

    • Security Variables
    • Remember Me
    • Variable for Security Service
    • Security Service APIs

Developer options

  • Test and Run (Preview) Apps
  • Chrome Extension: Devtool
  • Debugging
  • Inspection Framework
  • Build Options
  • WaveMaker Mobile Apps Automation
  • Developer Integration

    • Project User Management
    • Developer Collaboration
    • Extending the Application using IDEs
    • Import, Export & Update Apps
    • Project Shells

    Add-ons

    • Localization
    • Artifacts Repository

Deployment

  • Overview
  • Deployment Profile
  • One-click Deployment
  • WaveMaker CI/CD Pipeline

    • Overview
    • Configuration Profiles
    • Configuration Management
    • Pipelines and Phases

    Pipeline Configuration

    • Default Pipelines in WMO
    • Configure Pipeline in WME

    Deploy to Cloud Providers

    • AWS
    • Azure
    • Google Cloud
    • DigitalOcean

    Pipeline Configuration cont.

    • Phase configurations
    • Webhooks Integration
    • Tests Integration

    Manage Deployed Apps

    • Manage Deployed Apps

    Integrate with your CI/CD Providers

    • Push Code to External repo
    • Custom VCS Integration
    • Export WaveMaker Application
    • Building Project with Maven
    • Build with Docker
    • Jenkins Integration
    • Deploy using Docker Compose
    • Deployment to Heroku

    WaveMaker apps Interation with CDN

    • App Integration with AWS CDN
    • App Integration with Azure CDN

    Deployment to external web servers

    • Application Server Overview
    • Deploy to Tomcat
    • WebSphere
    • JBoss - WildFly
    • WebLogic Server

Mobile development

  • Building Hybrid Mobile Apps
  • Native Device Support
  • First Mobile App
  • Mobile Design

    • Mobile Page Design
    • Gesture Support
    • Mobile Tabbar
    • Mobile Navbar

    Mobile Installer

    • Test Run (Preview)
    • Debugging Mobile Apps
    • Testing Hybrid Mobile Apps using WaveLens
    • Mobile Build - Android
    • Generating iOS and Android Distribution Certificates
    • Export Cordova zip
    • Mobile Build - Manual
    • Mobile Build - AppChef

    Mobile Integrations

    • Mobile Integrations - Amazon Mobile Analytics
    • Mobile Integrations - Amazon SNS
    • Using Push Notifications in Mobile Device
    • Invoking Web App APIs in Mobile Apps

    Offline Features

    • Offline Data Support
    • Implementation
    • Switching between Offline and Online Mode

Connectors

  • Introduction
  • Architecture
  • Import Connectors
  • List of Connectors
  • Build a New Connector

Teams

  • Overview
  • Team Setup
  • Dashboard
  • Manage Users
  • Manage Projects
  • Manage Prefabs
  • Project Branches
  • Manage Roles
  • Code Repository
  • Import VCS Project
  • Team Profile
  • Manage Subscription
  • FAQs
Edit

Mobile Integrations - Amazon SNS


Amazon SNS is an AWS service that is used to enable push notifications for mobile devices. In this post, we will outline how to setup Amazon SNS with Google Cloud Messaging (GCM) and push messages to a device. In the end, this post will also show you how to integrate your WaveMaker mobile application with Amazon SNS service.

Source code:

The code used in this example is available for download here.

Prerequisites

  1. Amazon SNS account
  2. GCM account
  3. Device ID of the android phone to which the push notification will be sent.
  4. An application on the phone which will receive the notification

Setup Amazon SNS with GCM and an Android device

  1. Navigate to Amazon SNS console at https://console.aws.amazon.com/sns/v2/home
  2. Click on “Create topic” to give it a name
  3. Save the new topic. It should appear in the list
  4. Navigate to “Applications” and create a new application:. Choose “Google Cloud Messaging (GCM)” option. You will also need to provide your GCM API key
  5. Select the newly created Application and click on “Create platform endpoint”. You need to fill in your device’s token and a user-readable name
  6. Once the application's endpoint is created, select your device and click “subscribe endpoint to topic”
  7. Enter your Topic ARN. You can copy the ARN from the Topics section.

Publishing a push notification to the device

  1. Navigate to topics.
  2. Select your topic and click “Publish to topic”
  3. Give the message a subject and choose JSON format radio button. Click on “JSON message generator”
  4. Type your message and click on “Generate JSON” message.
  5. SNS will generate a JSON payload with message structure for all messaging platforms it supports. It is safe to ignore the other formats for now ( since we have not configured any services other than GCM). Take a note of the GCM message and click on Publish message when you’re ready to send the message
  6. The message will appear as a Push Notification on your device

Push message via SNS from WaveMaker

  1. Setup the Amazon Javascript SDK in WaveMaker. Refer to the WaveMaker/Amazon Cognito blog post for details. The setup steps are common for all Amazon services.
  2. In the $scope.onPageReady = function() {} block, type the following code:
  3. You should receive a push notification on your device with the subject.

Additional Information

  1. All the setup steps outlined in this document ( setting up Topics, Subscriptions etc) can be done via Amazon SNS UI as well as the API
  2. The official API reference is available at https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SNS.html and it is highly recommended to go through it.
  3. A user can be restricted or allowed to post information to SNS via Amazon’s IAM policies. This is outlined at https://docs.aws.amazon.com/sns/latest/dg/UsingIAMwithSNS.html#d0e3147
  4. In this document, we dealt with the Amazon JavaScript SDK. It is also possible to accomplish all these steps using the Amazon Java SDK. The official documentation is at https://docs.aws.amazon.com/sns/latest/dg/using-awssdkjava.html

See Also

Amazon Mobile Analytics
Push Notifications
Invoking Web App APIs in Mobile Apps

Last updated on 5/18/2020 by Naresh Ravulapalli
← Mobile Integrations - Amazon Mobile AnalyticsUsing Push Notifications in Mobile Device →
  • Source code:
  • Prerequisites
  • Setup Amazon SNS with GCM and an Android device
  • Publishing a push notification to the device
  • Push message via SNS from WaveMaker
  • Additional Information
  • See Also
WaveMaker
  • PRICING
  • PARTNERS
  • CUSTOMERS
  • ABOUT US
  • CONTACT US
Terms of Use | Copyright © 2013-2022 WaveMaker, Inc. All rights reserved.