Platform

Platform

  • Getting Started
  • API

›Android SDK

Getting Started

  • Create Your App

Quick Starts

  • 555 Samples

Mobile SDK (v1.0)

  • Overview
  • IOS SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • How to initiate or accept video call
    • How to set log level for SDK
    • Release Notes

    Android SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • How to initiate or accept video call
    • How to set log level for SDK
    • Release Notes

Mobile SDK (v2.0)

  • Overview
  • IOS SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • How to initiate or accept VIDEO call
    • How to initiate or join ANONYMOUS VIDEO call
    • Release Notes
    • Reference code - How to initiate or accept PSTN Call
    • Reference code - How to initiate or accept Video Call
    • Reference code - How to initiate or join Anonymous Video Call

    Android SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • How to intiate or accept Video Call
    • How to intiate or accept ANONYMOUS VIDEO Call
    • Release Notes
    • Reference code - How to initiate or accept PSTN Call
    • Reference code - How to initiate or accept Video Call
    • Reference code - How to initiate or join Anonymous Video Call

    React Native SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • Release Notes

WebRTC JS SDK

  • Overview
  • Getting Started
  • How to do user authentication
  • How to subscribe for notifications
  • How to initialize SDK
  • How to initiate or accept PSTN call
  • How to initiate or accept video call
  • How to create a screen share session
  • Release Notes

Notification Service

SDK provide APIs to subscribe for push notification using FCM or XMPP notification over websocket using SDK callback. Before invoking notification APIs, make sure you have initialized the SDK and set the mandatory configuration as mentioned here.

XMPP Notification

To use XMPP notification (Instead of FCM), use onNotification callback method. The client needs to be connected to 555 backend by intializing the SDK and setting the configurations to avail this notification callback.

To use this you need to implement Rtc555SdkObserver interface and initialize the notification observer with setNotificationObserver(Rtc555SdkObserver).

   Rtc555Sdk.setNotificationObserver(this);

FCM Notification

Create Subscriptions

This API will register the subscriber for the PUSH notification and create subscription for topic provided. On success, a Subscriber-Id will be generated for this device-user combination and returned. Implement Rtc555Ntm.Rtc555NtmObserver interface for callbacks.


    Rtc555SubscriptionObject sub = new Rtc555SubscriptionObject();
    sub.deviceToken = <deviceToken>;
    sub.protocolType = Rtc555SubscriptionObject.ProtocolMode.FCM;
    sub.topic = "federation/pstn/<Routing Id>";

    ArrayList<Rtc555SubscriptionObject> subscriptions = new ArrayList<>();
    subscriptions.add(sub);

    Rtc555Ntm.createSubscriptions(subscriptions,<appDomain_String>,Rtc555NtmObserver)
ParametersTypeDescription
subscriptionsArray of type Rtc555SubscriptionObjectEach Subscription contains Device token, protocol and topic
appDomainstringapp domain
rtcNtmObserverRtc555NtmObserverCallbacks

Below is the Rtc555SubscriptionObject object that needs to be built:

ParametersTypeDescription
deviceTokenstringFCM device token
protocolTypeRtc555SubscriptionObject.ProtocolModepass "fcm" based on the type of notification required
topicstringpass "federation/pstn/" for pstn or "/video/" for video, based on the type of subscription required

Delete Subscription

Users need to pass subscriberId, topic and app domain for deleting subscription. Implement Rtc555Ntm.Rtc555NtmObserver interface for callbacks.

    Rtc555Ntm.deleteSubscription(subscriberId, topic, appDomain,Rtc555NtmObserver);
ParametersTypeDescription
subscriberIdstringsubscriber Id received from onSubscriptionSuccess callback
TopicRtc555SubscriptionObject.Topicsubscribed topic
appDomainstringapp domain

Delete All Subscriptions

Users need to pass subscriberId for deleting all subscription. Implement Rtc555Ntm.Rtc555NtmObserver interface for callbacks.

     Rtc555Ntm.deleteAllSubscriptions(subscriberId,Rtc555NtmObserver)
ParametersTypeDescription
subscriberIdstringsubscriber Id received from onSubscriptionSuccess callback

Notification Callbacks

onSubscriptionSuccess

This callback gets invoked when we receive success status for create subscription API.

    void onSubscriptionSuccess(JSONArray subscriptionInfo) {

    }
ParametersTypeDescription
subscriptionInfoJSONArrayEach element in the array contains JSON of subscriberId , topic and protocol

Below is the subscriptionInfo object details:

ParametersTypeDescription
subscriberIdstringsubscriber Id
topicarrayArray of subscribed topics
protocolstringfcm

onSubscriptionFailure

This callback gets invoked when we receive error status for create subscription API.

    public void onSubscriptionFailure(Rtc555Exception e) {
         
     }
ParametersDescription
Rtc555ExceptionException consists of error code and error message

onSubscriptionDeleted

This callback gets invoked when we receive success status for delete subscription API.

    public void onSubscriptionDeleted(String subscriberId, String topic) {
         
    }
ParametersTypeDescription
subscriberIdstringsubscriber Id
topicstringsubscribed topic

onSubscriptionDeletionFailure

This callback gets invoked when we receive error status for delete / delete all subscription API.

    public void onSubscriptionDeletionFailure(Rtc555Exception e) {
         
     }
ParametersDescription
Rtc555ExceptionException consists of error code and error message

onSubscriberDeleted

This callback gets invoked when we receive success status for delete all subscription API.

    public void onSubscriberDeleted(String subscriberId) {
         
     }
ParametersDescription
subscriberIdsubscriber Id
← How to do user authenticationHow to initiate or accept PSTN call →
  • XMPP Notification
  • FCM Notification
    • Create Subscriptions
    • Delete Subscription
    • Delete All Subscriptions
  • Notification Callbacks
    • onSubscriptionSuccess
    • onSubscriptionFailure
    • onSubscriptionDeleted
    • onSubscriptionDeletionFailure
    • onSubscriberDeleted
Docs
Getting StartedGuidesAPI Reference
More
BlogGitHub
555 Platform
Copyright © 2024 555 Platform ™
555docs-v0.0.94