Skip to content

Commit

Permalink
Added Server_url as a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
live-wire committed Jun 4, 2015
1 parent a1f38a3 commit 5c1adda
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.github.nkzawa.socketio.androidchat;

public class Constants {
public static final String CHAT_SERVER_URL = "http://chat.socket.io";
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class LoginActivity extends Activity {
private Socket mSocket;
{
try {
mSocket = IO.socket("http://chat.socket.io");
mSocket = IO.socket(Constants.CHAT_SERVER_URL);
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class MainFragment extends Fragment {
private Socket mSocket;
{
try {
mSocket = IO.socket("http://chat.socket.io");
mSocket = IO.socket(Constants.CHAT_SERVER_URL);
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
<string name="message_user_left">%s left</string>
<string name="user_action_typing">is typing</string>

</resources>
</resources>

0 comments on commit 5c1adda

Please sign in to comment.