From f73ad19dc7912f9b4eeaf493010a67ae3acf11fb Mon Sep 17 00:00:00 2001
From: James Keast <30476676+jkeastbb@users.noreply.github.com>
Date: Thu, 29 Nov 2018 14:07:21 -0400
Subject: [PATCH] Updating example applications for the BlackBerry Spark
Communications Services SDK R7 Release. (#17)
---
ClickToCall/.eslintrc.json | 9 +-
ClickToCall/README.md | 22 +-
ClickToCall/callPopup.html | 29 ++-
ClickToCall/js/callPopup.js | 17 +-
ClickToCall/js/config_azure.js | 70 +++++
.../js/{config.js => config_google.js} | 61 ++---
ClickToCall/js/config_mock.js | 47 ++++
ClickToCall/js/index.js | 6 +-
ClickToCall/package.json | 3 +-
ClickToChat/.eslintrc.json | 9 +-
ClickToChat/README.md | 23 +-
ClickToChat/index.html | 40 ++-
ClickToChat/js/config.js | 79 ------
ClickToChat/js/config_azure.js | 70 +++++
ClickToChat/js/config_google.js | 64 +++++
ClickToChat/js/config_mock.js | 48 ++++
ClickToChat/js/index.js | 26 +-
ClickToChat/package.json | 3 +-
DataTransfer/.eslintrc.json | 8 +-
DataTransfer/README.md | 16 +-
DataTransfer/index.html | 30 ++-
DataTransfer/js/config_azure.js | 63 +++++
.../js/config_google.js | 46 ++--
DataTransfer/js/config_mock.js | 39 +++
DataTransfer/js/dataTransferElement.js | 6 +-
DataTransfer/js/index.js | 16 +-
DataTransfer/package.json | 3 +-
KeyProviderServer/README.md | 13 +-
.../screenShots/keyProviderService-azure.png | Bin 58255 -> 62034 bytes
Node/GoogleLogin.js | 5 +-
Node/README.md | 10 +-
QuickStart/.eslintrc.json | 5 +-
QuickStart/README.md | 26 +-
QuickStart/config_azure.js | 63 +++++
.../config.js => QuickStart/config_google.js | 43 ++--
QuickStart/config_mock.js | 42 +++
QuickStart/index.html | 240 ++++++++++--------
README.md | 52 ++--
SimpleChat/.eslintrc.json | 8 +-
SimpleChat/README.md | 28 +-
SimpleChat/index.html | 32 ++-
SimpleChat/js/config.js | 77 ------
SimpleChat/js/config_azure.js | 62 +++++
SimpleChat/js/config_google.js | 56 ++++
SimpleChat/js/config_mock.js | 39 +++
SimpleChat/js/simpleChat.js | 19 +-
SimpleChat/package.json | 3 +-
ThreadedChat/.eslintrc.json | 9 +-
ThreadedChat/README.md | 22 +-
ThreadedChat/index.html | 33 ++-
ThreadedChat/js/config_azure.js | 67 +++++
.../js/{config.js => config_google.js} | 57 ++---
ThreadedChat/js/config_mock.js | 42 +++
ThreadedChat/js/threadedChat.js | 19 +-
ThreadedChat/package.json | 3 +-
55 files changed, 1370 insertions(+), 558 deletions(-)
create mode 100644 ClickToCall/js/config_azure.js
rename ClickToCall/js/{config.js => config_google.js} (52%)
create mode 100644 ClickToCall/js/config_mock.js
delete mode 100644 ClickToChat/js/config.js
create mode 100644 ClickToChat/js/config_azure.js
create mode 100644 ClickToChat/js/config_google.js
create mode 100644 ClickToChat/js/config_mock.js
create mode 100644 DataTransfer/js/config_azure.js
rename QuickStart/config.js => DataTransfer/js/config_google.js (62%)
create mode 100644 DataTransfer/js/config_mock.js
create mode 100644 QuickStart/config_azure.js
rename DataTransfer/js/config.js => QuickStart/config_google.js (61%)
create mode 100644 QuickStart/config_mock.js
delete mode 100644 SimpleChat/js/config.js
create mode 100644 SimpleChat/js/config_azure.js
create mode 100644 SimpleChat/js/config_google.js
create mode 100644 SimpleChat/js/config_mock.js
create mode 100644 ThreadedChat/js/config_azure.js
rename ThreadedChat/js/{config.js => config_google.js} (51%)
create mode 100644 ThreadedChat/js/config_mock.js
diff --git a/ClickToCall/.eslintrc.json b/ClickToCall/.eslintrc.json
index dfc3da9..ed73777 100644
--- a/ClickToCall/.eslintrc.json
+++ b/ClickToCall/.eslintrc.json
@@ -24,7 +24,12 @@
"FirebaseKeyProvider": false,
"KeyProtect": false,
"USER_SECRET": false,
- "KMS_ARGON_WASM_URL": false
+ "KMS_ARGON_WASM_URL": false,
+ "GooglePeopleUserManager": false,
+ "AUTH_CONFIGURATION": false,
+ "AuthenticationManager": false,
+ "MockUserManager": false,
+ "AzureUserManager": false
},
"rules":
@@ -34,7 +39,7 @@
[
"error",
{
- "varsIgnorePattern": "makeCall|KMS_ARGON_WASM_URL|CONTACT_REG_ID|ID_PROVIDER_DOMAIN|USER_SECRET|ID_PROVIDER_ENVIRONMENT|createAuthManager|createUserManager|createKeyProvider|createKeyProtect"
+ "varsIgnorePattern": "AUTH_CONFIGURATION|makeCall|KMS_ARGON_WASM_URL|CONTACT_REG_ID|ID_PROVIDER_DOMAIN|USER_SECRET|ID_PROVIDER_ENVIRONMENT|createAuthManager|createUserManager"
}
]
}
diff --git a/ClickToCall/README.md b/ClickToCall/README.md
index f461da6..6de350c 100644
--- a/ClickToCall/README.md
+++ b/ClickToCall/README.md
@@ -1,15 +1,17 @@
-![BlackBerry Spark Communications Platform](https://developer.blackberry.com/files/bbm-enterprise/documents/guide/resources/images/bnr-bbm-enterprise-sdk-title.png)
+![BlackBerry Spark Communications Services](https://developer.blackberry.com/files/bbm-enterprise/documents/guide/resources/images/bnr-bbm-enterprise-sdk-title.png)
# Click To Call Sample for JavaScript
The Click to Call sample app demonstrates how to integrate a video call
-experience into your website with the Spark SDK for JavaScript. This app allows a user to click a button on a webpage to start a secure video call with a predefined user or agent. The bbmChat widget handles the rendering of messages within the chat, and allows the user to send text, picture, and file messages.
+experience into your website with the Spark Communications SDK. This app allows
+a user to click a button on a webpage to start a secure video call with a
+predefined user or agent. The bbmCall widget handles the rendering of the
+incoming and outgoing video streams.
### Features
This app demonstrates how easy it is to integrate the bbmCall widget into your
-webpage. It initializes the Spark SDK for JavaScript, and starts a
-video call with a predefined user.
+webpage. It initializes the SDK, and starts a video call with a predefined user.
@@ -19,9 +21,9 @@ video call with a predefined user.
## Getting Started
-This sample requires the Spark SDK, which you can find along with related resources at the location below.
+This sample requires the Spark Communications SDK for JavaScript, which you can find along with related resources at the location below.
-* Getting started with the [Spark SDK](https://developers.blackberry.com/us/en/products/blackberry-bbm-enterprise-sdk.html)
+* Getting started with the [Spark Communications SDK](https://developers.blackberry.com/us/en/products/blackberry-spark-communications-platform.html)
* [Development Guide](https://developer.blackberry.com/files/bbm-enterprise/documents/guide/html/index.html)
* [API Reference](https://developer.blackberry.com/files/bbm-enterprise/documents/guide/reference/javascript/index.html)
@@ -44,7 +46,7 @@ To use the ClickToCall example, you must set up the following elements in js/con
- Oauth2 configuration (AUTH_CONFIGURATION)
- A hard coded contact registration ID with whom anyone who views the page will talk (CONTACT_REG_ID)
-- Your Spark user domain (ID_PROVIDER_DOMAIN)
+- Your sandbox domain (ID_PROVIDER_DOMAIN)
- Firebase configuration (FIREBASE_CONFIG)
- User passcode (USER_SECRET)
@@ -53,7 +55,7 @@ To use the ClickToCall example, you must set up the following elements in js/con
Follow this guide for a walkthrough of how to integrate a video call into your webpage.
- [Import the bbmCall UI widget into your web application](#importCall)
-- [Initialize the Spark SDK for JavaScript](#init)
+- [Initialize the SDK](#init)
- [Perform setup](#setup)
- [Start a video call with a predefined user](#startCall)
@@ -65,7 +67,7 @@ Your web application needs to import the bbmCall widget in order to bring a vide
```
-### Initialize the Spark SDK for JavaScript
+### Initialize the SDK
```javascript
// Instantiate BBMEnterprise.
@@ -80,7 +82,7 @@ Your web application needs to import the bbmCall widget in order to bring a vide
});
```
-For more information about setting up the Spark SDK for JavaScript, visit the [Getting Started with Web](https://developer.blackberry.com/files/bbm-enterprise/documents/guide/html/gettingStarted-web.html) section of the guide.
+For more information about setting up the SDK, visit the [Getting Started with Web](https://developer.blackberry.com/files/bbm-enterprise/documents/guide/html/gettingStarted-web.html) section of the guide.
### Perform setup
```javascript
diff --git a/ClickToCall/callPopup.html b/ClickToCall/callPopup.html
index b77c492..eb04578 100644
--- a/ClickToCall/callPopup.html
+++ b/ClickToCall/callPopup.html
@@ -22,16 +22,37 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -17,7 +20,9 @@ experience into your website with the Spark SDK for JavaScript. This app allows
### Features
-This app demonstrates how easy it is to integrate the bbmChat widget into your webpage. It initializes the Spark SDK for JavaScript, and starts a chat with a predefined user. The app then launches the bbmChat widget which allows the user to:
+This app demonstrates how easy it is to integrate the bbmChat widget into your
+webpage. It initializes the SDK, and starts a chat with a predefined user. The
+app then launches the bbmChat widget which allows the user to:
* View all sent and received messages in a chat
* Send a text message, picture, or file attachment
* Send high priority messages
@@ -37,9 +42,9 @@ This app demonstrates how easy it is to integrate the bbmChat widget into your w
## Getting Started
-This sample requires the Spark SDK, which you can find along with related resources at the location below.
+This sample requires the Spark Communications SDK for JavaScript, which you can find along with related resources at the location below.
-* Getting started with the [Spark SDK](https://developers.blackberry.com/us/en/products/blackberry-bbm-enterprise-sdk.html)
+* Getting started with the [Spark Communications SDK](https://developers.blackberry.com/us/en/products/blackberry-spark-communications-platform.html)
* [Development Guide](https://developer.blackberry.com/files/bbm-enterprise/documents/guide/html/index.html)
* [API Reference](https://developer.blackberry.com/files/bbm-enterprise/documents/guide/reference/javascript/index.html)
@@ -62,7 +67,7 @@ To use the ClickToChat example, you must set up the following elements in js/con
- Oauth2 configuration (AUTH_CONFIGURATION)
- A hardcoded contact registration ID with whom anyone who views the page will chat (CONTACT_REG_ID)
-- Your Spark user domain (ID_PROVIDER_DOMAIN)
+- Your sandbox domain (ID_PROVIDER_DOMAIN)
- Firebase configuration (FIREBASE_CONFIG)
- User passcode (USER_SECRET)
@@ -71,7 +76,7 @@ To use the ClickToChat example, you must set up the following elements in js/con
Follow this guide for a walkthrough of how to integrate a rich chat experience into your webpage.
- [Import the bbmChat UI widget into your web application](#importChat)
-- [Initialize the Spark SDK for JavaScript](#init)
+- [Initialize the SDK](#init)
- [Perform setup](#setup)
- [Start a chat with a predefined user](#startChat)
@@ -102,7 +107,7 @@ Create new instance of BBMEnterprise.
});
```
-For more information about setting up the Spark SDK for JavaScript, visit the [Getting Started with Web](https://developer.blackberry.com/files/bbm-enterprise/documents/guide/html/gettingStarted-web.html) section of the guide.
+For more information about setting up the SDK, visit the [Getting Started with Web](https://developer.blackberry.com/files/bbm-enterprise/documents/guide/html/gettingStarted-web.html) section of the guide.
### Perform setup
diff --git a/ClickToChat/index.html b/ClickToChat/index.html
index dc73b7d..cc9bdc4 100644
--- a/ClickToChat/index.html
+++ b/ClickToChat/index.html
@@ -22,19 +22,38 @@