Skip to content

Commit 0eb55f3

Browse files
committed
Fixed a trivial issue with Hangup and bumped the version number
1 parent a78d0bf commit 0eb55f3

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

Examples/restcomm-messenger/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
minSdkVersion 17
1010
targetSdkVersion 22
1111
versionCode 1
12-
versionName "1.1.1"
12+
versionName "1.2.1"
1313
}
1414
buildTypes {
1515
release {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ public void onClick(View view) {
134134
connection.disconnect();
135135
connection = null;
136136
pendingConnection = null;
137+
finish();
137138
}
138139
} else if (view.getId() == R.id.button_answer) {
139140
if (pendingConnection != null) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ public void onError(Exception exception) {
9090
prefs.registerOnSharedPreferenceChangeListener(this);
9191
initializeSipFromPreferences();
9292

93-
//txtUri.setText("sip:[email protected]:5080");
94-
txtUri.setText("sip:[email protected]:5080");
93+
txtUri.setText("sip:[email protected]:5080");
94+
//txtUri.setText("sip:[email protected]:5080");
9595
txtMessage.setText("Hello there!");
9696

9797
// volume control should be by default 'music' which will control the ringing sounds and 'voice call' when within a call

restcomm.android.client.sdk/src/main/java/org/mobicents/restcomm/android/client/sdk/RCConnection.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ public enum ConnectionState {
148148
private PeerConnectionClient peerConnectionClient = null;
149149
private SignalingParameters signalingParameters;
150150
private AppRTCAudioManager audioManager = null;
151-
private VideoRenderer.Callbacks localRender;
152-
private VideoRenderer.Callbacks remoteRender;
151+
private VideoRenderer.Callbacks localRender = null;
152+
private VideoRenderer.Callbacks remoteRender = null;
153153
private VideoRendererGui.ScalingType scalingType;
154154
private Toast logToast;
155155
//private boolean commandLineRun;
@@ -482,6 +482,8 @@ void initializeWebrtc()
482482
signalingParameters = null;
483483
scalingType = VideoRendererGui.ScalingType.SCALE_ASPECT_FILL;
484484

485+
// Uncomment when video is enabled
486+
/**/
485487
videoView = new GLSurfaceView(context);
486488
listener.onReceiveLocalVideo(this, videoView);
487489

@@ -492,18 +494,21 @@ public void run() {
492494
createPeerConnectionFactory();
493495
}
494496
});
497+
495498
remoteRender = VideoRendererGui.create(
496499
REMOTE_X, REMOTE_Y,
497500
REMOTE_WIDTH, REMOTE_HEIGHT, scalingType, false);
498501
localRender = VideoRendererGui.create(
499502
LOCAL_X_CONNECTING, LOCAL_Y_CONNECTING,
500503
LOCAL_WIDTH_CONNECTING, LOCAL_HEIGHT_CONNECTING, scalingType, true);
504+
/**/
505+
//createPeerConnectionFactory();
501506

502507
// Check for mandatory permissions.
503508
for (String permission : MANDATORY_PERMISSIONS) {
504509
if (context.checkCallingOrSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) {
505510
logAndToast("Permission " + permission + " is not granted");
506-
// TODO: return eror to RCConnection listener
511+
// TODO: return error to RCConnection listener
507512
//activity.setResult(activity.RESULT_CANCELED);
508513
//activity.finish();
509514
return;
@@ -666,6 +671,7 @@ public void run() {
666671
final long delta = System.currentTimeMillis() - callStartedTimeMs;
667672
Log.d(TAG, "Creating peer connection factory, delay=" + delta + "ms");
668673
peerConnectionClient = PeerConnectionClient.getInstance();
674+
//peerConnectionClient.setVideoEnabled(false);
669675
peerConnectionClient.createPeerConnectionFactory(RCClient.getInstance().context,
670676
VideoRendererGui.getEGLContext(), peerConnectionParameters,
671677
connection);

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,16 @@
4141

4242
/**
4343
* RCDevice Represents an abstraction of a communications device able to make and receive calls, send and receive messages etc. Remember that
44-
* in order to be notified of RestComm Client events you need to set a listener to RCDevice and implement the applicable methods.
44+
* in order to be notified of RestComm Client events you need to set a listener to RCDevice and implement the applicable methods, and also 'register'
45+
* to the applicable intents by calling RCDevice.setPendingIntents() and provide one intent for whichever activity will be receiving calls and another
46+
* intent for the activity receiving messages.
4547
* If you want to initiate a media connection towards another party you use RCDevice.connect() which returns an RCConnection object representing
4648
* the new outgoing connection. From then on you can act on the new connection by applying RCConnection methods on the handle you got from RCDevice.connect().
47-
* If there’s an incoming connection you will be notified by RCDeviceListener.onIncomingConnection() listener method. At that point you can use RCConnection methods to
49+
* If there’s an incoming connection you will be receiving an intent with action 'RCDevice.INCOMING_CALL'. At that point you can use RCConnection methods to
4850
* accept or reject the connection.
4951
*
5052
* As far as instant messages are concerned you can send a message using RCDevice.sendMessage() and you will be notified of an incoming message
51-
* via RCDeviceListener.onIncomingMessage() listener method.
53+
* through an intent with action 'RCDevice.INCOMING_MESSAGE'.
5254
*
5355
* @see RCConnection
5456
*/

0 commit comments

Comments
 (0)