Skip to content

Commit 5f649b6

Browse files
committed
Fixes #71: fix default values for IP to point to Demo instance
1 parent 84c7f55 commit 5f649b6

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Examples/restcomm-helloworld/app/src/main/java/com/telestax/restcomm_helloworld/MainActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ public void onConnected(RCConnection connection)
184184
public void onDisconnected(RCConnection connection)
185185
{
186186
Log.i(TAG, "RCConnection disconnected");
187+
this.connection = null;
188+
pendingConnection = null;
187189
}
188190

189191
public void onDisconnected(RCConnection connection, int errorCode, String errorText) {

Examples/restcomm-messenger/app/src/main/java/com/telestax/restcomm_messenger/MainActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public void onError(Exception exception)
114114
prefs.registerOnSharedPreferenceChangeListener(this);
115115
initializeSipFromPreferences();
116116

117-
txtUri.setText("sip:[email protected]:5080");
117+
txtUri.setText("sip:[email protected]:5080");
118118
txtMessage.setText("Hello there!");
119119

120120
cbMuted.setEnabled(false);
@@ -400,7 +400,7 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
400400
String key) {
401401
boolean updated = false;
402402
if (key.equals("pref_proxy_ip")) {
403-
params.put("pref_proxy_ip", prefs.getString("pref_proxy_ip", "192.168.2.32"));
403+
params.put("pref_proxy_ip", prefs.getString("pref_proxy_ip", "54.225.212.193"));
404404
updated = true;
405405
} else if (key.equals("pref_proxy_port")) {
406406
params.put("pref_proxy_port", prefs.getString("pref_proxy_port", "5060"));
@@ -419,7 +419,7 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
419419

420420
@SuppressWarnings("static-access")
421421
private void initializeSipFromPreferences() {
422-
params.put("pref_proxy_ip", prefs.getString("pref_proxy_ip", "192.168.2.32"));
422+
params.put("pref_proxy_ip", prefs.getString("pref_proxy_ip", "54.225.212.193"));
423423
params.put("pref_proxy_port", prefs.getString("pref_proxy_port", "5080"));
424424
params.put("pref_sip_user", prefs.getString("pref_sip_user", "bob"));
425425
params.put("pref_sip_password", prefs.getString("pref_sip_password", "1234"));

Examples/restcomm-messenger/app/src/main/res/xml/preferences.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
android:key="pref_sip_password"
1414
android:title="Password" />
1515
<EditTextPreference
16-
android:defaultValue="192.168.2.32"
16+
android:defaultValue="54.225.212.193"
1717
android:key="pref_proxy_ip"
1818
android:title="Proxy IP" />
1919
<EditTextPreference

0 commit comments

Comments
 (0)