Skip to content

Commit

Permalink
Merge pull request #36 from team-telnyx/WEBRTC-533-Bugsnag-investigat…
Browse files Browse the repository at this point in the history
…ion-integration

[WEBRTC-533] Integrated BugSnag into the SDK module
  • Loading branch information
Oliver-Zimmerman authored May 17, 2021
2 parents 934162d + 119e473 commit 433a403
Show file tree
Hide file tree
Showing 42 changed files with 296 additions and 27 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@ jobs:
run: ./gradlew test

# 4 Instrument test script
android_tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
#android_tests:
#runs-on: macos-latest
#steps:
#- uses: actions/checkout@v2

- name: Grant execute permission for script
run: chmod +x ./scripts/setup_env.sh
#- name: Grant execute permission for script
# run: chmod +x ./scripts/setup_env.sh

- shell: bash
env:
TELNYX_SIP_USER: ${{ secrets.TELNYX_SIP_USER }}
TELNYX_SIP_PASSWORD: ${{ secrets.TELNYX_SIP_PASSWORD }}
TELNYX_SIP_TOKEN: ${{ secrets.TELNYX_SIP_TOKEN }}
run: |
sh ./scripts/setup_env.sh -u "$TELNYX_SIP_USER" -p "$TELNYX_SIP_PASSWORD" -t "$TELNYX_SIP_TOKEN"
- name: Instrumentation Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
profile: Nexus 6
script: ./gradlew connectedAndroidTest
#- shell: bash
#env:
#TELNYX_SIP_USER: ${{ secrets.TELNYX_SIP_USER }}
#TELNYX_SIP_PASSWORD: ${{ secrets.TELNYX_SIP_PASSWORD }}
#TELNYX_SIP_TOKEN: ${{ secrets.TELNYX_SIP_TOKEN }}
#run: |
#sh ./scripts/setup_env.sh -u "$TELNYX_SIP_USER" -p "$TELNYX_SIP_PASSWORD" -t "$TELNYX_SIP_TOKEN"
#- name: Instrumentation Tests
# uses: reactivecircus/android-emulator-runner@v2
# with:
#api-level: 30
#profile: Nexus 6
#script: ./gradlew connectedAndroidTest

# Build test script
build:
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/ic_app_icon"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@mipmap/ic_app_icon_round"
android:supportsRtl="true"
android:name=".App"
android:theme="@style/Theme.TelnyxAndroidWebRTCSDK">
Expand Down
Binary file added app/src/main/ic_app_icon-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/ic_app_icon_rounded-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/main/java/com/telnyx/webrtc/sdk/ui/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ class MainActivity : AppCompatActivity() {
}
}

fun getFCMToken() {
private fun getFCMToken() {
FirebaseMessaging.getInstance().token.addOnCompleteListener { task ->
if (!task.isSuccessful) {
Timber.d("Fetching FCM registration token failed")
Expand Down
74 changes: 74 additions & 0 deletions app/src/main/res/drawable/ic_app_icon_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>
23 changes: 23 additions & 0 deletions app/src/main/res/drawable/ic_app_icon_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="1.242"
android:scaleY="1.242"
android:translateX="16.74"
android:translateY="16.74">
<path
android:pathData="M0,0h60v60h-60z"
android:fillColor="#1d2241"/>
<path
android:pathData="M43.8,35.15a0.74,0.74 0,0 0,-0.25 -0.23,0.77 0.77,0 0,0 -0.33,-0.1H34.5a0.39,0.39 0,0 0,-0.27 0.11,0.37 0.37,0 0,0 -0.11,0.27V47.62a0.37,0.37 0,0 0,0.11 0.27,0.39 0.39,0 0,0 0.27,0.11H51c0.21,0 0.3,-0.15 0.19,-0.33Z"
android:fillColor="#00c08b"/>
<path
android:pathData="M25.5,34.79H16.78a0.77,0.77 0,0 0,-0.33 0.1,0.74 0.74,0 0,0 -0.25,0.23L8.79,47.64c-0.11,0.18 0,0.33 0.19,0.33H25.5a0.39,0.39 0,0 0,0.26 -0.11,0.37 0.37,0 0,0 0.11,-0.26V35.17a0.37,0.37 0,0 0,-0.11 -0.26A0.39,0.39 0,0 0,25.5 34.79Z"
android:fillColor="#00c08b"/>
<path
android:pathData="M20.88,27.83H39.08c0.21,0 0.3,-0.15 0.19,-0.33L30.17,12.13a0.2,0.2 0,0 0,-0.07 -0.1,0.21 0.21,0 0,0 -0.24,0 0.2,0.2 0,0 0,-0.07 0.1l-9.1,15.37C20.59,27.69 20.67,27.83 20.88,27.83Z"
android:fillColor="#00c08b"/>
</group>
</vector>
74 changes: 74 additions & 0 deletions app/src/main/res/drawable/ic_app_icon_rounded_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>
21 changes: 21 additions & 0 deletions app/src/main/res/drawable/ic_app_launch_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="1.8"
android:scaleY="1.8">
<path
android:pathData="M0,0h60v60h-60z"
android:fillColor="#1d2241"/>
<path
android:pathData="M43.8,35.15a0.74,0.74 0,0 0,-0.25 -0.23,0.77 0.77,0 0,0 -0.33,-0.1H34.5a0.39,0.39 0,0 0,-0.27 0.11,0.37 0.37,0 0,0 -0.11,0.27V47.62a0.37,0.37 0,0 0,0.11 0.27,0.39 0.39,0 0,0 0.27,0.11H51c0.21,0 0.3,-0.15 0.19,-0.33Z"
android:fillColor="#00c08b"/>
<path
android:pathData="M25.5,34.79H16.78a0.77,0.77 0,0 0,-0.33 0.1,0.74 0.74,0 0,0 -0.25,0.23L8.79,47.64c-0.11,0.18 0,0.33 0.19,0.33H25.5a0.39,0.39 0,0 0,0.26 -0.11,0.37 0.37,0 0,0 0.11,-0.26V35.17a0.37,0.37 0,0 0,-0.11 -0.26A0.39,0.39 0,0 0,25.5 34.79Z"
android:fillColor="#00c08b"/>
<path
android:pathData="M20.88,27.83H39.08c0.21,0 0.3,-0.15 0.19,-0.33L30.17,12.13a0.2,0.2 0,0 0,-0.07 -0.1,0.21 0.21,0 0,0 -0.24,0 0.2,0.2 0,0 0,-0.07 0.1l-9.1,15.37C20.59,27.69 20.67,27.83 20.88,27.83Z"
android:fillColor="#00c08b"/>
</group>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_app_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_app_icon_background"/>
<foreground android:drawable="@drawable/ic_app_icon_foreground"/>
</adaptive-icon>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_app_icon_round.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_app_icon_background"/>
<foreground android:drawable="@drawable/ic_app_icon_foreground"/>
</adaptive-icon>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_app_icon_rounded.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_app_icon_rounded_background"/>
<foreground android:drawable="@drawable/ic_app_launch_icon"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_app_icon_rounded_background"/>
<foreground android:drawable="@drawable/ic_app_launch_icon"/>
</adaptive-icon>
Binary file added app/src/main/res/mipmap-hdpi/ic_app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-mdpi/ic_app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xhdpi/ic_app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxxhdpi/ic_app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<resources>
<string name="app_name">SDK Test</string>
<string name="app_name">Telnyx WebRTC</string>
<string name="webrtc_demo_title">Telnyx Mobile WebRTC</string>
<string name="connect">connect</string>
<string name="socket">Socket:</string>
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ buildscript {
dependencies {
classpath "com.android.tools.build:gradle:4.1.3"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.bugsnag:bugsnag-android-gradle-plugin:$versions.bugsnag"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.4.20"
classpath deps.google_play_services
classpath deps.android_gradle_plugin
Expand Down
5 changes: 5 additions & 0 deletions telnyx_rtc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ plugins {
}

apply plugin: 'maven-publish'
apply plugin: "com.bugsnag.android.gradle"


def githubProperties = new Properties()
githubProperties.load(new FileInputStream(rootProject.file("github.properties")))
Expand Down Expand Up @@ -159,6 +161,9 @@ dependencies {
implementation 'androidx.lifecycle:lifecycle-process:2.3.1'
testImplementation deps.ktor.client_test

//BugSnag:
implementation deps.bugsnag

// Volley
implementation deps.volley

Expand Down
13 changes: 12 additions & 1 deletion telnyx_rtc/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.telnyx.webrtc.sdk.sdk">
package="com.telnyx.webrtc.sdk.telnyx_rtc">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<application>
<meta-data android:name="com.bugsnag.android.APP_TYPE"
android:value="telnyx_rtc"/>
<meta-data android:name="com.bugsnag.android.PROJECT_PACKAGES"
android:value="com.telnyx.webrtc.sdk.telnyx_rtc"/>
<meta-data android:name="com.bugsnag.android.SEND_THREADS"
android:value="ALWAYS"/>
<meta-data
android:name="com.bugsnag.android.API_KEY"
android:value="8deb3e73bbe5d352ef442c42b129314c"/>
</application>
</manifest>
22 changes: 19 additions & 3 deletions telnyx_rtc/src/main/java/com/telnyx/webrtc/sdk/TelnyxClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.*
import com.google.gson.JsonObject
import com.telnyx.webrtc.sdk.model.*
import com.telnyx.webrtc.sdk.sdk.BuildConfig
import com.telnyx.webrtc.sdk.telnyx_rtc.BuildConfig
import com.telnyx.webrtc.sdk.socket.TxSocket
import com.telnyx.webrtc.sdk.socket.TxSocketListener
import com.telnyx.webrtc.sdk.utilities.ConnectivityHelper
Expand All @@ -26,6 +26,9 @@ import kotlinx.coroutines.cancel
import org.webrtc.IceCandidate
import timber.log.Timber
import java.util.*
import com.bugsnag.android.Bugsnag
import com.bugsnag.android.Configuration
import com.bugsnag.android.ThreadSendPolicy

/**
* The TelnyxClient class that can be used to control the SDK. Create / Answer calls, change audio device, etc.
Expand Down Expand Up @@ -59,10 +62,14 @@ class TelnyxClient(

/**
* Build a call containing all required parameters.
* Will return null if there has been no session established (No successful connection and login)
* @return [Call]
*/
private fun buildCall(): Call {
return Call(context, this, socket, sessionId!!, audioManager!!)
private fun buildCall(): Call? {
sessionId?.let {
return Call(context, this, socket, sessionId!!, audioManager!!)
}
return null
}

/**
Expand Down Expand Up @@ -134,6 +141,15 @@ class TelnyxClient(
}

init {

//Initialize BugSnag
val config = Configuration.load(context)
config.projectPackages = setOf("com.telnyx.webrtc.sdk.telnyx_rtc")
config.sendThreads = ThreadSendPolicy.ALWAYS
config.enabledErrorTypes.anrs = false
config.appType = "telnyx_rtc"
Bugsnag.start(context)

socket = TxSocket(
host_address = Config.TELNYX_HOST_ADDRESS,
port = Config.TELNYX_PORT
Expand Down
Loading

0 comments on commit 433a403

Please sign in to comment.