Skip to content

Commit 864f6fe

Browse files
author
atsakiridis
committed
Fixed #253: Use registrarless by default and fix default contact list accordingly (re-commiting cause previous commit got messed up somehow). Fixed #254: Update the restcomm client logo to restcomm olympus in the call screen
1 parent 381c621 commit 864f6fe

File tree

19 files changed

+259
-590
lines changed

19 files changed

+259
-590
lines changed

Examples/restcomm-helloworld/.idea/misc.xml

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

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ public void onError(Exception exception) {
9696
});
9797

9898
params = new HashMap<String, Object>();
99-
// CHANGEME: update the IP address to your Restcomm instance
100-
params.put("pref_proxy_domain", "sip:cloud.restcomm.com:5060");
101-
params.put("pref_sip_user", "antonis");
99+
// update the IP address to your Restcomm instance
100+
params.put("pref_proxy_domain", "");
101+
params.put("pref_sip_user", "bob");
102102
params.put("pref_sip_password", "1234");
103103
device = RCClient.createDevice(params, this);
104104
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
@@ -170,7 +170,7 @@ public void onClick(View view) {
170170
HashMap<String, Object> connectParams = new HashMap<String, Object>();
171171
// CHANGEME: update the IP address to your Restcomm instance. Also, you can update the number
172172
// from '1235' to any Restcomm application you wish to reach
173-
connectParams.put("username", "sip:[email protected]");
173+
connectParams.put("username", "sip:+[email protected]");
174174
connectParams.put("video-enabled", true);
175175

176176
// if you want to add custom SIP headers, please uncomment this

Examples/restcomm-olympus/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
minSdkVersion 16
1010
targetSdkVersion 22
1111
versionCode 1
12-
versionName "1.0.0-BETA3#2"
12+
versionName "1.0.0-BETA3#5"
1313
}
1414
buildTypes {
1515
release {
Lines changed: 22 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
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 <http://www.gnu.org/licenses/>
18+
*
19+
* For questions related to commercial use licensing, please contact [email protected].
20+
*
21+
*/
22+
123
package com.telestax.restcomm_olympus;
224

325
import android.app.Activity;
@@ -9,16 +31,6 @@
931
import android.view.View;
1032

1133
public class AboutFragment extends DialogFragment {
12-
// Use this instance of the interface to deliver action events
13-
//ContactDialogListener listener;
14-
15-
16-
/*
17-
public interface ContactDialogListener {
18-
public void onDialogPositiveClick(int type, String username, String sipuri);
19-
public void onDialogNegativeClick();
20-
}
21-
*/
2234

2335
/**
2436
* Create a new instance of MyDialogFragment, providing "num"
@@ -27,36 +39,18 @@ public interface ContactDialogListener {
2739
public static AboutFragment newInstance() {
2840
AboutFragment f = new AboutFragment();
2941

30-
/*
31-
// Supply num input as an argument.
32-
Bundle args = new Bundle();
33-
args.putInt("type", type);
34-
f.setArguments(args);
35-
*/
3642
return f;
3743
}
3844

3945
// Override the Fragment.onAttach() method to instantiate the NoticeDialogListener
4046
@Override
4147
public void onAttach(Activity activity) {
4248
super.onAttach(activity);
43-
/*
44-
// Verify that the host activity implements the callback interface
45-
try {
46-
// Instantiate the NoticeDialogListener so we can send events to the host
47-
listener = (ContactDialogListener) activity;
48-
} catch (ClassCastException e) {
49-
// The activity doesn't implement the interface, throw exception
50-
throw new ClassCastException(activity.toString()
51-
+ " must implement ContactDialogListener");
52-
}
53-
*/
5449
}
5550

5651
@Override
5752
public void onDetach() {
5853
super.onDetach();
59-
//listener = null;
6054
}
6155

6256
@Override
@@ -65,18 +59,6 @@ public void onCreate(Bundle savedInstanceState) {
6559

6660
}
6761

68-
/* Not to be used when onCreateDialog is overriden (it is for non-alert dialog fragments
69-
@Override
70-
public View onCreateView(LayoutInflater inflater, ViewGroup container,
71-
Bundle savedInstanceState) {
72-
View v = inflater.inflate(R.layout.fragment_dialog_add_contact, container, false);
73-
txtUsername = (EditText)v.findViewById(R.id.editText_username);
74-
txtSipuri = (EditText)v.findViewById(R.id.editText_sipuri);
75-
76-
return v;
77-
}
78-
*/
79-
8062
// Notice that for this doesn't work if onCreateView has been overriden as described above. To add
8163
// custom view when using alert we need to use builder.setView() as seen below
8264
@Override
@@ -92,22 +74,9 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
9274
.setPositiveButton("OK",
9375
new DialogInterface.OnClickListener() {
9476
public void onClick(DialogInterface dialog, int whichButton) {
95-
/*
96-
listener.onDialogPositiveClick(getArguments().getInt("type"), txtUsername.getText().toString(),
97-
txtSipuri.getText().toString());
98-
*/
99-
}
100-
}
101-
);
102-
/*
103-
.setNegativeButton("Cancel",
104-
new DialogInterface.OnClickListener() {
105-
public void onClick(DialogInterface dialog, int whichButton) {
106-
listener.onDialogNegativeClick();
10777
}
10878
}
10979
);
110-
*/
11180
return builder.create();
11281
}
11382
}

Examples/restcomm-olympus/app/src/main/java/com/telestax/restcomm_olympus/ActionFragment.java

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
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 <http://www.gnu.org/licenses/>
18+
*
19+
* For questions related to commercial use licensing, please contact [email protected].
20+
*
21+
*/
22+
123
package com.telestax.restcomm_olympus;
224

325
import android.app.Activity;
@@ -18,8 +40,6 @@ public interface ActionListener {
1840
public void onActionClicked(ActionType action, String username, String sipuri);
1941
}
2042

21-
//EditText txtUsername;
22-
//EditText txtSipuri;
2343
// Use this instance of the interface to deliver action events
2444
ActionListener listener;
2545

Examples/restcomm-olympus/app/src/main/java/com/telestax/restcomm_olympus/AddUserDialogFragment.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
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 <http://www.gnu.org/licenses/>
18+
*
19+
* For questions related to commercial use licensing, please contact [email protected].
20+
*
21+
*/
22+
123
package com.telestax.restcomm_olympus;
224

325
import android.app.Activity;

Examples/restcomm-olympus/app/src/main/java/com/telestax/restcomm_olympus/CallActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public void run() {
238238
connectParams.put("username", finalIntent.getStringExtra(RCDevice.EXTRA_DID));
239239
connectParams.put("video-enabled", finalIntent.getBooleanExtra(RCDevice.EXTRA_VIDEO_ENABLED, false));
240240

241-
// if you want to add custom SIP headers, please uncomment this
241+
// *** if you want to add custom SIP headers, please uncomment this
242242
//HashMap<String, String> sipHeaders = new HashMap<>();
243243
//sipHeaders.put("X-SIP-Header1", "Value1");
244244
//connectParams.put("sip-headers", sipHeaders);

Examples/restcomm-olympus/app/src/main/java/com/telestax/restcomm_olympus/ContactAdapterListener.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
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 <http://www.gnu.org/licenses/>
18+
*
19+
* For questions related to commercial use licensing, please contact [email protected].
20+
*
21+
*/
22+
123
package com.telestax.restcomm_olympus;
224

325
// ContactAdapter used callbacks

Examples/restcomm-olympus/app/src/main/java/com/telestax/restcomm_olympus/ContactsController.java

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
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 <http://www.gnu.org/licenses/>
18+
*
19+
* For questions related to commercial use licensing, please contact [email protected].
20+
*
21+
*/
22+
123
package com.telestax.restcomm_olympus;
224

325
import android.content.Context;
@@ -33,11 +55,14 @@ ArrayList<Map<String, String>> initializeContacts()
3355
// initialize data store if not already populated
3456
if (!initialized) {
3557
SharedPreferences.Editor prefEdit = prefsContacts.edit();
36-
prefEdit.putString("sip:[email protected]", "Alice");
37-
prefEdit.putString("sip:[email protected]", "Bob");
38-
prefEdit.putString("sip:[email protected]", "Hello World App");
39-
prefEdit.putString("sip:[email protected]", "Conference App");
40-
prefEdit.putString("sip:[email protected]", "Team Call");
58+
//prefEdit.putString("sip:[email protected]", "Alice");
59+
//prefEdit.putString("sip:[email protected]", "Bob");
60+
prefEdit.putString("sip:[email protected]", "Play App");
61+
prefEdit.putString("sip:[email protected]", "Say App");
62+
prefEdit.putString("sip:[email protected]", "Gather App");
63+
prefEdit.putString("sip:[email protected]", "Conference App");
64+
prefEdit.putString("sip:[email protected]", "Conference Admin App");
65+
4166
prefEdit.putBoolean(PREFS_CONTACTS_INIT_KEY, true);
4267
prefEdit.commit();
4368
}
@@ -98,15 +123,6 @@ void updateContact(ArrayList<Map<String, String>> list, String username, String
98123
map.put("username", username);
99124
list.set(index, map);
100125
}
101-
/*
102-
int index = 0;
103-
if ((index = list.indexOf(map)) != -1) {
104-
list.set(index, map);
105-
}
106-
else {
107-
Log.w(TAG, "addContact(): contact not found in ListView adapter list: " + username + ", " + sipuri);
108-
}
109-
*/
110126
}
111127

112128
// Removes a contact from a. the preferences data store and b. to the given list

Examples/restcomm-olympus/app/src/main/java/com/telestax/restcomm_olympus/KeypadFragment.java

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
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 <http://www.gnu.org/licenses/>
18+
*
19+
* For questions related to commercial use licensing, please contact [email protected].
20+
*
21+
*/
22+
123
package com.telestax.restcomm_olympus;
224

325
import android.app.Activity;
@@ -14,14 +36,6 @@
1436
import org.mobicents.restcomm.android.client.sdk.RCConnection;
1537

1638

17-
/**
18-
* A simple {@link Fragment} subclass.
19-
* Activities that contain this fragment must implement the
20-
* {@link KeypadFragment.OnFragmentInteractionListener} interface
21-
* to handle interaction events.
22-
* Use the {@link KeypadFragment#newInstance} factory method to
23-
* create an instance of this fragment.
24-
*/
2539
public class KeypadFragment extends Fragment implements View.OnClickListener {
2640
// TODO: Rename parameter arguments, choose names that match
2741
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
@@ -123,15 +137,6 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
123137
return controlView;
124138
}
125139

126-
/*
127-
// TODO: Rename method, update argument and hook method into UI event
128-
public void onButtonPressed(Uri uri) {
129-
if (mListener != null) {
130-
mListener.onFragmentInteraction(uri);
131-
}
132-
}
133-
*/
134-
135140
@Override
136141
public void onAttach(Activity activity) {
137142
super.onAttach(activity);

0 commit comments

Comments
 (0)