11 |
12 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/gradle.properties:
--------------------------------------------------------------------------------
1 | # SDK Gradle settings.
2 |
3 | # Restcomm SDK Artifact properties for upload to maven repo
4 | LIBRARY_GROUP=org.restcomm
5 | LIBRARY_ARTIFACT_ID=restcomm-android-sdk
6 | # Dynamically provided usually via environment variable, so commenting out here:
7 | #LIBRARY_VERSION=1.0.0-beta6-SNAPSHOT
8 |
9 | # Android version name & code: For official builds, this gets overwritten by global settings and/or environment variables
10 | # When using double quotes in this one the generated BuildConfig.java get's messed up (has 2 double quotes and breaks the build)
11 | VERSION_NAME=UNOFFICIAL
12 | VERSION_CODE=1
13 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RestComm/restcomm-android-sdk/2717e9e08fae6db1ce2395759997ff9168fe3930/restcomm.android.sdk/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/restcomm.android.sdk/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Dec 19 21:13:19 EET 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/libs/.gitignore:
--------------------------------------------------------------------------------
1 | *.jar
2 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/libs/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RestComm/restcomm-android-sdk/2717e9e08fae6db1ce2395759997ff9168fe3930/restcomm.android.sdk/libs/.keep
--------------------------------------------------------------------------------
/restcomm.android.sdk/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/Antonis/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Needed for TestFairy (important: remove for production builds)
20 | ##-keep class com.testfairy.** { *; }
21 | ##-dontwarn com.testfairy.**
22 | ##-keepattributes Exceptions, Signature, LineNumberTable
23 |
24 |
25 |
26 | # For some reason, when I try to minify I get 'unresolved references to classes or interfaces'. Yet the code functions just fine. Let's remove the warnings
27 | #-dontwarn
28 | #-libraryjars mylibrary.jar(!someunusedpackage/**)
29 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/restcomm-android-sdk-version.properties:
--------------------------------------------------------------------------------
1 | #Mon Oct 17 16:18:19 EEST 2016
2 | VERSION_CODE=1611
3 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/settings.gradle:
--------------------------------------------------------------------------------
1 | //include ':libwebrtc'
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/androidTest/java/org/restcomm/android/sdk/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package org.restcomm.android.sdk;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
20 |
21 |
24 |
27 |
30 |
31 |
33 |
37 |
38 |
39 |
41 |
42 |
43 |
44 |
45 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/RCPresenceEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2015, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 |
23 | package org.restcomm.android.sdk;
24 |
25 | /**
26 | * RCPresenceEvent represents a Presence event that is sent through RCDeviceListener (Not Implemented yet)
27 | */
28 | public class RCPresenceEvent {
29 | String name;
30 | boolean available;
31 |
32 | public RCPresenceEvent(String name, boolean available)
33 | {
34 | }
35 |
36 | public String getName()
37 | {
38 | return this.name;
39 | }
40 |
41 | public boolean isAvailable()
42 | {
43 | return available;
44 | }
45 |
46 | public String toString()
47 | {
48 | return "";
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/SignalingClient/JainSipClient/JainSipAccountManagerImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2015, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 |
23 | package org.restcomm.android.sdk.SignalingClient.JainSipClient;
24 |
25 | import android.gov.nist.javax.sip.clientauthutils.AccountManager;
26 | import android.gov.nist.javax.sip.clientauthutils.UserCredentials;
27 |
28 | import android.javax.sip.ClientTransaction;
29 |
30 |
31 | public class JainSipAccountManagerImpl implements AccountManager {
32 |
33 | String Username;
34 | String Password;
35 | String RemoteIp;
36 |
37 | public JainSipAccountManagerImpl(String username, String RemoteIp, String password)
38 | {
39 | this.Username = username;
40 | this.Password = password;
41 | this.RemoteIp = RemoteIp;
42 |
43 | }
44 |
45 | public UserCredentials getCredentials(ClientTransaction challengedTransaction, String realm)
46 | {
47 | return new JainSipUserCredentialsImpl(Username, RemoteIp, Password);
48 | }
49 | }
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/SignalingClient/JainSipClient/JainSipException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2015, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 |
23 | package org.restcomm.android.sdk.SignalingClient.JainSipClient;
24 |
25 | import org.restcomm.android.sdk.RCClient;
26 |
27 | class JainSipException extends Exception {
28 | public RCClient.ErrorCodes errorCode;
29 | public String errorText;
30 |
31 | JainSipException(RCClient.ErrorCodes errorCode)
32 | {
33 | this(errorCode, RCClient.errorText(errorCode));
34 | }
35 |
36 | JainSipException(RCClient.ErrorCodes errorCode, String errorText)
37 | {
38 | this.errorCode = errorCode;
39 | this.errorText = errorText;
40 | }
41 |
42 | JainSipException(RCClient.ErrorCodes errorCode, Throwable throwable)
43 | {
44 | this(errorCode, RCClient.errorText(errorCode), throwable);
45 | }
46 |
47 |
48 | // initialize an exception, but also chain another exception to it
49 | JainSipException(RCClient.ErrorCodes errorCode, String errorText, Throwable throwable)
50 | {
51 | this.errorCode = errorCode;
52 | this.errorText = errorText;
53 |
54 | this.initCause(throwable);
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/SignalingClient/JainSipClient/JainSipUserCredentialsImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2015, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 |
23 | package org.restcomm.android.sdk.SignalingClient.JainSipClient;
24 |
25 | import android.gov.nist.javax.sip.clientauthutils.UserCredentials;
26 |
27 |
28 | public class JainSipUserCredentialsImpl implements UserCredentials {
29 | private String userName;
30 | private String sipDomain;
31 | private String password;
32 |
33 | public JainSipUserCredentialsImpl(String userName, String sipDomain, String password)
34 | {
35 | this.userName = userName;
36 | this.sipDomain = sipDomain;
37 | this.password = password;
38 | }
39 |
40 | public String getPassword()
41 | {
42 | return password;
43 | }
44 |
45 | public String getSipDomain()
46 | {
47 | return sipDomain;
48 | }
49 |
50 | public String getUserName()
51 | {
52 | return userName;
53 | }
54 |
55 | }
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/SignalingClient/SignalingHandlerThread.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2015, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 |
23 | package org.restcomm.android.sdk.SignalingClient;
24 |
25 | import android.os.Handler;
26 | import android.os.HandlerThread;
27 |
28 | // SignalingHandlerThread encapsulates the signaling thread (separate from UI thread) and facilitates asynchronous communication between he two.
29 | // It installs an Android Handler and takes care of all signaling actions from UI thread -> JainSipClient and all responses/events from JainSipClient -> UI thread
30 | class SignalingHandlerThread extends HandlerThread {
31 | Handler signalingHandler;
32 | private static final String TAG = "SignalingHandlerThread";
33 | //Handler uiHandler;
34 |
35 | SignalingHandlerThread(SignalingClient uiHandler)
36 | {
37 | super("signaling-handler-thread");
38 | //this.uiHandler = uiHandler;
39 |
40 | start();
41 |
42 | signalingHandler = new SignalingHandler(this.getLooper(), uiHandler);
43 | }
44 |
45 | Handler getHandler()
46 | {
47 | return signalingHandler;
48 | }
49 |
50 | /*
51 | public void start()
52 | {
53 | super.start();
54 | }
55 | */
56 | }
57 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/fcm/FcmInstanceIDService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Google Inc. All Rights Reserved.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.restcomm.android.sdk.fcm;
18 |
19 | import com.google.firebase.iid.FirebaseInstanceId;
20 | import com.google.firebase.iid.FirebaseInstanceIdService;
21 |
22 | import android.util.Log;
23 |
24 | import org.restcomm.android.sdk.storage.StorageManagerPreferences;
25 |
26 | public class FcmInstanceIDService extends FirebaseInstanceIdService {
27 |
28 | private static final String TAG = "FcmInstanceIDService";
29 |
30 | /**
31 | * Called if InstanceID token is updated. This may occur if the security of
32 | * the previous token had been compromised. Note that this is called when the InstanceID token
33 | * is initially generated so this is where you would retrieve the token.
34 | */
35 | @Override
36 | public void onTokenRefresh() {
37 |
38 | String refreshedToken = FirebaseInstanceId.getInstance().getToken();
39 | Log.d(TAG, "Refreshed token: " + refreshedToken);
40 |
41 | sendRegistrationToServer();
42 | }
43 |
44 | /**
45 | * Persist token to third-party servers.
46 | *
47 | * Modify this method to associate the user's FCM InstanceID token with any server-side account
48 | * maintained by your application.
49 | *
50 | */
51 | private void sendRegistrationToServer() {
52 | Log.d(TAG, "Updating server");
53 | StorageManagerPreferences storageManagerPreferences = new StorageManagerPreferences(this);
54 | new FcmConfigurationHandler(storageManagerPreferences, null).updateBinding();
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/fcm/FcmMessagingService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2016 Google Inc. All Rights Reserved.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.restcomm.android.sdk.fcm;
18 |
19 | import com.google.firebase.messaging.FirebaseMessagingService;
20 | import com.google.firebase.messaging.RemoteMessage;
21 |
22 | import android.content.Intent;
23 | import android.util.Log;
24 |
25 | import org.restcomm.android.sdk.RCDevice;
26 |
27 | public class FcmMessagingService extends FirebaseMessagingService {
28 |
29 | private static final String TAG = "FcmMessagingService";
30 |
31 | /**
32 | * Called when message is received.
33 | *
34 | * @param remoteMessage
35 | * Object representing the message received from Firebase Cloud Messaging.
36 | */
37 | @Override
38 | public void onMessageReceived(RemoteMessage remoteMessage) {
39 | Log.d(TAG, "Push Notification from: " + remoteMessage.getFrom());
40 | sendNotification();
41 | }
42 |
43 | private void sendNotification() {
44 | //start service
45 | //we dont need to start a service if its already running.
46 | //The restcomm server will always send the push...
47 | if (!RCDevice.isServiceAttached && !RCDevice.isServiceInitialized){
48 | Log.d(TAG, "service is not attached");
49 | Intent intent = new Intent(this, RCDevice.class);
50 | intent.setAction(RCDevice.ACTION_FCM);
51 | if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O){
52 | startForegroundService(intent);
53 | } else{
54 | startService(intent);
55 | }
56 | }
57 |
58 | Log.d(TAG, "sendNotification is called");
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/fcm/FcmPushRegistrationListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2017, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 |
23 | package org.restcomm.android.sdk.fcm;
24 |
25 | import org.restcomm.android.sdk.RCClient;
26 |
27 | public interface FcmPushRegistrationListener {
28 | /**
29 | * It will be called when registering for push notification is completed.
30 | * @param status Error Code - if different than SUCCESS text will be filled with error
31 | * @param text Error text
32 | * @param isUpdate is this push registration triggered as a resule of
33 | * RCDevice.initialize (false) or RCDevice.reconfigure (true)
34 | **/
35 | void onRegisteredForPush(RCClient.ErrorCodes status, String text, boolean isUpdate);
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/fcm/model/FcmApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2017, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 |
23 | package org.restcomm.android.sdk.fcm.model;
24 |
25 | import org.json.JSONException;
26 | import org.json.JSONObject;
27 | import org.restcomm.android.sdk.util.RCLogger;
28 |
29 | public class FcmApplication implements FcmModelInterface {
30 |
31 | private static final String TAG = FcmApplication.class.getCanonicalName();
32 |
33 | private String sid;
34 | private String friendlyName;
35 |
36 | public FcmApplication(){}
37 |
38 | public FcmApplication(String sid, String friendlyName){
39 | this.sid = sid;
40 | this.friendlyName = friendlyName;
41 | }
42 |
43 | public String getSid() {
44 | return sid;
45 | }
46 |
47 | public String getFriendlyName() {
48 | return friendlyName;
49 | }
50 |
51 | @Override
52 | public JSONObject getJSONObject() {
53 | JSONObject jsonObject = new JSONObject();
54 | try {
55 | jsonObject.put("sid", this.sid);
56 | jsonObject.put("friendlyName", this.friendlyName);
57 | } catch (JSONException e) {
58 | RCLogger.e(TAG, e.toString());
59 | }
60 | return jsonObject;
61 | }
62 |
63 | @Override
64 | public void fillFromJson(String jsonString) {
65 | JSONObject jsonObject;
66 | try {
67 | jsonObject = new JSONObject(jsonString);
68 | String sid = jsonObject.getString("sid");
69 | String name = jsonObject.getString("friendlyName");
70 | this.sid = sid;
71 | this.friendlyName = name;
72 | } catch (JSONException e) {
73 | RCLogger.e(TAG, e.toString());
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/fcm/model/FcmCredentials.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2017, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 |
23 | package org.restcomm.android.sdk.fcm.model;
24 |
25 | import org.json.JSONException;
26 | import org.json.JSONObject;
27 | import org.restcomm.android.sdk.util.RCLogger;
28 |
29 | public class FcmCredentials implements FcmModelInterface {
30 |
31 | private static final String TAG = FcmCredentials.class.getCanonicalName();
32 |
33 | private String sid;
34 | private String applicationSid;
35 | private String credentialType;
36 |
37 | public FcmCredentials(){}
38 |
39 | public FcmCredentials(String sid, String applicationSid, String credentialType){
40 | this.sid = sid;
41 | this.applicationSid = applicationSid;
42 | this.credentialType = credentialType;
43 | }
44 |
45 | public String getSid() {
46 | return sid;
47 | }
48 |
49 | public String getApplicationSid() {
50 | return applicationSid;
51 | }
52 |
53 | public String getCredentialType() {
54 | return credentialType;
55 | }
56 |
57 | @Override
58 | public JSONObject getJSONObject() {
59 | JSONObject jsonObject = new JSONObject();
60 | try {
61 | jsonObject.put("sid", this.sid);
62 | jsonObject.put("applicationSid", this.applicationSid);
63 | jsonObject.put("credentialType", this.credentialType);
64 | } catch (JSONException e) {
65 | RCLogger.e(TAG, e.toString());
66 | }
67 | return jsonObject;
68 | }
69 |
70 | @Override
71 | public void fillFromJson(String jsonString) {
72 | JSONObject jsonObject;
73 | try {
74 | jsonObject = new JSONObject(jsonString);
75 | String sid = jsonObject.getString("sid");
76 | String applicationSid = jsonObject.getString("applicationSid");
77 | String credentialType = jsonObject.getString("credentialType");
78 | this.sid = sid;
79 | this.applicationSid = applicationSid;
80 | this.credentialType = credentialType;
81 | } catch (JSONException e) {
82 | RCLogger.e(TAG, e.toString());
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/fcm/model/FcmModelInterface.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2017, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 | package org.restcomm.android.sdk.fcm.model;
23 |
24 | import org.json.JSONObject;
25 |
26 | public interface FcmModelInterface {
27 |
28 | JSONObject getJSONObject();
29 |
30 | void fillFromJson(String jsonString);
31 | }
32 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/storage/StorageManagerInterface.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2015, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 |
23 | package org.restcomm.android.sdk.storage;
24 |
25 | import java.util.Map;
26 |
27 | /**
28 | * Interface with main storage saving and reading functions
29 | **/
30 |
31 | public interface StorageManagerInterface {
32 |
33 | String getString(String key, String defaultValue);
34 |
35 | int getInt(String key, int defaultValue);
36 |
37 | boolean getBoolean(String key, boolean defaultValue);
38 |
39 | void saveString(String key, String value);
40 |
41 | void saveInt(String key, int value);
42 |
43 | void saveBoolean(String key, boolean value);
44 |
45 | Map getAllEntries();
46 | }
47 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/storage/StorageManagerPreferences.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2017, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 |
23 | package org.restcomm.android.sdk.storage;
24 |
25 | import android.content.Context;
26 | import android.content.SharedPreferences;
27 |
28 | import java.util.Map;
29 |
30 | /**
31 | * Class which stores data to device's shared preferences
32 | **/
33 |
34 | public class StorageManagerPreferences implements StorageManagerInterface {
35 |
36 | private final String STORAGE_PREF = "org.restcomm.android.sdk.storage_preferences";
37 |
38 | private SharedPreferences mSharedPreferences;
39 |
40 | public StorageManagerPreferences(Context context) {
41 | mSharedPreferences = context.getSharedPreferences(STORAGE_PREF, Context.MODE_PRIVATE);
42 | }
43 |
44 | @Override
45 | public String getString(String key, String defaultValue) {
46 | return mSharedPreferences.getString(key, defaultValue);
47 | }
48 |
49 | @Override
50 | public int getInt(String key, int defaultValue) {
51 | return mSharedPreferences.getInt(key, defaultValue);
52 | }
53 |
54 | @Override
55 | public boolean getBoolean(String key, boolean defaultValue) {
56 | return mSharedPreferences.getBoolean(key, defaultValue);
57 | }
58 |
59 | @Override
60 | public void saveString(String key, String value) {
61 | SharedPreferences.Editor editor = mSharedPreferences.edit();
62 | editor.putString(key, value).apply();
63 | editor.commit();
64 | }
65 |
66 | @Override
67 | public void saveInt(String key, int value) {
68 | SharedPreferences.Editor editor = mSharedPreferences.edit();
69 | editor.putInt(key, value).apply();
70 | editor.commit();
71 | }
72 |
73 | @Override
74 | public void saveBoolean(String key, boolean value) {
75 | SharedPreferences.Editor editor = mSharedPreferences.edit();
76 | editor.putBoolean(key, value).apply();
77 | editor.commit();
78 | }
79 |
80 | @Override
81 | public Map getAllEntries(){
82 | return mSharedPreferences.getAll();
83 | }
84 | }
85 |
86 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/storage/StorageUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2017, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 |
23 | package org.restcomm.android.sdk.storage;
24 |
25 | import android.content.Intent;
26 |
27 | import java.util.HashMap;
28 | import java.util.Map;
29 |
30 | /**
31 | * Manage common Storage actions like save, get params
32 | */
33 | public class StorageUtils {
34 |
35 | /**
36 | * Saves hash map key value pairs into Store Manager
37 | * @param storageManagerInterface StorageManagerInterface instance
38 | * @param params parameters
39 | */
40 | public static void saveParams(StorageManagerInterface storageManagerInterface, HashMap params){
41 | for (Map.Entry entry : params.entrySet()) {
42 | String key = entry.getKey();
43 | Object value = entry.getValue();
44 |
45 | if (value instanceof String){
46 | storageManagerInterface.saveString(key, (String) value);
47 | } else if (value instanceof Integer) {
48 | storageManagerInterface.saveInt(key, (int) value);
49 | } else if (value instanceof Enum){
50 | storageManagerInterface.saveInt(key, ((Enum) value).ordinal());
51 | } else if (value instanceof Boolean){
52 | storageManagerInterface.saveBoolean(key, (boolean)value);
53 | } else if (value instanceof Intent){
54 | storageManagerInterface.saveString(key,((Intent) value).toUri(Intent.URI_INTENT_SCHEME));
55 | }
56 | }
57 | }
58 |
59 | /**
60 | * Returns the parameters from the Storage Manager as hash map
61 | * @param storageManagerInterface StorageManagerInterface instance
62 | * @return HashMap
63 | */
64 | public static HashMap getParams(StorageManagerInterface storageManagerInterface){
65 | return new HashMap<>(storageManagerInterface.getAllEntries());
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/util/RCException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2015, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 |
23 | package org.restcomm.android.sdk.util;
24 |
25 | import org.restcomm.android.sdk.RCClient;
26 |
27 | public class RCException extends Exception {
28 | public RCClient.ErrorCodes errorCode;
29 | public String errorText;
30 |
31 | // Only provide errorCode, text is automatically generated with RCClient.errorText()
32 | public RCException(RCClient.ErrorCodes errorCode)
33 | {
34 | this(errorCode, RCClient.errorText(errorCode));
35 | }
36 |
37 | public RCException(RCClient.ErrorCodes errorCode, String errorText)
38 | {
39 | this.errorCode = errorCode;
40 | this.errorText = errorText;
41 | }
42 |
43 | // initialize an exception, but also chain another exception to it
44 | public RCException(RCClient.ErrorCodes errorCode, Throwable throwable)
45 | {
46 | this(errorCode, RCClient.errorText(errorCode), throwable);
47 | }
48 |
49 | // initialize an exception, but also chain another exception to it
50 | public RCException(RCClient.ErrorCodes errorCode, String errorText, Throwable throwable)
51 | {
52 | this.errorCode = errorCode;
53 | this.errorText = errorText;
54 |
55 | this.initCause(throwable);
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/util/RegistrationFsmContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * TeleStax, Open Source Cloud Communications
3 | * Copyright 2011-2015, Telestax Inc and individual contributors
4 | * by the @authors tag.
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * under the terms of the GNU Affero General Public License as
8 | * published by the Free Software Foundation; either version 3 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Affero General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Affero General Public License
17 | * along with this program. If not, see
18 | *
19 | * For questions related to commercial use licensing, please contact sales@telestax.com.
20 | *
21 | */
22 |
23 | package org.restcomm.android.sdk.util;
24 |
25 | import org.restcomm.android.sdk.RCClient;
26 | import org.restcomm.android.sdk.RCDeviceListener;
27 |
28 | /**
29 | * Class for external context provided by RegistrationFsm users (i.e. RCDevice)
30 | */
31 | public class RegistrationFsmContext {
32 | RCDeviceListener.RCConnectivityStatus connectivityStatus;
33 | RCClient.ErrorCodes status;
34 | String text;
35 |
36 | public RegistrationFsmContext(RCDeviceListener.RCConnectivityStatus connectivityStatus, RCClient.ErrorCodes status, String text)
37 | {
38 | this.connectivityStatus = connectivityStatus;
39 | this.status = status;
40 | this.text = text;
41 | }
42 |
43 | @Override
44 | public String toString()
45 | {
46 | StringBuilder result = new StringBuilder();
47 | result.append(connectivityStatus).append(", ").append(status).append(", ").append(text);
48 | return result.toString();
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/res/drawable/ic_call_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/res/drawable/ic_call_end_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/res/drawable/ic_chat_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/res/drawable/ic_mic_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/res/drawable/ic_mic_off_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/res/drawable/ic_phone_in_talk_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/res/drawable/ic_phone_missed_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/res/drawable/ic_videocam_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/res/raw/busy_tone_sample.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RestComm/restcomm-android-sdk/2717e9e08fae6db1ce2395759997ff9168fe3930/restcomm.android.sdk/src/main/res/raw/busy_tone_sample.mp3
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/res/raw/calling_sample.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RestComm/restcomm-android-sdk/2717e9e08fae6db1ce2395759997ff9168fe3930/restcomm.android.sdk/src/main/res/raw/calling_sample.mp3
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/res/raw/message_sample.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RestComm/restcomm-android-sdk/2717e9e08fae6db1ce2395759997ff9168fe3930/restcomm.android.sdk/src/main/res/raw/message_sample.mp3
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/res/raw/ringing_sample.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RestComm/restcomm-android-sdk/2717e9e08fae6db1ce2395759997ff9168fe3930/restcomm.android.sdk/src/main/res/raw/ringing_sample.mp3
--------------------------------------------------------------------------------
/restcomm.android.sdk/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Default
5 | HD (1280 x 720)
6 | VGA (640 x 480)
7 | QVGA (320 x 240)
8 |
9 |
10 |
11 | Default
12 | 1280 x 720
13 | 640 x 480
14 | 320 x 240
15 |
16 |
17 |
18 | Default
19 | 30 fps
20 | 15 fps
21 |
22 |
23 |
24 | Default
25 | Manual
26 |
27 |
28 |
29 | VP8
30 | VP9
31 | H264
32 |
33 |
34 |
35 | OPUS
36 | ISAC
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/scripts/.gitignore:
--------------------------------------------------------------------------------
1 | *.swp
2 |
--------------------------------------------------------------------------------
/scripts/configuration/.gitignore:
--------------------------------------------------------------------------------
1 | # ignore not encrypted files NOT ending with .enc
2 | *
3 | # ignore non encrypted files -don't want to commit encrypted files by mistake! For some weird reason adding only this doesn't work, we need the previous line too
4 | !*.enc
5 |
--------------------------------------------------------------------------------
/scripts/configuration/android.jks.enc:
--------------------------------------------------------------------------------
1 | U2FsdGVkX1/Hxf/5dAKmyiH4Elk4CzAVASUJquN4lzOJ12+94Qj+UtRYgbS+bYwN
2 | Wd+SmX3QLb62AM1JbSBnLfpZ1JQPHTzcxlMZ1yq6Rwo3jybrnEU/oLCGE+Cefzar
3 | yrzPAMqW7H4mNVECLZ8lL2FfoA7w13x4HyTo7bZXmtQowepWYcF3ws6OcKspYIWo
4 | dnQY2vPjzooJCPdPjO49i5UbaciXn62D+fkNw3dRn5FVEpq+RWjCHHALg34nAjUd
5 | hTEo29SHTpc9helIQkNUOVu5KZlKG9tTDzZds9tiUSmFhCItL0Xo6iONiKYFWIBO
6 | GTV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G4H49gBN6KYvHlg7iQcspoIgkzWS0Sy7HVBYloVHBG
38 | R0AVOFzyx9AEm0ML9YWExvKYr3P6FQDlU8/kO2d7MIpAb/psKbfgL0jc4BHcWdhC
39 | Uin60AmI1ZA6MGZWsJT+Y7bMgDpC2pOIFODBokvZIGELw7Gb/Dv68g7AKEcF9KYi
40 | wYnlxYLlGIEDZdjs3O6pBHkewHF1HRWW/6SluJrq4Yolko9OzP7wt6AP5mbTvvdt
41 | LhcuYdzLjVdLm+Ap/q/m8dlp2mAmszNfFClZmoNAYoNOzQfytP6QdFWKmbibF8yu
42 | lZqakYon0uaFBu3/sOEDt1x6LZ8L8qusc7iCzVOxybBpuA4HOyq+4A55sJD6qZs9
43 | ErHkaOpIOuKPx14K8jJO7XG3R5lmHhjb5mljHmVWQfH9/IJtMGSuKifOm9TgDhdE
44 | 6iHiGejSeD1wDdGpZuBPKZAEx1jNmwGcZ9F2S+1crE0Dt/8KCHTdg0ACqprBa+Ij
45 | Loa94a1ytRU1uev0ZWlluuGRmWaPCGZGC9MAl4wdDwpFf1wRwXN+sahY3vFLvRh9
46 | +ni9Z9VUpQ+Wm8bKHZvNG1gcebKd3aW01ry8tQg6Lh5jNJJDrXIXP7RRMwNubn3/
47 | ewBWXeK5hQInqSaefPR2Bb3/HI8NhGm8h93bN35nbEzBqwFnIHT1YML4gtVsOCAa
48 | pmPuHXCgPYVmYa+pmTZremi0CImgvBPSYbhOQ1UeGkZhILmBi9BfnNDdJZbWpkKG
49 |
--------------------------------------------------------------------------------
/scripts/configuration/trustdb.gpg.enc:
--------------------------------------------------------------------------------
1 | U2FsdGVkX1/P4eHiXIijW0wnRYGiASIp6+6vS/f8aPrwAUc+AljUsQQ9b87tqGGf
2 | +sulrTLN0WPdcDkFcBuRbYU3nR2gx63pk8az8aukZ2i8YSSVUDtYqR1t3t/4gSE6
3 | qNeCV3r/LSAHgX0JKAUDhAMGnh6QqIKjuEvX/P+gXUWSBEzigT40s7yrFeyR8AOh
4 | znrua42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schXMZ
20 | PqfrkPnHdqzC6w6OupAxKh/3R0aQRbtUf3ciXMrcxPu8bg/d8Zfi9Qv/GV+JQq1f
21 | jAnEjddndIYIoWqjLtT+pwt+/zENAohyx3DxXGSxt1Bxle4HhALHjY/WlPuaAA1l
22 | 5VryT0Wr4wVxRvKArtNXWX3GTeC2KNVepIWUHwR+2wSY/DRyhoipLvUqn7q7tFnV
23 | uZoIwj/1lnbBLcVdUQro4rQ0ry5xF96DKxe2IV43q/8IcndYoq+trxoV35XatugY
24 | cnRIxlJlVckgPymClvgEVqAK9iWkwcVW1rsPUsdp58yhzMekdzQeqJLMjp/xl5OC
25 | kOA5jiJmWKuz2jekaDxin71Sq9XdT68DPZy/HWT9ZlFt0h1eaPaW4Z7dnLLn/se9
26 | Jk+Dm6iMAA91eb31JmFLb0NXDuejBMhunYmK7iDC7Ri+Vq/ZymB8Xu9TjtftiXMF
27 | 2MN2AV23t+1/aoZ5VhQmanDYTzdwMhpjNk980AzNDViENBCLThqOz6htedB/X0mW
28 | 9xNbf0eJO5rYzRVaOMFMkg==
29 |
--------------------------------------------------------------------------------
/scripts/keystore/debug.keystore.enc:
--------------------------------------------------------------------------------
1 | U2FsdGVkX1/EAExn5PtaD0H1rmC40xnids0x7ynVbQPf4YoWA/ks6srGNLq1jWvD
2 | 5y+ZRD7NaKgtcttt2XhwY8rGHGqWJDxI1Syk8Xrt2RMBsjl2fwk1jv5DUw5hDsqX
3 | nh7khrv8ZtxgcWMFg0YL3Osmic1lsy6x3jgjRt0WAnUARNLoH3Vx8ijNc+ZJwikI
4 | 6eB7m3SjZskBbkKv9N/b8EX+6w/6/zrKmdxntXcfwRq4JhgzUhd4ino/fa+YkIvJ
5 | O0Tizw+Xc5aKY3/vlAYuOxEMPetSlNvpf4KrnZjqfvLtATP+ZO2jjzX9lxncu7kp
6 | ttE/o4K7oekVwnu29cQE6DLwnm2TaGmsfdpIgwWgx5FUR6EQOsG7SD1q43anjliP
7 | G3OPMtomVDlaBcMdZXyas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eSbcr4JKJLmpC4
23 | JoJZaeRaTf3jBQH6gp7qGk6DZrN/ebW+W6pi7vvqfhs4JrJnFVtvqKy65UE4KM0B
24 | wISy6QW9YEjSTjA1NcoL874cnnVE0tkvf2/pEtwxnY110O4V2aag4ZbrO3FiuHs7
25 | k8IsSJxcg0Nm6XTuMdNdht0MRDg0twxI49Mg1P5okhlwlc7BqIGck4PzOQe4mx8E
26 | n2bS4CmB33d94v3npBdYFjynflKX64U7kL8KmJYNFSPv6AXX/E+dfNOeeJD9eQpA
27 | isYjCi/uV+w7qhK0bi4e38xsT9FQQlbVprxn/mY0dr4=
28 |
--------------------------------------------------------------------------------
/scripts/pod-repo-update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo "Updating pod repository..."
4 | pod repo update > /dev/null 2>&1
5 | #ls -al > /dev/null 2>&1
6 |
--------------------------------------------------------------------------------
/scripts/publish-sdk.bash:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Publish SDK to maven repository
4 |
5 | echo
6 | echo "== "
7 | echo "== Publishing SDK"
8 | echo "== "
9 | echo
10 |
11 | echo "-- Building SDK and uploading to maven repository"
12 | # remember that when putting more than 1 task in the command line, gradle makes sure that the are not ran more than one time. Also,
13 | # notice that ORG_GRADLE_PROJECT_BUILD_NUMBER is automatically passed as a property in gragle to provide the Build Number
14 | cd restcomm.android.sdk && ./gradlew --quiet -x androidJavadocs uploadArchives closeAndPromoteRepository || exit 1
15 | cd .. || exit 1
16 |
--------------------------------------------------------------------------------
/scripts/setup-prerequisites.bash:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Setup prerequisites that are needed by all builds
4 |
5 | # For now this is needed when building and publishing documentation because we need to push to upstream repo
6 | git config credential.helper "store --file=.git/credentials" || exit 1
7 | echo "https://${GITHUB_OAUTH_TOKEN}:@github.com" > .git/credentials 2>/dev/null || exit 1
8 | git config user.name $COMMIT_USERNAME || exit 1
9 | git config user.email "$COMMIT_AUTHOR_EMAIL" || exit 1
10 |
11 | # SSH endpoint not needed any longer, since we 're using OAuth tokens with https, but let's leave it around in case we need it in the future
12 | #export REPO=`git config remote.origin.url`
13 | #export SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
14 |
15 | #echo "-- Will use ssh repo: $SSH_REPO"
16 | #git remote -v
17 |
18 | # Let's keep global gradle.properties decryption and installation only for Travis. Locally we have a working gradle.properties
19 | if [ ! -z "$TRAVIS" ]
20 | then
21 | echo
22 | echo "== "
23 | echo "== Setting up Prerequisites"
24 | echo "== "
25 | echo
26 |
27 | mkdir -p ~/.gradle || exit 1
28 |
29 | if [ ! -z $TRUSTED_BUILD ]
30 | then
31 | if [ -z $FILE_ENCRYPTION_PASSWORD ]
32 | then
33 | echo "-- Error: FILE_ENCRYPTION_PASSWORD environment variable missing"
34 | exit 1
35 | fi
36 |
37 | echo "-- Decrypting and installing global gradle.properties"
38 | openssl aes-256-cbc -k "$FILE_ENCRYPTION_PASSWORD" -in scripts/configuration/${GLOBAL_GRADLE_PROPERTIES}.enc -d -a -out scripts/configuration/${GLOBAL_GRADLE_PROPERTIES} || exit 1
39 | mv scripts/configuration/${GLOBAL_GRADLE_PROPERTIES} ~/.gradle/${GLOBAL_GRADLE_PROPERTIES} || exit 1
40 |
41 | echo "-- Decrypting and installing gnupg resources for maven artifact signing + upload"
42 | # DEBUG
43 | #ls ~/.gnupg
44 | openssl aes-256-cbc -k "$FILE_ENCRYPTION_PASSWORD" -in scripts/configuration/${GPG_SECRING}.enc -d -a -out scripts/configuration/${GPG_SECRING} || exit 1
45 | mv scripts/configuration/${GPG_SECRING} ~/.gnupg/ || exit 1
46 |
47 | openssl aes-256-cbc -k "$FILE_ENCRYPTION_PASSWORD" -in scripts/configuration/${GPG_TRUSTDB}.enc -d -a -out scripts/configuration/${GPG_TRUSTDB} || exit 1
48 | mv scripts/configuration/${GPG_TRUSTDB} ~/.gnupg/ || exit 1
49 |
50 | # Need keystore file to be able to sign the .apk. Let's keep debug.keystore decryption and installation only for Travis. Locally we have a working keystore that might be confusing to update.
51 | echo "-- Setting up signing for .apk"
52 | # We need the debug.keystore in order to be able to build a debug .apk
53 | echo "-- Decrypting and installing signing keystore for development builds"
54 | openssl aes-256-cbc -k "$FILE_ENCRYPTION_PASSWORD" -in scripts/keystore/${DEVELOPMENT_KEYSTORE}.enc -d -a -out ~/.android/${DEVELOPMENT_KEYSTORE} || exit 1
55 |
56 | echo "-- Decrypting and installing signing keystore for release builds"
57 | mkdir -p ~/security
58 | openssl aes-256-cbc -k "$FILE_ENCRYPTION_PASSWORD" -in scripts/configuration/${RELEASE_KEYSTORE}.enc -d -a -out ~/security/${RELEASE_KEYSTORE} || exit 1
59 |
60 |
61 | #echo "-- Installing keystore"
62 | # Overwrite default keystore file only in travis
63 | #cp scripts/certs/${DEVELOPMENT_KEYSTORE} || exit 1
64 | #rm scripts/certs/${DEVELOPMENT_KEYSTORE} || exit 1
65 | fi
66 | fi
67 |
--------------------------------------------------------------------------------
/scripts/upload-dsym-testfairy.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | TESTFAIRY_ENDPOINT="http://app.testfairy.com/upload/dsym/"
4 |
5 | ZIP=zip
6 | #CURL=curl
7 | STAT=stat
8 | DATE=date
9 |
10 | help() {
11 | echo "Usage: ${0} [-f] TESTFAIRY_API_KEY [-p DSYM_PATH]"
12 | exit 1
13 | }
14 |
15 | foreground_upload() {
16 | # Upload zipped .dSYM file to TestFairy's servers
17 | echo "Uploading in the foreground: ${1}"
18 | curl -v --progress-bar -s -F api_key="${API_KEY}" -F dsym=@"${1}" "${TESTFAIRY_ENDPOINT}"
19 | echo "Symbols uploaded"
20 |
21 | # Clean up behind
22 | rm -f ${1}
23 | }
24 |
25 | API_KEY=$TESTFAIRY_API_KEY
26 | if [ ! "${API_KEY}" ]; then
27 | help
28 | fi
29 |
30 | DWARF_DSYM_FILE_NAME=`basename $DSYM_PATH`
31 | if [ "${DSYM_PATH}" == "" ] || [ "${DSYM_PATH}" == "/" ] || [ ! -d "${DSYM_PATH}" ]; then
32 | echo "Fatal: Can't find .dSYM folder!"
33 | help
34 | fi
35 |
36 | NOW=$($DATE +%s)
37 | TMP_FILENAME="/tmp/${NOW}-${DWARF_DSYM_FILE_NAME}.zip"
38 |
39 | # Compress the .dSYM folder into a zip file
40 | echo "-- Compressing .dSYM folder ${DSYM_PATH}"
41 | $ZIP -qrp9 "${TMP_FILENAME}" "${DSYM_PATH}"
42 | FILE_SIZE=$($STAT -f "%z" "${TMP_FILENAME}")
43 | echo "-- Compressed at: $TMP_FILENAME"
44 |
45 | echo "Uploading ${FILE_SIZE} bytes to dsym server in foreground"
46 | foreground_upload "${TMP_FILENAME}"
47 |
48 |
--------------------------------------------------------------------------------
/scripts/wait_with_output.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Build Olympus after updating version string and deploy
4 |
5 | #function local_wait() {
6 | # local cmd="$@"
7 | # local log_file=travis_wait_$$.log
8 | # $cmd &
9 | # while true; do
10 | # ps -p$! 2>&1 >/dev/null
11 | # if [ $? = 0 ]; then
12 | # echo "still running: $cmd"; sleep 15
13 | # else
14 | # echo "$cmd finished"
15 | # cat $log_file
16 | # break
17 | # fi
18 | # done
19 | #}
20 |
21 | wait_with_output() {
22 | local cmd="$@"
23 | local log_file=travis_wait_$$.log
24 |
25 | $cmd 2>&1 >$log_file &
26 | local cmd_pid=$!
27 |
28 | travis_jigger $! $cmd &
29 | local jigger_pid=$!
30 | local result
31 |
32 | { wait $cmd_pid 2>/dev/null; result=$?; ps -p$jigger_pid 2>&1>/dev/null && kill $jigger_pid; } || exit 1
33 | exit $result
34 | }
35 |
36 | travis_jigger() {
37 | local timeout=60 # in minutes
38 | local count=0
39 |
40 | local cmd_pid=$1
41 | shift
42 |
43 | while [ $count -lt $timeout ]; do
44 | count=$(($count + 1))
45 | echo -e "\033[0mStill running ($count of $timeout): $@"
46 | sleep 60
47 | done
48 |
49 | echo -e "\n\033[31;1mTimeout reached. Terminating $@\033[0m\n"
50 | kill -9 $cmd_pid
51 | }
52 |
53 | #local_wait cat #find / -name "*" > /dev/null 2>&1 > /dev/null
54 |
--------------------------------------------------------------------------------