Skip to content

Commit 4bbf6c3

Browse files
author
Ognjen Manevski
committed
# Conflicts: # Examples/restcomm-olympus/app/app.iml
2 parents f5f2095 + 05b8daf commit 4bbf6c3

File tree

9 files changed

+44
-62
lines changed

9 files changed

+44
-62
lines changed

Examples/restcomm-olympus/.idea/modules.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/restcomm-olympus/app/app.iml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -135,54 +135,38 @@
135135
<orderEntry type="library" name="com.google.firebase:firebase-iid-11.6.2" level="project" />
136136
<orderEntry type="library" name="android.arch.lifecycle:common:1.0.0@jar" level="project" />
137137
<orderEntry type="library" name="org.slf4j:slf4j-api:1.6.1@jar" level="project" />
138-
<orderEntry type="library" scope="TEST" name="org.assertj:assertj-core:1.7.1@jar" level="project" />
139-
<orderEntry type="library" scope="TEST" name="com.squareup:javawriter:2.1.1@jar" level="project" />
140-
<orderEntry type="library" scope="TEST" name="org.objenesis:objenesis:2.5.1@jar" level="project" />
141138
<orderEntry type="library" name="android.arch.lifecycle:runtime-1.0.0" level="project" />
142139
<orderEntry type="library" name="testfairy:testfairy-android-sdk-1.5.15" level="project" />
143140
<orderEntry type="library" name="com.android.support:appcompat-v7-26.1.0" level="project" />
144141
<orderEntry type="library" name="com.google.android.gms:play-services-basement-license-11.6.2" level="project" />
145142
<orderEntry type="library" name="com.android.support:support-annotations:26.1.0@jar" level="project" />
146143
<orderEntry type="library" name="com.madgag.spongycastle:prov:1.54.0.0@jar" level="project" />
147144
<orderEntry type="library" name="com.android.support:support-core-ui-26.1.0" level="project" />
148-
<orderEntry type="library" scope="TEST" name="com.android.support.test:runner-1.0.1" level="project" />
149-
<orderEntry type="library" scope="TEST" name="com.google.code.findbugs:jsr305:2.0.1@jar" level="project" />
150145
<orderEntry type="library" name="com.madgag.spongycastle:core:1.54.0.0@jar" level="project" />
151-
<orderEntry type="library" scope="TEST" name="com.squareup.assertj:assertj-android:1.1.1@jar" level="project" />
152146
<orderEntry type="library" scope="TEST" name="org.hamcrest:hamcrest-core:1.3@jar" level="project" />
153-
<orderEntry type="library" scope="TEST" name="com.android.support.test.espresso:espresso-idling-resource-3.0.0" level="project" />
154147
<orderEntry type="library" name="com.android.support:support-compat-26.1.0" level="project" />
155148
<orderEntry type="library" name="com.madgag.spongycastle:pkix:1.54.0.0@jar" level="project" />
156149
<orderEntry type="library" name="com.google.android.gms:play-services-basement-11.6.2" level="project" />
157-
<orderEntry type="library" scope="TEST" name="com.android.support.test.uiautomator:uiautomator-v18-2.1.3" level="project" />
158150
<orderEntry type="library" name="com.google.firebase:firebase-messaging-license-11.6.2" level="project" />
159151
<orderEntry type="library" name="android.arch.core:common:1.0.0@jar" level="project" />
160152
<orderEntry type="library" name="com.google.firebase:firebase-common-11.6.2" level="project" />
161-
<orderEntry type="library" scope="TEST" name="org.hamcrest:hamcrest-integration:1.3@jar" level="project" />
162153
<orderEntry type="library" name="com.google.android.gms:play-services-tasks-11.6.2" level="project" />
163154
<orderEntry type="library" name="com.google.firebase:firebase-common-license-11.6.2" level="project" />
164155
<orderEntry type="library" name="com.google.firebase:firebase-core-11.6.2" level="project" />
165-
<orderEntry type="library" scope="TEST" name="net.sf.kxml:kxml2:2.3.0@jar" level="project" />
166156
<orderEntry type="library" name="com.android.support:transition-26.1.0" level="project" />
167157
<orderEntry type="library" name="com.android.support:design-26.1.0" level="project" />
168158
<orderEntry type="library" name="com.google.firebase:firebase-analytics-impl-11.6.2" level="project" />
169-
<orderEntry type="library" scope="TEST" name="org.awaitility:awaitility:3.0.0@jar" level="project" />
170159
<orderEntry type="library" name="com.google.firebase:firebase-iid-license-11.6.2" level="project" />
171160
<orderEntry type="library" scope="TEST" name="junit:junit:4.12@jar" level="project" />
172161
<orderEntry type="library" name="com.android.support:support-fragment-26.1.0" level="project" />
173-
<orderEntry type="library" scope="TEST" name="javax.inject:javax.inject:1@jar" level="project" />
174162
<orderEntry type="library" name="com.android.support:support-vector-drawable-26.1.0" level="project" />
175-
<orderEntry type="library" scope="TEST" name="com.android.support.test.espresso:espresso-core-3.0.0" level="project" />
176-
<orderEntry type="library" scope="TEST" name="cz.msebera.android:httpclient:4.3.6@jar" level="project" />
177163
<orderEntry type="library" name="com.android.support:support-core-utils-26.1.0" level="project" />
178164
<orderEntry type="library" name="com.google.firebase:firebase-analytics-11.6.2" level="project" />
179165
<orderEntry type="library" name="org.webrtc:google-webrtc-1.0.21217" level="project" />
180-
<orderEntry type="library" scope="TEST" name="com.android.support.test:rules-1.0.1" level="project" />
181166
<orderEntry type="library" name="dnsjava:dnsjava:2.1.7@jar" level="project" />
182167
<orderEntry type="library" name="com.google.guava:guava:16.0.1@jar" level="project" />
183168
<orderEntry type="library" name="com.firebase:firebase-jobdispatcher-0.6.0" level="project" />
184169
<orderEntry type="library" name="org.slf4j:slf4j-log4j12:1.6.1@jar" level="project" />
185-
<orderEntry type="library" scope="TEST" name="org.hamcrest:hamcrest-library:1.3@jar" level="project" />
186170
<orderEntry type="library" name="org.apache.commons:commons-lang3:3.1@jar" level="project" />
187171
<orderEntry type="library" name="log4j:log4j:1.2.17@jar" level="project" />
188172
<orderEntry type="library" name="org.mobicents.javax.sip:android-jain-sip-ext:1.3.33@jar" level="project" />
@@ -191,14 +175,12 @@
191175
<orderEntry type="library" name="org.mvel:mvel2:2.1.8.Final@jar" level="project" />
192176
<orderEntry type="library" name="com.android.support:animated-vector-drawable-26.1.0" level="project" />
193177
<orderEntry type="library" name="org.squirrelframework:squirrel-foundation:0.3.8@jar" level="project" />
194-
<orderEntry type="library" scope="TEST" name="com.loopj.android:android-async-http:1.4.9@jar" level="project" />
195178
<orderEntry type="library" name="javax.sip:android-jain-sip-ri:1.2.293@jar" level="project" />
196179
<orderEntry type="library" name="org.restcomm.commons:commons-congestion:2.0.147@jar" level="project" />
197180
<orderEntry type="library" name="javolution:javolution:5.5.1@jar" level="project" />
198181
<orderEntry type="library" name="com.google.firebase:firebase-analytics-license-11.6.2" level="project" />
199182
<orderEntry type="library" name="com.google.firebase:firebase-analytics-impl-license-11.6.2" level="project" />
200183
<orderEntry type="library" name="com.google.android.gms:play-services-tasks-license-11.6.2" level="project" />
201184
<orderEntry type="module" module-name="restcomm.android.sdk" />
202-
<orderEntry type="module" module-name="restcomm.android.sdk" />
203185
</component>
204186
</module>

Examples/restcomm-olympus/app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ android {
116116
// or org.restcomm.android.olympus.debug depending on buildType
117117

118118
// Set specific application name as a resource, so that it's clear in the device what flavor a user is looking at
119-
resValue "string", "app_name", "Restcomm Olympus Community"
120-
buildConfigField "boolean", "ENABLE_TEST_FAIRY_RUNTIME", "false"
121-
buildConfigField "String", "TESTFAIRY_APP_TOKEN", TESTFAIRY_APP_TOKEN
119+
resValue "string", "app_name", "Restcomm WebRTC Demo Community"
120+
//buildConfigField "boolean", "ENABLE_TEST_FAIRY_RUNTIME", "false"
121+
//buildConfigField "String", "TESTFAIRY_APP_TOKEN", TESTFAIRY_APP_TOKEN
122122

123123
// ICE_USERNAME, ICE_PASSWORD, ICE_DOMAIN &ICE_URL are defined in project gradle.properties for community builds, but also overriden
124124
// by gradle properties passed from command line (i.e. $ gradlew ... -PICE_DOMAIN=...) for Telestax builds from our
@@ -140,9 +140,9 @@ android {
140140
applicationIdSuffix ".premium"
141141

142142
// Set specific application name as a resource, so that it's clear in the device what flavor a user is looking at
143-
resValue "string", "app_name", "Restcomm Olympus Premium"
144-
buildConfigField "boolean", "ENABLE_TEST_FAIRY_RUNTIME", "false"
145-
buildConfigField "String", "TESTFAIRY_APP_TOKEN", TESTFAIRY_APP_TOKEN
143+
resValue "string", "app_name", "Restcomm WebRTC Demo Premium"
144+
//buildConfigField "boolean", "ENABLE_TEST_FAIRY_RUNTIME", "false"
145+
//buildConfigField "String", "TESTFAIRY_APP_TOKEN", TESTFAIRY_APP_TOKEN
146146

147147
// ICE_USERNAME, ICE_PASSWORD, ICE_DOMAIN &ICE_URL are defined in project gradle.properties for community builds, but also overriden
148148
// by gradle properties passed from command line (i.e. $ gradlew ... -PICE_DOMAIN=...) for Telestax builds from our

Examples/restcomm-olympus/app/src/main/AndroidManifest.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,16 @@
3434

3535
<!-- <meta-data android:name="net.hockeyapp.android.appIdentifier" android:value="${HOCKEYAPP_APP_ID}" /> -->
3636

37+
<!--
38+
Notice a workaround: we 're using the app_name as the label of the signin activity. Reason for this is that without it somehow
39+
the value we put there gets picked up as the name of the App as a whole and shows up in the launcher. Similar to
40+
https://stackoverflow.com/questions/39971859/app-name-doesnt-change-in-launcher-when-using-product-flavors, check comments on the
41+
submitter
42+
-->
3743
<activity
3844
android:name=".SigninActivity"
3945
android:configChanges="orientation|screenSize|keyboardHidden"
40-
android:label="@string/title_activity_signin" >
46+
android:label="@string/app_name" >
4147
<intent-filter>
4248
<action android:name="android.intent.action.MAIN"/>
4349

Examples/restcomm-olympus/app/src/main/java/org/restcomm/android/olympus/BugReportActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public void sendBugReport()
209209
// Send logs via email and add timezone in the subject so that we can exactly correlate
210210
Intent i = new Intent(Intent.ACTION_SEND);
211211
i.setType("message/rfc822");
212-
i.putExtra(Intent.EXTRA_EMAIL, new String[]{"antonis.tsakiridis@telestax.com"});
212+
i.putExtra(Intent.EXTRA_EMAIL, new String[]{"mobile-sdks-squad@telestax.com"});
213213
i.putExtra(Intent.EXTRA_SUBJECT, "[restcomm-android-sdk] User bug report for Olympus");
214214
i.putExtra(Intent.EXTRA_TEXT, emailBody);
215215
//i.putExtra(Intent.EXTRA_HTML_TEXT, logs);

Examples/restcomm-olympus/app/src/main/java/org/restcomm/android/olympus/CallActivity.java

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ protected void onCreate(Bundle savedInstanceState) {
133133

134134
alertDialog = new AlertDialog.Builder(CallActivity.this, R.style.SimpleAlertStyle).create();
135135

136-
//device = RCClient.listDevices().get(0);
137-
138136
PreferenceManager.setDefaultValues(this, "preferences.xml", MODE_PRIVATE, R.xml.preferences, false);
139137
prefs = PreferenceManager.getDefaultSharedPreferences(this);
140138

@@ -170,13 +168,6 @@ protected void onPause() {
170168
super.onPause();
171169
Log.i(TAG, "%% onPause");
172170
activityVisible = false;
173-
// TODO: Issue #380: once we figure out the issue with the backgrounding we need to uncomment this
174-
// I don't think we need this, but let's keep it around until we 're done with pausing video view functionality
175-
/*
176-
if (connection != null && connection.getState() == RCConnection.ConnectionState.CONNECTED) {
177-
connection.pauseVideo();
178-
}
179-
*/
180171

181172
if (connection != null && connection.getState() == RCConnection.ConnectionState.CONNECTED) {
182173
connection.detachVideo();
@@ -225,23 +216,26 @@ protected void onResume() {
225216

226217
// The activity has become visible (it is now "resumed").
227218
Log.i(TAG, "%% onResume");
228-
if (connection != null && connection.getState() == RCConnection.ConnectionState.CONNECTED) {
229-
// update the intent action if there's an ongoing call that we need to resume so that we provide a hint
230-
// to handleCall() to do proper handling
231-
getIntent().setAction(RCDevice.ACTION_RESUME_CALL);
232-
//connection.resumeVideo();
233-
//connection.reattachVideo((PercentFrameLayout)findViewById(R.id.local_video_layout),
234-
// (PercentFrameLayout)findViewById(R.id.remote_video_layout));
235-
236-
// Now that we can mute/umnute via notification, we need to update the UI accordingly if there was a change
237-
// while we were not in the foreground
238-
muteAudio = connection.isAudioMuted();
239-
if (!muteAudio) {
240-
btnMuteAudio.setImageResource(R.drawable.audio_unmuted);
241-
}
242-
else {
243-
btnMuteAudio.setImageResource(R.drawable.audio_muted);
244-
}
219+
if (connection != null) {
220+
if (connection.getState() == RCConnection.ConnectionState.CONNECTED) {
221+
// update the intent action if there's an ongoing call that we need to resume so that we provide a hint
222+
// to handleCall() to do proper handling
223+
getIntent().setAction(RCDevice.ACTION_RESUME_CALL);
224+
225+
// Now that we can mute/umnute via notification, we need to update the UI accordingly if there was a change
226+
// while we were not in the foreground
227+
muteAudio = connection.isAudioMuted();
228+
if (!muteAudio) {
229+
btnMuteAudio.setImageResource(R.drawable.audio_unmuted);
230+
} else {
231+
btnMuteAudio.setImageResource(R.drawable.audio_muted);
232+
}
233+
}
234+
else if (connection.getState() == RCConnection.ConnectionState.DISCONNECTED) {
235+
// When a user returns to CallActivity, after the call was hung up by the peer, while App
236+
// was in the background, we need to just close the Activity
237+
finish();
238+
}
245239
}
246240
}
247241

Examples/restcomm-olympus/app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<string name="pref_ringtone_silent">Silent</string>
9090

9191
<string name="pref_title_vibrate">Vibrate</string>
92-
<string name="title_activity_signin">Restcomm Olympus</string>
92+
<string name="title_activity_signin">Sign-in</string>
9393

9494
<!-- Strings related to login -->
9595
<string name="prompt_email">Email</string>

restcomm.android.sdk/src/main/java/org/restcomm/android/sdk/RCDevice.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,11 +1451,12 @@ void onNotificationCall(RCConnection connection, HashMap<String, String> customH
14511451
builder = builder.setSound(Uri.parse("android.resource://" + getPackageName() + "/" + audioManager.getResourceIdForKey(ParameterKeys.RESOURCE_SOUND_RINGING)));
14521452
if (callIntent != null) {
14531453
builder = builder
1454-
.addAction(R.drawable.ic_videocam_24dp, "Video", PendingIntent.getService(getApplicationContext(), 0, serviceIntentVideo, PendingIntent.FLAG_UPDATE_CURRENT))
1455-
.addAction(R.drawable.ic_call_24dp, "Audio", PendingIntent.getService(getApplicationContext(), 0, serviceIntentAudio, PendingIntent.FLAG_UPDATE_CURRENT))
1456-
.addAction(R.drawable.ic_call_end_24dp, "Hang Up", PendingIntent.getService(getApplicationContext(), 0, serviceIntentDecline, PendingIntent.FLAG_UPDATE_CURRENT))
1457-
.setContentIntent(PendingIntent.getService(getApplicationContext(), 0, serviceIntentDefault, PendingIntent.FLAG_UPDATE_CURRENT))
1458-
.setDeleteIntent(PendingIntent.getService(getApplicationContext(), 0, serviceIntentDelete, PendingIntent.FLAG_UPDATE_CURRENT));
1454+
.addAction(R.drawable.ic_videocam_24dp, "Video", PendingIntent.getService(getApplicationContext(), 0, serviceIntentVideo, PendingIntent.FLAG_UPDATE_CURRENT))
1455+
.addAction(R.drawable.ic_call_24dp, "Audio", PendingIntent.getService(getApplicationContext(), 0, serviceIntentAudio, PendingIntent.FLAG_UPDATE_CURRENT))
1456+
.addAction(R.drawable.ic_call_end_24dp, "Hang Up", PendingIntent.getService(getApplicationContext(), 0, serviceIntentDecline, PendingIntent.FLAG_UPDATE_CURRENT))
1457+
.setContentIntent(PendingIntent.getService(getApplicationContext(), 0, serviceIntentDefault, PendingIntent.FLAG_UPDATE_CURRENT))
1458+
.setDeleteIntent(PendingIntent.getService(getApplicationContext(), 0, serviceIntentDelete, PendingIntent.FLAG_UPDATE_CURRENT));
1459+
14591460
} else {
14601461
//we dont want to show the notification to primary channel
14611462
builder = builder.setContentIntent(PendingIntent.getService(getApplicationContext(), 0, serviceIntentDefault, PendingIntent.FLAG_UPDATE_CURRENT));
@@ -1743,7 +1744,7 @@ void onNotificationCallCanceled(RCConnection connection)
17431744
// And then create a new notification to show that the call is missed, together with a means to call the peer. Notice
17441745
// that if this notification is tapped, the peer will be called using the video preference of
17451746
callIntent.setAction(ACTION_OUTGOING_CALL);
1746-
callIntent.putExtra(RCDevice.EXTRA_DID, connection.getPeer());
1747+
callIntent.putExtra(RCDevice.EXTRA_DID, peerUsername);
17471748
callIntent.putExtra(RCDevice.EXTRA_VIDEO_ENABLED, (connection.getRemoteMediaType() == RCConnection.ConnectionMediaType.AUDIO_VIDEO));
17481749

17491750
// We need to create a Task Stack to make sure we maintain proper flow at all times

restcomm.android.sdk/src/main/res/values/strings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<resources>
2-
<!-- -->
2+
<!-- Provided by build.gradle for the App so that it can be parameterized based on flavor
33
<string name="app_name">Restcomm Olympus</string>
4-
<!-- -->
4+
-->
55

66
<string name="messenger">Messenger</string>
77
<string name="action_settings">Settings</string>

0 commit comments

Comments
 (0)