capacitor-plugin-vonage 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -0
- package/android/src/main/java/com/managemyhealth/plugin/vonage/VideoCallActivity.java +242 -24
- package/android/src/main/java/com/managemyhealth/plugin/vonage/vonagePlugin.java +179 -29
- package/android/src/main/res/drawable/button_background.xml +9 -0
- package/android/src/main/res/drawable/button_background2.xml +9 -0
- package/android/src/main/res/drawable/circle_shape.xml +9 -0
- package/android/src/main/res/layout/video_call_layout.xml +142 -48
- package/android/src/main/res/values/colors.xml +5 -0
- package/android/src/main/res/values/strings.xml +9 -0
- package/package.json +1 -1
package/android/build.gradle
CHANGED
@@ -1,29 +1,36 @@
|
|
1
1
|
package com.managemyhealth.plugin.vonage;
|
2
2
|
|
3
3
|
|
4
|
+
|
4
5
|
import android.annotation.SuppressLint;
|
6
|
+
import android.graphics.Color;
|
7
|
+
import android.graphics.PorterDuff;
|
5
8
|
import android.os.AsyncTask;
|
6
9
|
import android.app.ActionBar;
|
7
10
|
import android.content.Intent;
|
8
11
|
import android.graphics.Bitmap;
|
9
12
|
import android.graphics.BitmapFactory;
|
10
|
-
import android.nfc.Tag;
|
11
13
|
import android.opengl.GLSurfaceView;
|
12
14
|
import android.os.Bundle;
|
13
15
|
import android.os.Handler;
|
14
16
|
import android.util.Log;
|
17
|
+
import android.view.Gravity;
|
15
18
|
import android.view.View;
|
19
|
+
import android.widget.Button;
|
16
20
|
import android.widget.FrameLayout;
|
17
21
|
import android.widget.ImageView;
|
22
|
+
import android.widget.LinearLayout;
|
18
23
|
import android.widget.TextView;
|
19
24
|
import android.widget.Toast;
|
20
25
|
|
21
26
|
import androidx.annotation.NonNull;
|
22
|
-
import androidx.annotation.Nullable;
|
23
27
|
import androidx.appcompat.app.AppCompatActivity;
|
28
|
+
import androidx.lifecycle.ViewModelProvider;
|
29
|
+
|
24
30
|
|
25
|
-
import com.getcapacitor.
|
31
|
+
import com.getcapacitor.Bridge;
|
26
32
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
33
|
+
|
27
34
|
import com.opentok.android.BaseVideoRenderer;
|
28
35
|
import com.opentok.android.OpentokError;
|
29
36
|
import com.opentok.android.Publisher;
|
@@ -38,43 +45,81 @@ import com.opentok.android.SubscriberKit;
|
|
38
45
|
import java.io.InputStream;
|
39
46
|
import java.util.List;
|
40
47
|
|
41
|
-
import
|
42
|
-
|
43
|
-
import okhttp3.logging.HttpLoggingInterceptor.Level;
|
48
|
+
import javax.annotation.Nullable;
|
49
|
+
|
44
50
|
import pub.devrel.easypermissions.AfterPermissionGranted;
|
45
51
|
import pub.devrel.easypermissions.EasyPermissions;
|
46
|
-
import retrofit2.Retrofit;
|
47
|
-
import retrofit2.converter.moshi.MoshiConverterFactory;
|
48
52
|
|
49
53
|
|
50
|
-
public class VideoCallActivity extends AppCompatActivity implements EasyPermissions.PermissionCallbacks
|
54
|
+
public class VideoCallActivity extends AppCompatActivity implements EasyPermissions.PermissionCallbacks {
|
51
55
|
private static final String TAG = VideoCallActivity.class.getSimpleName();
|
52
56
|
private static final int PERMISSIONS_REQUEST_CODE = 124;
|
53
57
|
|
54
58
|
public Session session;
|
59
|
+
private static Bridge staticBridge = null;
|
60
|
+
|
61
|
+
public static VideoCallActivity instance;
|
55
62
|
private Publisher publisher;
|
56
63
|
String SUBSCRIBERNAME ;
|
57
64
|
String PUBLISHERNAME;
|
65
|
+
String profilePicApiUrl;
|
66
|
+
boolean isPatientOnline = false;
|
58
67
|
boolean isMuted = false;
|
59
68
|
boolean isCamOff = false;
|
69
|
+
public boolean temptest = false;
|
60
70
|
boolean isTimeron = false;
|
61
71
|
boolean isEndall = false;
|
62
72
|
private Subscriber subscriber;
|
63
73
|
private FrameLayout publisherViewContainer;
|
74
|
+
private LinearLayout ProviderViewLayout;
|
64
75
|
private FrameLayout subscriberViewContainer;
|
65
76
|
private FloatingActionButton fabCameraOff;
|
66
77
|
private ImageView imageViewEndcall;
|
67
78
|
private ImageView imageViewMute;
|
68
79
|
private ImageView imageViewCamOff;
|
80
|
+
private ImageView circleAvatar;
|
81
|
+
|
69
82
|
private ImageView imageViewCamSwitch;
|
83
|
+
public static Button sendNotifications ;
|
84
|
+
public static TextView patientStatus;
|
85
|
+
public static TextView publishernameView;
|
86
|
+
public static Button admit;
|
87
|
+
public static Button deny ;
|
88
|
+
|
89
|
+
private static final int LOG_INTERVAL_MILLIS = 1000; // Log every 100 milliseconds
|
90
|
+
|
91
|
+
private final Handler handler = new Handler();
|
92
|
+
private final Runnable logRunnable = new Runnable() {
|
93
|
+
@Override
|
94
|
+
public void run() {
|
95
|
+
Log.d(TAG, "Log message");
|
96
|
+
// if(temptest){
|
97
|
+
// Log.d(TAG, "temptest "+ temptest);
|
98
|
+
//
|
99
|
+
// }else{
|
100
|
+
// Log.d(TAG, "temptest "+temptest);
|
101
|
+
//
|
102
|
+
// }
|
103
|
+
handler.postDelayed(this, LOG_INTERVAL_MILLIS);
|
104
|
+
}
|
105
|
+
};
|
70
106
|
Boolean ISPROVIDER = false;
|
107
|
+
// Boolean testobserver = false;
|
71
108
|
private TextView timerTextView;
|
72
109
|
private long startTime = 0;
|
110
|
+
// private List<Observer> observers;
|
111
|
+
// private List<String> observers1;
|
112
|
+
// public VideoCallActivity() {
|
113
|
+
// observers = new ArrayList<>();
|
114
|
+
// observers1 = new ArrayList<>();
|
115
|
+
// }
|
116
|
+
|
73
117
|
|
74
118
|
private PublisherKit.PublisherListener publisherListener = new PublisherKit.PublisherListener() {
|
75
119
|
@Override
|
76
120
|
public void onStreamCreated(PublisherKit publisherKit, Stream stream) {
|
77
121
|
Log.d(TAG, "onStreamCreated: Publisher Stream Created. Own stream " + stream.getStreamId());
|
122
|
+
|
78
123
|
}
|
79
124
|
|
80
125
|
@Override
|
@@ -120,6 +165,25 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
120
165
|
|
121
166
|
@Override
|
122
167
|
public void onDisconnected(Session session) {
|
168
|
+
notifyObservers("deny");
|
169
|
+
if(publisher!=null) {
|
170
|
+
|
171
|
+
publisher.setPublishAudio(false);
|
172
|
+
imageViewMute.setImageResource(R.drawable.microphoneoff);
|
173
|
+
|
174
|
+
}
|
175
|
+
if(publisher!=null) {
|
176
|
+
|
177
|
+
publisher.setPublishVideo(false);
|
178
|
+
imageViewCamOff.setImageResource(R.drawable.cameraoff);
|
179
|
+
imageViewCamSwitch.setVisibility(View.GONE);
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
}
|
184
|
+
VideoCallActivity temp = new VideoCallActivity();
|
185
|
+
temp.session = null;
|
186
|
+
|
123
187
|
isTimeron=false;
|
124
188
|
|
125
189
|
Log.d(TAG, "onDisconnected: Disconnected from session: " + session.getSessionId());
|
@@ -147,6 +211,14 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
147
211
|
public void onStreamReceived(Session session, Stream stream) {
|
148
212
|
|
149
213
|
Log.d(TAG, "onStreamReceived: New Stream Received " + stream.getStreamId() + " in session: " + session.getSessionId());
|
214
|
+
ProviderViewLayout = findViewById(R.id.providerViewLayout);
|
215
|
+
if(ISPROVIDER) {
|
216
|
+
ProviderViewLayout.setVisibility(View.VISIBLE);
|
217
|
+
}
|
218
|
+
circleAvatar.setVisibility(View.GONE); // Hide the view
|
219
|
+
patientStatus.setVisibility(View.GONE); // Hide the view
|
220
|
+
publishernameView.setVisibility(View.GONE); // Hide the view
|
221
|
+
|
150
222
|
|
151
223
|
if (subscriber == null) {
|
152
224
|
subscriber = new Subscriber.Builder(VideoCallActivity.this, stream).build();
|
@@ -170,8 +242,12 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
170
242
|
|
171
243
|
Log.d(TAG, "onStreamDropped: Stream Dropped: " + stream.getStreamId() + " in session: " + session.getSessionId());
|
172
244
|
|
245
|
+
circleAvatar.setVisibility(View.VISIBLE); // Show the view
|
246
|
+
|
173
247
|
if(!ISPROVIDER){
|
174
|
-
session
|
248
|
+
if(session!=null){
|
249
|
+
session.disconnect();
|
250
|
+
}
|
175
251
|
if (subscriber != null) {
|
176
252
|
subscriber = null;
|
177
253
|
subscriberViewContainer.removeAllViews();
|
@@ -208,11 +284,15 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
208
284
|
public void onVideoDisabled(SubscriberKit subscriberKit, String s) {
|
209
285
|
showToast(SUBSCRIBERNAME + " video disabled");
|
210
286
|
|
287
|
+
circleAvatar.setVisibility(View.VISIBLE); // Show the view
|
288
|
+
|
289
|
+
|
211
290
|
}
|
212
291
|
|
213
292
|
@Override
|
214
293
|
public void onVideoEnabled(SubscriberKit subscriberKit, String s) {
|
215
294
|
showToast(SUBSCRIBERNAME + " video enabled");
|
295
|
+
circleAvatar.setVisibility(View.GONE); // Hide the view
|
216
296
|
|
217
297
|
|
218
298
|
}
|
@@ -239,6 +319,7 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
239
319
|
public void onDisconnected(SubscriberKit subscriberKit) {
|
240
320
|
Log.d(TAG, "onDisconnected: Subscriber disconnected. Stream: " + subscriberKit.getStream().getStreamId());
|
241
321
|
|
322
|
+
|
242
323
|
}
|
243
324
|
|
244
325
|
|
@@ -263,10 +344,12 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
263
344
|
|
264
345
|
@Override
|
265
346
|
public void onBackPressed() {
|
266
|
-
|
267
|
-
|
347
|
+
if(session!=null){
|
348
|
+
session.disconnect();
|
349
|
+
}
|
268
350
|
}
|
269
351
|
|
352
|
+
|
270
353
|
@SuppressLint("MissingInflatedId")
|
271
354
|
@Override
|
272
355
|
protected void onCreate(Bundle savedInstanceState) {
|
@@ -274,14 +357,24 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
274
357
|
Intent intent = getIntent();
|
275
358
|
|
276
359
|
super.onCreate(savedInstanceState);
|
360
|
+
// observers = new ArrayList<>();
|
361
|
+
// observers1 = new ArrayList<>();
|
362
|
+
instance = new VideoCallActivity();
|
363
|
+
handler.post(logRunnable);
|
364
|
+
|
277
365
|
setContentView(R.layout.video_call_layout);
|
278
|
-
|
366
|
+
sendNotifications = findViewById(R.id.senddata);
|
367
|
+
|
368
|
+
circleAvatar = findViewById(R.id.image_view);
|
279
369
|
|
280
370
|
getSupportActionBar().hide();
|
281
371
|
ActionBar actionBar = getActionBar();
|
282
372
|
if (actionBar != null) {
|
283
373
|
actionBar.hide();
|
284
374
|
}
|
375
|
+
patientStatus = findViewById(R.id.waiting);
|
376
|
+
admit = findViewById(R.id.admit);
|
377
|
+
deny = findViewById(R.id.deny);
|
285
378
|
|
286
379
|
if (intent != null) {
|
287
380
|
// Retrieve the data using the same key you used to put it in the Intent
|
@@ -290,17 +383,48 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
290
383
|
String API_KEY = intent.getStringExtra("apiKey");
|
291
384
|
SUBSCRIBERNAME = intent.getStringExtra("subscriberName");
|
292
385
|
PUBLISHERNAME = intent.getStringExtra("publisherName");
|
386
|
+
profilePicApiUrl = intent.getStringExtra("profilePicApiUrl");
|
387
|
+
Log.d("profilePicApiUrl",profilePicApiUrl);
|
388
|
+
isPatientOnline = intent.getBooleanExtra("isPatientOnline",false);
|
293
389
|
ISPROVIDER = intent.getBooleanExtra("isProvider",false);
|
294
390
|
publisherViewContainer = findViewById(R.id.publisher_container);
|
295
391
|
subscriberViewContainer = findViewById(R.id.subscriber_container);
|
296
392
|
TextView publisherNameTextView = findViewById(R.id.publisherName);
|
393
|
+
publishernameView = findViewById(R.id.publisherNameView);
|
297
394
|
TextView subscriberNameTextView = findViewById(R.id.subscriberName);
|
395
|
+
|
396
|
+
if(ISPROVIDER){
|
397
|
+
if (isPatientOnline) {
|
398
|
+
patientStatus.setText("WAITING");
|
399
|
+
sendNotifications.setVisibility(View.GONE);
|
400
|
+
admit.setVisibility(View.VISIBLE);
|
401
|
+
deny.setVisibility(View.VISIBLE);
|
402
|
+
patientStatus.setBackgroundColor(getResources().getColor(R.color.waiting));
|
403
|
+
} else {
|
404
|
+
admit.setVisibility(View.GONE);
|
405
|
+
deny.setVisibility(View.GONE);
|
406
|
+
sendNotifications.setVisibility(View.VISIBLE);
|
407
|
+
patientStatus.setText("OFFLINE");
|
408
|
+
patientStatus.setBackgroundColor(getResources().getColor(R.color.offline));
|
409
|
+
}
|
410
|
+
}else{
|
411
|
+
|
412
|
+
}
|
298
413
|
publisherNameTextView.setText(SUBSCRIBERNAME);
|
414
|
+
publishernameView.setText(SUBSCRIBERNAME);
|
415
|
+
publisherNameTextView.bringToFront();
|
299
416
|
subscriberNameTextView.setText(PUBLISHERNAME);
|
300
417
|
timerTextView = findViewById(R.id.timerTextView);
|
301
|
-
|
418
|
+
startTime = System.currentTimeMillis();
|
302
419
|
isTimeron =true;
|
303
420
|
startTimer();
|
421
|
+
ProviderViewLayout = findViewById(R.id.providerViewLayout);
|
422
|
+
if(ISPROVIDER){
|
423
|
+
ProviderViewLayout.setVisibility(View.VISIBLE);
|
424
|
+
}else{
|
425
|
+
ProviderViewLayout.setVisibility(View.GONE);
|
426
|
+
}
|
427
|
+
new urltoSource((ImageView) findViewById(R.id.image_view)).execute(profilePicApiUrl);
|
304
428
|
initializeSession(API_KEY,SESSION_ID , TOKEN);
|
305
429
|
|
306
430
|
}
|
@@ -312,11 +436,45 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
312
436
|
imageViewCamOff = findViewById(R.id.imageView3);
|
313
437
|
imageViewCamSwitch = findViewById(R.id.imageView4);
|
314
438
|
|
315
|
-
|
439
|
+
|
440
|
+
|
441
|
+
sendNotifications.setOnClickListener(new View.OnClickListener() {
|
442
|
+
@Override
|
443
|
+
public void onClick(View v) {
|
444
|
+
|
445
|
+
notifyObservers("send");
|
446
|
+
sendNotifications.setVisibility(View.GONE);
|
447
|
+
|
448
|
+
|
449
|
+
}
|
450
|
+
});
|
451
|
+
admit.setOnClickListener(new View.OnClickListener() {
|
316
452
|
@Override
|
317
453
|
public void onClick(View v) {
|
454
|
+
notifyObservers("admit");
|
455
|
+
patientStatus.setText("Please wait");
|
456
|
+
|
457
|
+
admit.setVisibility(View.GONE);
|
458
|
+
deny.setVisibility(View.GONE);
|
318
459
|
|
460
|
+
}
|
461
|
+
});
|
462
|
+
deny.setOnClickListener(new View.OnClickListener() {
|
463
|
+
@Override
|
464
|
+
public void onClick(View v) {
|
465
|
+
notifyObservers("deny");
|
319
466
|
session.disconnect();
|
467
|
+
admit.setVisibility(View.GONE);
|
468
|
+
deny.setVisibility(View.GONE);
|
469
|
+
}
|
470
|
+
});
|
471
|
+
imageViewEndcall.setOnClickListener(new View.OnClickListener() {
|
472
|
+
@Override
|
473
|
+
public void onClick(View v) {
|
474
|
+
if(session!=null){
|
475
|
+
session.disconnect();
|
476
|
+
}
|
477
|
+
// session.cl=
|
320
478
|
|
321
479
|
}
|
322
480
|
});
|
@@ -390,7 +548,9 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
390
548
|
}
|
391
549
|
}
|
392
550
|
public void endCall() {
|
393
|
-
session
|
551
|
+
if(session!=null){
|
552
|
+
session.disconnect();
|
553
|
+
}
|
394
554
|
|
395
555
|
isEndall =true;
|
396
556
|
// killvc();
|
@@ -409,7 +569,6 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
409
569
|
//
|
410
570
|
// }
|
411
571
|
private void startTimer() {
|
412
|
-
// startTime = System.currentTimeMillis();
|
413
572
|
Handler handler = new Handler();
|
414
573
|
handler.postDelayed(new Runnable() {
|
415
574
|
@Override
|
@@ -421,9 +580,8 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
421
580
|
seconds %= 60;
|
422
581
|
minutes %= 60;
|
423
582
|
|
424
|
-
// Format the time as "00:00:00"
|
425
583
|
String timeString = String.format("%02d:%02d:%02d", hours, minutes, seconds);
|
426
|
-
Log.d(TAG, String.valueOf(currentTime));
|
584
|
+
// Log.d(TAG, String.valueOf(currentTime));
|
427
585
|
|
428
586
|
// Update the TextView with the formatted time
|
429
587
|
timerTextView.setText(timeString);
|
@@ -494,6 +652,8 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
494
652
|
session = new Session.Builder(this, apiKey, sessionId).build();
|
495
653
|
session.setSessionListener(sessionListener);
|
496
654
|
session.connect(token);
|
655
|
+
// circleAvatar.setVisibility(View.GONE); // Hide the view
|
656
|
+
|
497
657
|
Log.d("initializeSession","session.toString()");
|
498
658
|
Log.d("initializeSession",session.toString());
|
499
659
|
}
|
@@ -516,23 +676,81 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
516
676
|
// }
|
517
677
|
|
518
678
|
private void showToast(String message) {
|
519
|
-
|
679
|
+
try{
|
680
|
+
Toast toast = Toast.makeText(this, message, Toast.LENGTH_LONG);
|
681
|
+
View view = toast.getView();
|
682
|
+
int color = Color.parseColor("#1fc600");
|
683
|
+
int colorText = Color.parseColor("#ffffff");
|
684
|
+
view.getBackground().setColorFilter(Color.GREEN, PorterDuff.Mode.SRC_IN);
|
685
|
+
TextView text = view.findViewById(android.R.id.message);
|
686
|
+
text.setTextColor(Color.BLACK);
|
687
|
+
toast.setGravity(Gravity.TOP, 0, 0);
|
688
|
+
toast.show();
|
689
|
+
}catch(Exception e){
|
690
|
+
Log.d("toastlogex",e.toString());
|
691
|
+
}
|
520
692
|
}
|
521
693
|
private void finishWithMessage(String message) {
|
522
694
|
Log.e(TAG, message);
|
523
695
|
// Toast.makeText(this, message, Toast.LENGTH_LONG).show();
|
524
|
-
session
|
696
|
+
if(session!=null){
|
697
|
+
session.disconnect();
|
698
|
+
}
|
525
699
|
Intent resultIntent = new Intent();
|
526
700
|
String resultcode = ISPROVIDER?"999":"888";
|
527
701
|
resultIntent.putExtra("result_key", resultcode);
|
528
702
|
setResult(RESULT_OK, resultIntent);
|
529
703
|
this.finish();
|
530
704
|
}
|
531
|
-
|
705
|
+
|
706
|
+
|
707
|
+
|
708
|
+
|
709
|
+
|
710
|
+
public void patientStatusChanged(Boolean isOnline) {
|
711
|
+
Log.d("patientStatusChanged", String.valueOf(isOnline));
|
712
|
+
Log.d("patientStatusChanged2", String.valueOf(isOnline));
|
713
|
+
Log.d("patientStatusChanged2", String.valueOf(isOnline));
|
714
|
+
|
715
|
+
runOnUiThread(new Runnable() {
|
716
|
+
@Override
|
717
|
+
public void run() {
|
718
|
+
temptest= isOnline;
|
719
|
+
if(isOnline){
|
720
|
+
Log.d("isOnline", String.valueOf(isOnline));
|
721
|
+
|
722
|
+
patientStatus.setText("WAITING");
|
723
|
+
sendNotifications.setVisibility(View.GONE);
|
724
|
+
admit.setVisibility(View.VISIBLE);
|
725
|
+
deny.setVisibility(View.VISIBLE);
|
726
|
+
patientStatus.setBackgroundResource(R.color.waiting);
|
727
|
+
// patientStatus.setBackgroundColor(getResources().getColor(R.color.waiting));
|
728
|
+
}else{
|
729
|
+
Log.d("OFFLINE", String.valueOf(isOnline));
|
730
|
+
patientStatus.setText("OFFLINE");
|
731
|
+
admit.setVisibility(View.GONE);
|
732
|
+
deny.setVisibility(View.GONE);
|
733
|
+
sendNotifications.setVisibility(View.VISIBLE);
|
734
|
+
patientStatus.setText("OFFLINE");
|
735
|
+
patientStatus.setBackgroundResource(R.color.offline);
|
736
|
+
// patientStatus.setBackgroundColor(getResources().getColor(R.color.offline));
|
737
|
+
}
|
738
|
+
|
739
|
+
|
740
|
+
}
|
741
|
+
});
|
742
|
+
}
|
743
|
+
|
744
|
+
public void notifyObservers(String value) {
|
745
|
+
vonagePlugin temp = new vonagePlugin();
|
746
|
+
temp.update(value);
|
747
|
+
}
|
748
|
+
|
749
|
+
private class urltoSource extends AsyncTask<String, Void, Bitmap> {
|
532
750
|
ImageView imageView;
|
533
|
-
public
|
751
|
+
public urltoSource(ImageView imageView) {
|
534
752
|
this.imageView=imageView;
|
535
|
-
Toast.makeText(getApplicationContext(), "Please wait, it may take a few minute...",Toast.LENGTH_SHORT).show();
|
753
|
+
// Toast.makeText(getApplicationContext(), "Please wait, it may take a few minute...",Toast.LENGTH_SHORT).show();
|
536
754
|
}
|
537
755
|
protected Bitmap doInBackground(String... urls) {
|
538
756
|
String imageURL=urls[0];
|
@@ -1,4 +1,6 @@
|
|
1
1
|
package com.managemyhealth.plugin.vonage;
|
2
|
+
import com.getcapacitor.Bridge;
|
3
|
+
import com.getcapacitor.PluginHandle;
|
2
4
|
import com.getcapacitor.annotation.ActivityCallback;
|
3
5
|
import com.opentok.android.OpentokError;
|
4
6
|
import com.opentok.android.Session;
|
@@ -7,11 +9,15 @@ import com.opentok.android.Stream;
|
|
7
9
|
import com.opentok.android.Subscriber;
|
8
10
|
|
9
11
|
import android.app.Activity;
|
12
|
+
import android.content.Context;
|
10
13
|
import android.content.Intent;
|
11
14
|
import android.os.Handler;
|
12
15
|
import android.os.Looper;
|
13
16
|
import android.util.Log;
|
14
17
|
|
18
|
+
import androidx.activity.result.ActivityResult;
|
19
|
+
import androidx.lifecycle.ViewModelProvider;
|
20
|
+
|
15
21
|
import com.getcapacitor.JSObject;
|
16
22
|
import com.getcapacitor.Plugin;
|
17
23
|
import com.getcapacitor.PluginCall;
|
@@ -20,15 +26,53 @@ import com.getcapacitor.annotation.CapacitorPlugin;
|
|
20
26
|
|
21
27
|
|
22
28
|
@CapacitorPlugin(name = "vonage",requestCodes = {999})
|
23
|
-
public class vonagePlugin extends Plugin
|
29
|
+
public class vonagePlugin extends Plugin{
|
24
30
|
String Tag = "VONAGETAG";
|
25
31
|
Boolean isProvid=false;
|
32
|
+
Boolean videstarted=false;
|
26
33
|
private Session session;
|
34
|
+
private static vonagePlugin instance;
|
35
|
+
|
36
|
+
public PluginCall endPluginCal;
|
37
|
+
private static Bridge staticBridge = null;
|
38
|
+
|
39
|
+
public static vonagePlugin getInstance() {
|
40
|
+
if (instance == null) {
|
41
|
+
instance = new vonagePlugin();
|
42
|
+
}
|
43
|
+
instance.videoCallStarted();
|
44
|
+
return instance;
|
45
|
+
}
|
46
|
+
|
27
47
|
|
28
48
|
private String TAG = "Capacitor_Vonage_plugin";
|
29
49
|
|
30
|
-
@PluginMethod()
|
50
|
+
@PluginMethod(returnType = PluginMethod.RETURN_CALLBACK)
|
51
|
+
public void setPatientOnlineStatus(PluginCall call) {
|
52
|
+
final Boolean isOnline = call.getBoolean("isOnline");
|
53
|
+
|
54
|
+
Handler mainHandler = new Handler(Looper.getMainLooper());
|
55
|
+
Context appCon = this.bridge.getContext();
|
56
|
+
Runnable myRunnable = new Runnable() {
|
57
|
+
@Override
|
58
|
+
public void run() {
|
59
|
+
try{
|
60
|
+
// VideoCallActivity temp = new VideoCallActivity();
|
61
|
+
VideoCallActivity.instance.patientStatusChanged(isOnline);
|
62
|
+
}catch (Exception e){
|
63
|
+
showLog("temp");
|
64
|
+
showLog(e.toString());
|
65
|
+
}
|
66
|
+
}
|
67
|
+
};
|
68
|
+
mainHandler.post(myRunnable);
|
69
|
+
|
70
|
+
}
|
71
|
+
@PluginMethod(returnType = PluginMethod.RETURN_CALLBACK)
|
31
72
|
public void endVideoCall(PluginCall call) {
|
73
|
+
|
74
|
+
|
75
|
+
|
32
76
|
showLog("endVideoCallPluginMethod");
|
33
77
|
|
34
78
|
|
@@ -48,42 +92,80 @@ public class vonagePlugin extends Plugin {
|
|
48
92
|
mainHandler.post(myRunnable);
|
49
93
|
|
50
94
|
}
|
51
|
-
@PluginMethod()
|
95
|
+
@PluginMethod(returnType = PluginMethod.RETURN_CALLBACK)
|
52
96
|
public void openVideoCallWindow(PluginCall call) {
|
97
|
+
endPluginCal = call;
|
53
98
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
99
|
+
{
|
100
|
+
call.setKeepAlive(true);
|
101
|
+
JSObject eventData = new JSObject();
|
102
|
+
eventData.put("key", "value test value");
|
103
|
+
final String API_KEY = call.getString("apiKey");
|
104
|
+
final String SESSION_ID = call.getString("sessionId");
|
105
|
+
final String TOKEN = call.getString("token");
|
106
|
+
final String PUBLISHERNAME = call.getString("publisherName");
|
107
|
+
final String SUBSCRIBERNAME = call.getString("subscriberName");
|
108
|
+
final Boolean ISPROVIDER = call.getBoolean("isProvider");
|
109
|
+
final Boolean isPatientOnline = call.getBoolean("isPatientOnline");
|
110
|
+
final String profilePicApiUrl = call.getString("profilePhoto");
|
111
|
+
showLog("profilePicApiUrl");
|
112
|
+
showLog(profilePicApiUrl);
|
113
|
+
isProvid = ISPROVIDER;
|
63
114
|
// initializeSession(API_KEY, SESSION_ID, TOKEN);
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
115
|
+
Intent intent = new Intent(getBridge().getActivity(), VideoCallActivity.class);
|
116
|
+
intent.putExtra("apiKey", API_KEY);
|
117
|
+
intent.putExtra("sessionId", SESSION_ID);
|
118
|
+
intent.putExtra("token", TOKEN);
|
119
|
+
intent.putExtra("subscriberName", SUBSCRIBERNAME);
|
120
|
+
intent.putExtra("publisherName", PUBLISHERNAME);
|
121
|
+
intent.putExtra("isProvider", ISPROVIDER);
|
122
|
+
intent.putExtra("isPatientOnline", isPatientOnline);
|
123
|
+
intent.putExtra("profilePicApiUrl", profilePicApiUrl);
|
124
|
+
|
125
|
+
Handler handler = new Handler();
|
126
|
+
int delayMillis = 2000;
|
76
127
|
|
128
|
+
handler.postDelayed(new Runnable() {
|
129
|
+
@Override
|
130
|
+
public void run() {
|
131
|
+
eventData.put("isProvider", ISPROVIDER);
|
132
|
+
|
133
|
+
}
|
134
|
+
}, delayMillis);
|
135
|
+
|
136
|
+
eventData.put("isProvider", isProvid);
|
137
|
+
showLog("testing resolve endPluginCal");
|
138
|
+
endPluginCal.resolve(eventData);
|
139
|
+
this.startActivityForResult(call, intent, "onAcitivtyClosed");
|
140
|
+
call.setKeepAlive(false);
|
141
|
+
}
|
142
|
+
|
143
|
+
}
|
144
|
+
public void videoCallStarted() {
|
145
|
+
|
146
|
+
Handler handler = new Handler();
|
147
|
+
int delayMillis = 1000;
|
148
|
+
JSObject eventData1 = new JSObject();
|
149
|
+
eventData1.put("key", "value test value");
|
150
|
+
eventData1.put("isProvider", isProvid);
|
151
|
+
showLog("eventData");
|
152
|
+
showLog(eventData1.toString());
|
77
153
|
handler.postDelayed(new Runnable() {
|
78
154
|
@Override
|
79
155
|
public void run() {
|
80
|
-
|
81
|
-
notifyListeners("VideoCallStarted",
|
82
|
-
|
156
|
+
|
157
|
+
// notifyListeners("VideoCallStarted",eventData1);
|
158
|
+
notifing("VideoCallStarted",eventData1);
|
159
|
+
// Log.d("VIDEOCALL00","isProvider634");
|
160
|
+
|
83
161
|
}
|
84
162
|
}, delayMillis);
|
85
|
-
|
86
|
-
|
163
|
+
}
|
164
|
+
private void notifing(String text,JSObject obj){
|
165
|
+
Log.d("VIDEOCALL0","isProvider634");
|
166
|
+
|
167
|
+
notifyListeners(text,obj);
|
168
|
+
Log.d("VIDEOCALL00","isProvider634");
|
87
169
|
|
88
170
|
}
|
89
171
|
|
@@ -158,4 +240,72 @@ public class vonagePlugin extends Plugin {
|
|
158
240
|
private void showLog(String log){
|
159
241
|
Log.d(Tag,log);
|
160
242
|
}
|
243
|
+
private void test(PluginCall call){
|
244
|
+
JSObject eventData = new JSObject();
|
245
|
+
eventData.put("key", "value test value");
|
246
|
+
eventData.put("isProvider", isProvid);
|
247
|
+
showLog("updatevonageplugin called");
|
248
|
+
notifyListeners("VideoCallStarted",eventData);
|
249
|
+
showLog("updatevonageplugin called after");
|
250
|
+
call.resolve();
|
251
|
+
}
|
252
|
+
@ActivityCallback
|
253
|
+
private void onAcitivtyClosed(PluginCall call, ActivityResult result) {
|
254
|
+
if (call == null) {
|
255
|
+
JSObject eventData = new JSObject();
|
256
|
+
if (isProvid) {
|
257
|
+
eventData.put("isProvider", true);
|
258
|
+
notifyListeners("VideoCallEnded", eventData);
|
259
|
+
} else {
|
260
|
+
eventData.put("isProvider", false);
|
261
|
+
Log.d(TAG, "CODE 98 -----------");
|
262
|
+
notifyListeners("VideoCallEnded", eventData);
|
263
|
+
}
|
264
|
+
return;
|
265
|
+
}
|
266
|
+
}
|
267
|
+
@Override
|
268
|
+
public void load() {
|
269
|
+
super.load();
|
270
|
+
staticBridge = this.bridge;
|
271
|
+
}
|
272
|
+
|
273
|
+
public void update(final String value) {
|
274
|
+
if (value=="admit") {
|
275
|
+
vonagePlugin
|
276
|
+
localNotificationsPlugin = vonagePlugin.getVonageLocalPluginInstance();
|
277
|
+
if (localNotificationsPlugin != null) {
|
278
|
+
JSObject eventData = new JSObject();
|
279
|
+
eventData.put("isProvider", true);
|
280
|
+
localNotificationsPlugin.notifyListeners("VideoCallStarted", eventData, true);
|
281
|
+
}
|
282
|
+
} else if(value=="deny") {
|
283
|
+
vonagePlugin
|
284
|
+
localNotificationsPlugin = vonagePlugin.getVonageLocalPluginInstance();
|
285
|
+
if (localNotificationsPlugin != null){
|
286
|
+
JSObject eventData = new JSObject();
|
287
|
+
eventData.put("isProvider", true);
|
288
|
+
localNotificationsPlugin.notifyListeners("VideoCallEnded", eventData, true);
|
289
|
+
}
|
290
|
+
}else if(value =="send"){
|
291
|
+
vonagePlugin
|
292
|
+
localNotificationsPlugin = vonagePlugin.getVonageLocalPluginInstance();
|
293
|
+
if (localNotificationsPlugin != null){
|
294
|
+
JSObject eventData = new JSObject();
|
295
|
+
eventData.put("isProvider", true);
|
296
|
+
localNotificationsPlugin.notifyListeners("SendNotification", eventData, true);
|
297
|
+
}
|
298
|
+
|
299
|
+
}
|
300
|
+
}
|
301
|
+
public static vonagePlugin getVonageLocalPluginInstance() {
|
302
|
+
if (staticBridge != null && staticBridge.getWebView() != null) {
|
303
|
+
PluginHandle handle = staticBridge.getPlugin("vonage");
|
304
|
+
if (handle == null) {
|
305
|
+
return null;
|
306
|
+
}
|
307
|
+
return (vonagePlugin) handle.getInstance();
|
308
|
+
}
|
309
|
+
return null;
|
310
|
+
}
|
161
311
|
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
3
|
+
<solid android:color="#DFF6ED"/> <!-- Set your desired background color -->
|
4
|
+
<corners android:radius="8dp"/> <!-- Set your desired border radius -->
|
5
|
+
<stroke
|
6
|
+
android:color="#60D2A7"
|
7
|
+
android:width="2dp"/>
|
8
|
+
</shape>
|
9
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
3
|
+
<solid android:color="#E4EAED"/> <!-- Set your desired background color -->
|
4
|
+
<corners android:radius="8dp"/> <!-- Set your desired border radius -->
|
5
|
+
<stroke
|
6
|
+
android:color="#C4CBCF"
|
7
|
+
android:width="2dp"/>
|
8
|
+
</shape>
|
9
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
3
|
+
<!-- res/drawable/circle_background.xml -->
|
4
|
+
<shape>
|
5
|
+
<solid android:color="#00FF00" />
|
6
|
+
<corners android:radius="500dp" />
|
7
|
+
</shape>
|
8
|
+
|
9
|
+
</selector>
|
@@ -8,6 +8,8 @@
|
|
8
8
|
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
9
9
|
tools:context=".VideoCallActivity">
|
10
10
|
|
11
|
+
|
12
|
+
|
11
13
|
<androidx.constraintlayout.widget.ConstraintLayout
|
12
14
|
android:layout_width="match_parent"
|
13
15
|
android:layout_height="match_parent"
|
@@ -36,14 +38,7 @@
|
|
36
38
|
android:id="@+id/subscriber_container"
|
37
39
|
android:layout_width="fill_parent"
|
38
40
|
android:layout_height="match_parent"
|
39
|
-
android:background="#
|
40
|
-
|
41
|
-
<ImageView
|
42
|
-
android:id="@+id/image_view"
|
43
|
-
android:layout_width="150dp"
|
44
|
-
android:layout_height="150dp"
|
45
|
-
android:scaleType="centerCrop" />
|
46
|
-
</FrameLayout>
|
41
|
+
android:background="#ffffff" />
|
47
42
|
|
48
43
|
<TextView
|
49
44
|
android:id="@+id/publisherName"
|
@@ -56,8 +51,7 @@
|
|
56
51
|
|
57
52
|
android:text="Publisher Name"
|
58
53
|
android:textColor="@android:color/white"
|
59
|
-
android:textSize="16sp"
|
60
|
-
android:visibility="visible" />
|
54
|
+
android:textSize="16sp" />
|
61
55
|
<TextView
|
62
56
|
android:id="@+id/timerTextView"
|
63
57
|
android:layout_width="140dp"
|
@@ -79,42 +73,135 @@
|
|
79
73
|
android:layout_marginRight="16dp"
|
80
74
|
android:layout_marginBottom="80dp"
|
81
75
|
android:background="#9b9c98"
|
82
|
-
android:layout_below="@id/
|
76
|
+
android:layout_below="@id/publisherName"
|
83
77
|
|
84
78
|
android:padding="2dp" >
|
79
|
+
<TextView
|
80
|
+
android:id="@+id/subscriberName"
|
81
|
+
android:layout_width="100dp"
|
82
|
+
android:layout_height="wrap_content"
|
83
|
+
android:layout_gravity="center_vertical|bottom"
|
84
|
+
android:paddingBottom="6dp"
|
85
|
+
android:text="@string/subscriber_name"
|
86
|
+
android:textColor="@android:color/white"
|
87
|
+
android:visibility="visible"
|
88
|
+
android:textSize="12sp" />
|
85
89
|
|
86
90
|
</FrameLayout>
|
87
|
-
|
88
|
-
|
89
|
-
|
91
|
+
|
92
|
+
<de.hdodenhof.circleimageview.CircleImageView
|
93
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
94
|
+
android:id="@+id/image_view"
|
95
|
+
android:layout_width="120dp"
|
96
|
+
android:layout_height="120dp"
|
97
|
+
app:civ_border_width="2dp"
|
98
|
+
android:layout_gravity="center_horizontal"
|
99
|
+
android:layout_marginTop="130dp"
|
100
|
+
android:visibility="visible"
|
101
|
+
app:civ_border_color="#ffffff"/>
|
102
|
+
<LinearLayout
|
103
|
+
xmlns:android="http://schemas.android.com/apk/res/android"
|
104
|
+
android:id="@+id/providerViewLayout"
|
105
|
+
android:layout_width="match_parent"
|
106
|
+
android:layout_marginTop="250dp"
|
90
107
|
android:layout_height="wrap_content"
|
91
|
-
android:
|
92
|
-
android:
|
93
|
-
android:
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
108
|
+
android:orientation="vertical"
|
109
|
+
android:gravity="center"
|
110
|
+
android:padding="16dp">
|
111
|
+
<TextView
|
112
|
+
android:id="@+id/publisherNameView"
|
113
|
+
android:layout_width="180dp"
|
114
|
+
android:layout_height="wrap_content"
|
115
|
+
android:paddingBottom="4dp"
|
116
|
+
android:text="@string/publisher_name"
|
117
|
+
android:textColor="#000000"
|
118
|
+
android:textSize="18sp"
|
119
|
+
android:gravity="center"
|
120
|
+
/>
|
121
|
+
|
122
|
+
|
123
|
+
<TextView
|
124
|
+
android:id="@+id/waiting"
|
125
|
+
android:layout_width="80dp"
|
126
|
+
android:layout_height="wrap_content"
|
127
|
+
android:text="@string/waiting"
|
128
|
+
android:textColor="#000000"
|
129
|
+
android:paddingBottom="4dp"
|
130
|
+
android:paddingTop="4dp"
|
131
|
+
android:textSize="12sp"
|
132
|
+
android:layout_marginTop="10dp"
|
133
|
+
android:background="#DFF6ED"
|
134
|
+
android:gravity="center_vertical|center_horizontal"
|
135
|
+
tools:ignore="DuplicateIds" />
|
136
|
+
|
137
|
+
<LinearLayout
|
138
|
+
android:layout_width="match_parent"
|
139
|
+
android:layout_height="wrap_content"
|
140
|
+
android:orientation="horizontal"
|
141
|
+
android:gravity="center"
|
142
|
+
|
143
|
+
android:padding="16dp">
|
144
|
+
|
145
|
+
|
146
|
+
<!-- Button 1 -->
|
147
|
+
<Button
|
148
|
+
android:id="@+id/admit"
|
149
|
+
android:layout_width="65dp"
|
150
|
+
android:layout_height="35dp"
|
151
|
+
android:background="@drawable/button_background"
|
152
|
+
android:text="@string/admit"
|
153
|
+
android:textColor="#000000"
|
154
|
+
|
155
|
+
android:layout_marginEnd="8dp"/>
|
156
|
+
|
157
|
+
<!-- Button 2 -->
|
158
|
+
<Button
|
159
|
+
android:id="@+id/deny"
|
160
|
+
android:layout_width="65dp"
|
161
|
+
android:layout_height="35dp"
|
162
|
+
android:background="@drawable/button_background2"
|
163
|
+
android:text="@string/deny"
|
164
|
+
android:textColor="#000000"
|
165
|
+
android:layout_marginStart="8dp"/>
|
166
|
+
<Button
|
167
|
+
android:id="@+id/senddata"
|
168
|
+
android:layout_width="205dp"
|
169
|
+
android:layout_height="35dp"
|
170
|
+
android:background="@drawable/button_background"
|
171
|
+
android:text="@string/sendvalue"
|
172
|
+
android:textColor="#000000"
|
173
|
+
android:layout_marginStart="8dp"/>
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
</LinearLayout>
|
178
|
+
<LinearLayout
|
179
|
+
android:layout_width="match_parent"
|
180
|
+
android:layout_height="wrap_content"
|
181
|
+
android:orientation="horizontal"
|
182
|
+
android:gravity="center"
|
183
|
+
|
184
|
+
android:padding="16dp">
|
185
|
+
<!-- Button 3 -->
|
186
|
+
|
187
|
+
|
188
|
+
</LinearLayout>
|
103
189
|
|
104
|
-
<androidx.cardview.widget.CardView
|
105
|
-
android:layout_width="150dp"
|
106
|
-
android:layout_height="150dp"
|
107
|
-
app:cardCornerRadius="250dp"
|
108
|
-
android:layout_gravity="center">
|
109
190
|
|
110
|
-
|
191
|
+
</LinearLayout>
|
192
|
+
|
193
|
+
<!-- <ImageView-->
|
194
|
+
<!-- android:layout_width="150dp"-->
|
195
|
+
<!-- android:layout_height="150dp"-->
|
196
|
+
<!-- android:scaleType="centerCrop"/>-->
|
197
|
+
|
111
198
|
|
112
|
-
</androidx.cardview.widget.CardView>
|
113
199
|
|
114
200
|
|
115
201
|
</FrameLayout>
|
116
202
|
|
117
203
|
</LinearLayout>
|
204
|
+
|
118
205
|
<androidx.constraintlayout.widget.Guideline
|
119
206
|
android:id="@+id/guidelineBottom"
|
120
207
|
android:layout_width="wrap_content"
|
@@ -125,7 +212,7 @@
|
|
125
212
|
android:layout_width="fill_parent"
|
126
213
|
android:layout_height="53dp"
|
127
214
|
android:layout_alignParentBottom="false"
|
128
|
-
android:gravity="clip_horizontal"
|
215
|
+
android:gravity="clip_horizontal|center_horizontal"
|
129
216
|
android:orientation="horizontal"
|
130
217
|
app:layout_constraintBottom_toBottomOf="@+id/main"
|
131
218
|
app:layout_constraintStart_toStartOf="parent"
|
@@ -134,40 +221,47 @@
|
|
134
221
|
<!-- Image resource for the FAB -->
|
135
222
|
|
136
223
|
<!-- Set the background image using android:background -->
|
137
|
-
|
138
|
-
android:id="@+id/imageView1"
|
139
|
-
android:layout_width="0dp"
|
140
|
-
android:layout_height="50dp"
|
141
|
-
android:layout_weight="1"
|
142
|
-
android:src="@drawable/callend"
|
143
|
-
android:contentDescription="EndCall"
|
144
|
-
/>
|
224
|
+
|
145
225
|
<ImageView
|
146
226
|
android:id="@+id/imageView4"
|
147
|
-
android:layout_width="
|
227
|
+
android:layout_width="50dp"
|
148
228
|
android:layout_height="50dp"
|
149
|
-
android:layout_weight="1"
|
150
229
|
android:contentDescription="Switch Camera"
|
151
230
|
android:src="@drawable/cameraswitch" />
|
231
|
+
<Space
|
232
|
+
android:layout_width="22dp"
|
233
|
+
android:layout_height="match_parent"/>
|
152
234
|
|
153
235
|
<ImageView
|
154
236
|
android:id="@+id/imageView3"
|
155
|
-
android:layout_width="
|
237
|
+
android:layout_width="50dp"
|
156
238
|
android:layout_height="50dp"
|
157
|
-
android:layout_weight="1"
|
158
239
|
android:src="@drawable/cameraonwhite"
|
159
240
|
android:contentDescription="Camera On/Off"
|
160
241
|
/>
|
242
|
+
<Space
|
243
|
+
android:layout_width="22dp"
|
244
|
+
android:layout_height="match_parent"/>
|
161
245
|
|
162
246
|
|
163
247
|
<ImageView
|
164
248
|
android:id="@+id/imageView2"
|
165
|
-
android:layout_width="
|
249
|
+
android:layout_width="50dp"
|
166
250
|
android:layout_height="50dp"
|
167
|
-
android:layout_weight="1"
|
168
251
|
android:src="@drawable/microphoneonwhite"
|
169
252
|
android:contentDescription="Mute"
|
170
253
|
/>
|
254
|
+
<Space
|
255
|
+
android:layout_width="22dp"
|
256
|
+
android:layout_height="match_parent"/>
|
257
|
+
<ImageView
|
258
|
+
android:id="@+id/imageView1"
|
259
|
+
android:layout_width="50dp"
|
260
|
+
android:layout_height="50dp"
|
261
|
+
android:src="@drawable/callend"
|
262
|
+
android:contentDescription="EndCall"
|
263
|
+
/>
|
264
|
+
|
171
265
|
|
172
266
|
////////////////////////////
|
173
267
|
</LinearLayout>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<resources>
|
3
|
+
<string name="subscriber_name">Subscriber Name</string>
|
4
|
+
<string name="admit">Admit</string>
|
5
|
+
<string name="deny">Deny</string>
|
6
|
+
<string name="sendvalue">SEND E-MAIL NOTIFICATION</string>
|
7
|
+
<string name="publisher_name">Publisher Name</string>
|
8
|
+
<string name="waiting">WAITING</string>
|
9
|
+
</resources>
|