Mobile & Web

The Webex Connect iOS and Android SDKs provide a messaging framework for mobile app developers to integrate Webex Connect's Real-Time and Push messaging services into their mobile applications. The SDK also supports the monitoring of device events. These events are reported back to Webex Connect and stored against the customer’s profile. These events are useful before sending messages to customers.
For example, you can check the battery level before sending a message. You may choose to ignore customers whose current battery level is less than 5% while sending a message.

Push Notifications

A notification alerts a user about relevant and timely events. Notifications are of two types - local notifications and remote notifications.

  • A local notification is scheduled by an app and delivered by the platform on the same device, regardless of whether the app is currently running in the foreground.
  • A remote notification is also known as push notification is sent by an app’s remote server to the Push Notification service, which pushes the notification to all devices that have the app installed. For example, a news app that alerts its users with important events as they happen.

📘

Webex Connect does not support local notifications.

Interactive Notifications

A notification can be interactive or non-interactive. A notification that supports actions is known as an interactive notification. Traditional notifications alert you when a message is received by your device. The notification does not allow you to do anything with the message after reading it.
To respond to a traditional notification, you have to open the message box and then open the message you received. Finally, click the reply button.

Interactive notifications let you respond without switching between the apps. When you receive a message, you will have one or two buttons configured along with the message. You can click one of the buttons to respond. Interactive notifications are secure and cannot be used to spread malicious activity from one app to another.

Web Push Notifications

Webex Connect Web Push Notification feature allows you to send notifications to your customers' browsers, even when they are not on your website. The user must 'opt-in' and agree to receive notifications from your website. Once opted to receive notifications, your customers can receive notifications even when the browser is closed. Web Push notifications are supported only on HTTPS sites.

Some advantages of Web Push Notification:

  • You can send push notifications to your customers without having any contact details.
  • Your customers can receive push notifications even when the browser is closed.
  • You can send push notifications to those customers that are not on your website.

Web push notification examples:

  • A bank can notify customers about their payments.
  • A notification can be sent when a particular request or process is complete.
  • A sports or news website can send timely updates to its subscribers.

📘

Note:

Web push notifications are not supported in private browsing mode.

SDK Download

After you configure the Push Notifications for Mobile and/or Web, you can download the corresponding SDK using the download icon.

941

Download SDK

When you click the download icon the SDK file websdk.zip gets downloaded onto your local system to the selected folder. Alternatively, you can also download the SDK from the Tools > Downloads section of the Webex Connect platform.

The app asset configuration page has been updated to allow downloading the complete config file required for initializing Webex Connect mobile SDKs (Android, iOS, and Cordova SKDs). App developers can now directly embed the downloaded config file in their app code.

OS and Browser Support

Web push notifications are supported on the following OS and browsers:

OSChromeFirefoxSafari
Windows Desktop (Version 7, 8, 10)YesYesNo
Mac OS X 10.11 (EI Captain)YesYesYes
Linux (Fedora 24)YesYesNo
iOS (9.x)NoNoNo
Android (5.x)YesNoNo

Add a Mobile Application

Before you add a mobile application, the following pre-configuration steps must be completed. The keys that are obtained from these steps are used to configure iOS, Android, and Web platforms.

To add a mobile/web application in Webex Connect:

  1. On the sidebar, hover your mouse on Assets (icon) and click Apps The Application screen appears.
  2. On the Apps dashboard, click Configure New App and select Mobile/Web.
    The Configure New App - Mobile & Web allows you to configure push notifications over mobile and web.
FieldDescription
Name Enter a name for the mobile application.
Access CredentialsAccess credential is used to uniquely identify the app while communicating with Webex Connect.
Client KeyThe client key is auto-populated. This key along with App ID is used to initialize the SDK.
Push NotificationsConfigure your push provider's credentials here to allow Webex Connect to send notifications to your app users. Read our SDK quick start guides to know more.

iOS
Android
Chrome and Firefox
Safari
In App MessagingConfigure in-app messaging
Advanced Settings
Device AttributesConfigure device attributes for iOS and Android applications
JWT AuthorizationConfigure JWT authorization to provide JWT secret key
Server Side InboxAllows the storage of data on server of Webex Connect. By default it is enabled for all the existing tenants. Only a tenant owner, a full access user, or a limited access user can enable or disable the option.

Whenever you try to disable this option, a popup with the following message is displayed. You must click confirm to enable.

_ Once server side inbox is enabled, all new messages will have a server side copy for future downloads.

Whenever you try to disable this option, a popup with the following message is displayed. You must click confirm to disable.

_ Once Server Side Inbox is disabled, new messages are not stored on server side. These messages will be delivered only once and post that, you must maintain a copy of these messages on your server for future reference.

The Server Side Inbox option is disabled by default. You must enable the option if you want to use the capability.
Allow Multi User Registrations on Same DeviceAllows multiple users on the same device for the application
Single Device Per UserRestricts access to the application to one user per device. If you register on a new device, you will stop receiving push notifications on the older device.

You can enable this feature at an app asset level from mobile/web app asset configuration screen.
Enabling Device Per User

Enabling Device Per User

Enabling Multi User Registrations on Same Device

Enabling Multi User Registrations on Same Device

Configuration for Mobile Push Notifications

Hover the mouse pointer over the platform you want to configure and click the corresponding Configure next to the Status column.

iOS

The following configurations are applicable for iOS mobile applications.

📘

Note

Based on the expiry date (Valid Till date), an email is sent to (the owner, full access and limited access users of the tenant) remind you 30, 15, 7, 3, 2, and 1 day(s) before expiry. If you do not upload a valid certificate after the expiry date, another email is sent 1 and 7 days after expiry

Firebase Cloud Messaging (FCM)

FieldDescription
FCM API KeyYou need to have a Cloud Messaging API Key generated in your google developer or firebase account. This credential is the same type as the API key you generate to send a push to Android apps.

The API Key is under “Cloud Messaging" section in FCM setup.
PermissionsSet of permissions that you need to add to the iOS app.

Apple Push Notification Service (APNS)

For more information, you can refer iOS SDK Quickstart Guide.

FieldDescription
Certificate PasswordCertificate password of the APNS.
APNS TypeSelect the Gateway (production/sandbox).
If you have created Apple Push Notification service SSL for Sandbox, then select Sandbox from the drop-down.
If you have created Apple Push Notification service SSL for Production, then select Production from the drop-down.
Drag-and-drop or choose the APNS Certificate fileSelect the APNS file you have created.
PermissionsSet of permissions that you need to add to the app.

Token-based Authentication for APNS

For more information, you can refer iOS SDK Quickstart Guide.

The token-based notifications mechanism does not have an expiry as opposed to the certificate-based mechanism.

FieldDescription
Key IDThe Key ID from Apple Developer Account
Team IDThe Team ID from Apple Developer Account
PackageAn identifier of the topic of the app to which the notifications will be pushed
GatewayThe gateway to use for push notifications:
Sandbox
Production
Drag and drop or choose the APNS Certificate fileSelect the APNS private key file specific to the app.
PermissionsSet of permissions that you need to add to the app.

Android

The following configurations are applicable for Android mobile applications.

Configure Push Notifications

For more information, you can refer Android SDK Quickstart Guide.

FieldDescription
FCM Server KeyFCM Server Key is found under the “Cloud Messaging" section in the Firebase Developer Console
PermissionsSet of permissions that you need to add to the app.

Web

The following configurations are applicable for Android and iOS web applications:

Chrome and Firefox (web) - Configure Push Notifications

For more information, you can refer Javascript SDK Quickstart Guide.

FieldDescription
Website URLWebsite URL to push the notification.
Notification Icon URLURL to fetch the notification icon.
Firebase cloud messaging settingsSetting required to configure FCM for Firefox and Chrome.
Web API KeyThis key is found in the project general setting in your FCM project.
Server KeyThe server key is found under the message settings of the FCM project.
Sender IDYou can find the 'sender ID' under the cloud message setting of the FCM Project.

App developers can copy the complete ‘Firebase SDK setup and configuration’ JSON object and re-use it directly instead of filling the individual fields.

Safari (web) - Configure Safari Push Notifications

FieldDescription
Site NameTitle of the website
Site URLURL of the website
Notification IconsUpload notification icons in each placeholder as per the resolution described.
APNS CredentialsCertificate from the Apple developer account
Drag and drop or choose the APNS Certificate fileA placeholder for the APNS file. When you select the certificate file, it is uploaded to the server.

Global Configuration

In-App Messaging

In-app messages are notifications displayed while the user is active within the app itself – it can be triggered messages based on user interactions. Examples include popups, yes/no prompts, interstitials, and more.

In-app messaging provides a fast, secure and bi-directional channel of communication on mobile and Web Apps. Push notifications are mandatory for using In-app messaging on mobile platforms to display Push Notification for the messages delivered.

Message delivery is attempted via the primary protocol and in case of failure, the delivery falls back on a lower level of preferences.

FieldDescription
Primary Transport ProtocolMessage delivery primary transport protocol
MQTT
Web Socket
Secondary Transport ProtocolMessage delivery secondary transport protocol. This protocol is used when the primary protocol fails to deliver the message.
MQTT
Web Socket
Use Secured PortSecured ports to ensure RTM connections are established over a secured protocol for better security.
If enabled, 8883 is used for MQTT and 8884 for Web Socket.
Enable Payload EncryptionChoose to use AES encryption to encrypt the in-app messaging payload for enhanced security.

Device Attributes

On enabling the device attribute, the SDK tracks the configured platform-specific device attributes and raises profile update events.

Hover the mouse pointer on the mobile platform you want to configure and click the corresponding Configure button. The device attributes are categorized as follows:

  • One-time monitors: Enable the required attributes. One-time monitors are captured only once after registration.
  • Event-based monitors: Enable the required attributes. Event-based monitors are captured every time that event occurs.
  • Interval-based monitors: Enable the required attributes. Interval-based monitors are captured at regular time intervals specified by the user.

Depending on the SDK version you are using, the device attributes that you see vary. The following table lists the device attributes:

SDK VersionOne-time MonitorsEvent-based MonitorsInterval-based Monitors
2.11.x and loweriOS

> Resolution
>
Internal Storage
> RAM
>
Bluetooth Support
>* User Agent
iOS

> Telco
>
Foreground App
> MCC
>
Roaming
> Connect Type
>
Location
> MNC
>
Time Zone
> Device IP
>
Time Spent
> Language
>
Geofence
iOS

>* Battery Level
Android

> Resolution
>
Email ID
> Internal Storage
>
WiFi MAC Address
> List Account
>
Bluetooth Support
> User Agent
>
IMEI
> External Storage
>
RAM
> Serial Number
>
NFC Support
Android

> Connect Type
>
Telco
> IMSI
>
MCC
> Time Spent
>
Roaming
> Language
>
Cell ID
> Location
>
Idle Screen
> Phone Mode
>
MNC
> Time Zone
>
Foreground
> Device IP
>
Geofence
Android

> Signal Strength
>
Foreground App
>* Battery Level
2.12 and higher--iOS

> Telco
>
Time Zone
> Location
>
Language
>* Geofence
--
--Android

> Telco
>
Location
> Idle Screen
>
Time Zone
> Foreground
>
Geofence
--

JWT Authorization

When enabled, all communication from the SDK will be authorized by a valid JWT token. If a JWT token is updated or newly added once an application is live, users who don't update their apps will not be able to receive their messages until they update to the latest version of an application.

FieldDescription
JWT Secret KeyWhen enabled, the gateway calls a third-party JWT API and generates a security token for the user.

Multi User Support

You can allow multiple user registrations on the same device by enabling the Allow Multi User Registrations on Same Device option. There is no limit on the maximum number of users that you can register on the same device. For the best experience, the maximum number of users registered on the same device simultaneously must be less than 100.

When you allow multiple users on the same device, only one user is active at any given point of time and all other users are in an inactive state. The user states are as defined below:

  • Active - The userId for which the register method was called last. Both in-app messages and push notifications sent to this userId will be received by the user.
  • Inactive - All the users registered to a device prior to the last registered user are treated as inactive users unless they are unregistered by calling the unregister method. All push notifications sent to these users will be received on the device but in-app messages won't be received unless they register again and come to active mode. For example, if there are 50 users registered on the same device simultaneously, 49 of them will be in inactive mode and 1 will be in active mode. Push notifications sent to all the 50 users will be received, but in-app messages will be received only for the 50th user.

📘

Push Notifications for Multiple Users

If n number of users are registered to a device and push notification is sent to all the n users, the device will receive the same push notification n times.

👍

Delivery of Notifications

Push notifications are delivered to both active and inactive users, whereas In-app notifications are delivered only to active users. For inactive users, the In-app notifications are delivered when the users become active.

📘

Applicable OS

The multi-user support is available only on iOS and Android.

API

Here is a Postman collection to test our APIs. Make sure you change the key in the header to your service key.

Latest Collection: Run in Postman

Archived Collection:Refer Postman Collection

Download Postman from here