diff --git a/android/app/build.gradle b/android/app/build.gradle
index 1aa8b742..048dea59 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -61,7 +61,15 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+ implementation 'androidx.appcompat:appcompat:1.1.0'
+ implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
+ implementation 'androidx.appcompat:appcompat:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
+
+ //openTok
+ implementation 'com.opentok.android:opentok-android-sdk:2.16.5'
+ //permissions
+ implementation 'pub.devrel:easypermissions:0.4.0'
}
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index e6d9a9ad..fda3b312 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -1,32 +1,41 @@
+
-
-
+ FlutterApplication and put your custom class here.
+ -->
+
+
+ android:icon="@mipmap/ic_launcher"
+ android:label="doctor_app_flutter">
+
-
-
+
+
+
-
+
-
+
+
\ No newline at end of file
diff --git a/android/app/src/main/java/com/example/doctor_app_flutter/VideoCallActivity.java b/android/app/src/main/java/com/example/doctor_app_flutter/VideoCallActivity.java
new file mode 100644
index 00000000..146a3d54
--- /dev/null
+++ b/android/app/src/main/java/com/example/doctor_app_flutter/VideoCallActivity.java
@@ -0,0 +1,390 @@
+package com.example.doctor_app_flutter;
+
+import androidx.annotation.NonNull;
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.Manifest;
+import android.annotation.SuppressLint;
+import android.content.res.ColorStateList;
+import android.graphics.Color;
+import android.opengl.GLSurfaceView;
+import android.os.Bundle;
+import android.os.CountDownTimer;
+import android.os.Handler;
+import android.util.Log;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.ProgressBar;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.opentok.android.Session;
+import com.opentok.android.Stream;
+import com.opentok.android.Publisher;
+import com.opentok.android.PublisherKit;
+import com.opentok.android.Subscriber;
+import com.opentok.android.BaseVideoRenderer;
+import com.opentok.android.OpentokError;
+import com.opentok.android.SubscriberKit;
+
+import java.util.List;
+import java.util.Objects;
+
+import pub.devrel.easypermissions.AfterPermissionGranted;
+import pub.devrel.easypermissions.AppSettingsDialog;
+import pub.devrel.easypermissions.EasyPermissions;
+
+public class VideoCallActivity extends AppCompatActivity implements EasyPermissions.PermissionCallbacks,
+ Session.SessionListener,
+ Publisher.PublisherListener,
+ Subscriber.VideoListener {
+
+
+ private static final String TAG = VideoCallActivity.class.getSimpleName();
+
+ private static final int RC_SETTINGS_SCREEN_PERM = 123;
+ private static final int RC_VIDEO_APP_PERM = 124;
+
+ private Session mSession;
+ private Publisher mPublisher;
+ private Subscriber mSubscriber;
+
+ private Handler mVolHandler;
+ private Runnable mVolRunnable;
+
+ private FrameLayout mPublisherViewContainer;
+ private RelativeLayout mSubscriberViewContainer;
+ private RelativeLayout controlPanel;
+
+ private String apiKey;
+ private String sessionId;
+ private String token;
+ private String callDuration;
+ private String warningDuration;
+ private String appLang;
+
+ private boolean isSwitchCameraClicked;
+ private boolean isCameraClicked;
+ private boolean isSpeckerClicked;
+ private boolean isMicClicked;
+
+ private ImageView mCallBtn;
+ private ImageView mCameraBtn;
+ private ImageView mSwitchCameraBtn;
+ private ImageView mspeckerBtn;
+ private ImageView mMicBtn;
+
+ private ProgressBar progressBar;
+ private CountDownTimer countDownTimer;
+ private TextView progressBarTextView;
+ private RelativeLayout progressBarLayout;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ setTheme(R.style.AppTheme);
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_video_call);
+ Objects.requireNonNull(getSupportActionBar()).hide();
+ initUI();
+ requestPermissions();
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+
+ if (mSession == null) {
+ return;
+ }
+ mSession.onPause();
+
+ if (isFinishing()) {
+ disconnectSession();
+ }
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+
+ if (mSession == null) {
+ return;
+ }
+ mSession.onResume();
+ }
+
+ @Override
+ protected void onDestroy() {
+ disconnectSession();
+
+ super.onDestroy();
+ }
+
+ @SuppressLint("ClickableViewAccessibility")
+ private void initUI() {
+ mPublisherViewContainer = (FrameLayout) findViewById(R.id.local_video_view_container);
+ mSubscriberViewContainer = (RelativeLayout) findViewById(R.id.remote_video_view_container);
+
+ apiKey = getIntent().getStringExtra("apiKey");
+ sessionId = getIntent().getStringExtra("sessionId");
+ token = getIntent().getStringExtra("token");
+ // callDuration = getIntent().getStringExtra("callDuration");
+ // warningDuration = getIntent().getStringExtra("warningDuration");
+ appLang=getIntent().getStringExtra("appLang");
+
+ controlPanel=findViewById(R.id.control_panel);
+
+ mCallBtn = findViewById(R.id.btn_call);
+ mCameraBtn = findViewById(R.id.btn_camera);
+ mSwitchCameraBtn = findViewById(R.id.btn_switch_camera);
+ mspeckerBtn = findViewById(R.id.btn_specker);
+ mMicBtn = findViewById(R.id.btn_mic);
+
+ // progressBarLayout=findViewById(R.id.progressBar);
+ // progressBar=findViewById(R.id.progress_bar);
+// progressBarTextView=findViewById(R.id.progress_bar_text);
+// progressBar.setVisibility(View.GONE);
+
+ hiddenButtons();
+
+ mSubscriberViewContainer.setOnTouchListener((v, event) -> {
+ controlPanel.setVisibility(View.VISIBLE);
+ mVolHandler.removeCallbacks(mVolRunnable);
+ mVolHandler.postDelayed(mVolRunnable, 5*1000);
+ return true;
+ });
+
+ if (appLang.equals("ar")) {
+ progressBarLayout.setLayoutDirection(View.LAYOUT_DIRECTION_RTL);
+ }
+
+ }
+
+
+
+ private void hiddenButtons(){
+ mVolHandler = new Handler();
+ mVolRunnable = new Runnable() {
+ public void run() {
+ controlPanel.setVisibility(View.GONE);
+ }
+ };
+ mVolHandler.postDelayed(mVolRunnable,5*1000);
+ }
+
+ @Override
+ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults);
+
+ EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
+ }
+
+ @Override
+ public void onPermissionsGranted(int requestCode, List perms) {
+ Log.d(TAG, "onPermissionsGranted:" + requestCode + ":" + perms.size());
+ }
+
+ @Override
+ public void onPermissionsDenied(int requestCode, List perms) {
+ Log.d(TAG, "onPermissionsDenied:" + requestCode + ":" + perms.size());
+
+ if (EasyPermissions.somePermissionPermanentlyDenied(this, perms)) {
+ new AppSettingsDialog.Builder(this)
+ .setTitle(getString(R.string.title_settings_dialog))
+ .setRationale(getString(R.string.rationale_ask_again))
+ .setPositiveButton(getString(R.string.setting))
+ .setNegativeButton(getString(R.string.cancel))
+ .setRequestCode(RC_SETTINGS_SCREEN_PERM)
+ .build()
+ .show();
+ }
+ }
+
+ @AfterPermissionGranted(RC_VIDEO_APP_PERM)
+ private void requestPermissions() {
+ String[] perms = {Manifest.permission.INTERNET, Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO};
+ if (EasyPermissions.hasPermissions(this, perms)) {
+ mSession = new Session.Builder(VideoCallActivity.this, apiKey, sessionId).build();
+ mSession.setSessionListener(this);
+ mSession.connect(token);
+ } else {
+ EasyPermissions.requestPermissions(this, getString(R.string.remaining_ar), RC_VIDEO_APP_PERM, perms);
+ }
+ }
+
+ @Override
+ public void onConnected(Session session) {
+ Log.i(TAG, "Session Connected");
+
+ mPublisher = new Publisher.Builder(this).build();
+ mPublisher.setPublisherListener(this);
+
+ mPublisherViewContainer.addView(mPublisher.getView());
+
+ if (mPublisher.getView() instanceof GLSurfaceView){
+ ((GLSurfaceView) mPublisher.getView()).setZOrderOnTop(true);
+ }
+
+ mSession.publish(mPublisher);
+ }
+
+ @Override
+ public void onDisconnected(Session session) {
+ Log.d(TAG, "onDisconnected: disconnected from session " + session.getSessionId());
+
+ mSession = null;
+ }
+
+ @Override
+ public void onError(Session session, OpentokError opentokError) {
+ Log.d(TAG, "onError: Error (" + opentokError.getMessage() + ") in session " + session.getSessionId());
+
+ Toast.makeText(this, "Session error. See the logcat please.", Toast.LENGTH_LONG).show();
+ finish();
+ }
+
+ @Override
+ public void onStreamReceived(Session session, Stream stream) {
+ Log.d(TAG, "onStreamReceived: New stream " + stream.getStreamId() + " in session " + session.getSessionId());
+
+ if (mSubscriber != null) {
+ return;
+ }
+ subscribeToStream(stream);
+ }
+
+ @Override
+ public void onStreamDropped(Session session, Stream stream) {
+ Log.d(TAG, "onStreamDropped: Stream " + stream.getStreamId() + " dropped from session " + session.getSessionId());
+
+ if (mSubscriber == null) {
+ return;
+ }
+
+ if (mSubscriber.getStream().equals(stream)) {
+ mSubscriberViewContainer.removeView(mSubscriber.getView());
+ mSubscriber.destroy();
+ mSubscriber = null;
+ }
+ disconnectSession();
+ }
+
+ @Override
+ public void onStreamCreated(PublisherKit publisherKit, Stream stream) {
+ Log.d(TAG, "onStreamCreated: Own stream " + stream.getStreamId() + " created");
+ }
+
+ @Override
+ public void onStreamDestroyed(PublisherKit publisherKit, Stream stream) {
+ Log.d(TAG, "onStreamDestroyed: Own stream " + stream.getStreamId() + " destroyed");
+ }
+
+ @Override
+ public void onError(PublisherKit publisherKit, OpentokError opentokError) {
+ Log.d(TAG, "onError: Error (" + opentokError.getMessage() + ") in publisher");
+
+ Toast.makeText(this, "Session error. See the logcat please.", Toast.LENGTH_LONG).show();
+ finish();
+ }
+
+ @Override
+ public void onVideoDataReceived(SubscriberKit subscriberKit) {
+ mSubscriber.setStyle(BaseVideoRenderer.STYLE_VIDEO_SCALE, BaseVideoRenderer.STYLE_VIDEO_FILL);
+ mSubscriberViewContainer.addView(mSubscriber.getView());
+ }
+
+ @Override
+ public void onVideoDisabled(SubscriberKit subscriberKit, String s) {
+
+ }
+
+ @Override
+ public void onVideoEnabled(SubscriberKit subscriberKit, String s) {
+
+ }
+
+ @Override
+ public void onVideoDisableWarning(SubscriberKit subscriberKit) {
+
+ }
+
+ @Override
+ public void onVideoDisableWarningLifted(SubscriberKit subscriberKit) {
+
+ }
+
+ private void subscribeToStream(Stream stream) {
+ mSubscriber = new Subscriber.Builder(VideoCallActivity.this, stream).build();
+ mSubscriber.setVideoListener(this);
+ mSession.subscribe(mSubscriber);
+ }
+
+ private void disconnectSession() {
+ if (mSession == null) {
+ finish();
+ return;
+ }
+
+ if (mSubscriber != null) {
+ mSubscriberViewContainer.removeView(mSubscriber.getView());
+ mSession.unsubscribe(mSubscriber);
+ mSubscriber.destroy();
+ mSubscriber = null;
+ }
+
+ if (mPublisher != null) {
+ mPublisherViewContainer.removeView(mPublisher.getView());
+ mSession.unpublish(mPublisher);
+ mPublisher.destroy();
+ mPublisher = null;
+ }
+ mSession.disconnect();
+ if(countDownTimer!=null) {
+ countDownTimer.cancel();
+ }
+ finish();
+ }
+
+ public void onSwitchCameraClicked(View view) {
+ if (mPublisher != null) {
+ isSwitchCameraClicked = !isSwitchCameraClicked;
+ mPublisher.cycleCamera();
+ int res = isSwitchCameraClicked ? R.drawable.flip_disapled : R.drawable.flip_enabled;
+ mSwitchCameraBtn.setImageResource(res);
+ }
+ }
+
+ public void onCameraClicked(View view) {
+ if (mPublisher != null) {
+ isCameraClicked = !isCameraClicked;
+ mPublisher.setPublishVideo(!isCameraClicked);
+ int res = isCameraClicked ? R.drawable.video_disanabled : R.drawable.video_enabled;
+ mCameraBtn.setImageResource(res);
+ }
+ }
+
+ public void onSpeckerClicked(View view) {
+ if (mSubscriber != null) {
+ isSpeckerClicked = !isSpeckerClicked;
+ mSubscriber.setSubscribeToAudio(!isSpeckerClicked);
+ int res = isSpeckerClicked ? R.drawable.audio_disabled : R.drawable.audio_enabled;
+ mspeckerBtn.setImageResource(res);
+ }
+ }
+ public void onMicClicked(View view) {
+ if (mPublisher != null) {
+ isMicClicked = !isMicClicked;
+ mPublisher.setPublishAudio(!isMicClicked);
+ int res = isMicClicked ? R.drawable.mic_disabled : R.drawable.mic_enabled;
+ mMicBtn.setImageResource(res);
+ }
+ }
+
+ public void onCallClicked(View view) {
+ disconnectSession();
+ }
+}
\ No newline at end of file
diff --git a/android/app/src/main/kotlin/com/example/doctor_app_flutter/MainActivity.kt b/android/app/src/main/kotlin/com/example/doctor_app_flutter/MainActivity.kt
index ce684883..d1d710ad 100644
--- a/android/app/src/main/kotlin/com/example/doctor_app_flutter/MainActivity.kt
+++ b/android/app/src/main/kotlin/com/example/doctor_app_flutter/MainActivity.kt
@@ -1,13 +1,45 @@
package com.example.doctor_app_flutter
+import android.content.Intent
import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant
import io.flutter.embedding.android.FlutterFragmentActivity
+import io.flutter.plugin.common.MethodChannel
class MainActivity: FlutterFragmentActivity() {
- override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
- GeneratedPluginRegistrant.registerWith(flutterEngine);
+
+ private val CHANNEL = "Dr.cloudSolution/videoCall"
+
+
+ override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
+ GeneratedPluginRegistrant.registerWith(flutterEngine)
+
+ MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL).setMethodCallHandler {
+ call, result ->
+ if (call.method == "openVideoCall") {
+ val apiKey = call.argument("kApiKey")
+ val sessionId = call.argument("kSessionId")
+ val token = call.argument("kToken")
+ // val callDuration = call.argument("callDuration")
+ // val warningDuration = call.argument("warningDuration")
+ val appLang = call.argument("appLang")
+ openVideoCall(apiKey,sessionId,token/*,callDuration,warningDuration*/,appLang)
+ } else {
+ result.notImplemented()
+ }
+ }
+ }
+
+ private fun openVideoCall(apiKey: String?, sessionId: String?, token: String?/*, callDuration: String?, warningDuration: String?*/, appLang: String?) {
+ val intent = Intent(this, VideoCallActivity::class.java)
+ intent.putExtra("apiKey", apiKey)
+ intent.putExtra("sessionId", sessionId)
+ intent.putExtra("token", token)
+ // intent.putExtra("callDuration", callDuration)
+ //intent.putExtra("warningDuration", warningDuration)
+ intent.putExtra("appLang", appLang)
+ startActivity(intent)
}
}
diff --git a/android/app/src/main/res/drawable/audio_disabled.png b/android/app/src/main/res/drawable/audio_disabled.png
new file mode 100644
index 00000000..3afc77ce
Binary files /dev/null and b/android/app/src/main/res/drawable/audio_disabled.png differ
diff --git a/android/app/src/main/res/drawable/audio_enabled.png b/android/app/src/main/res/drawable/audio_enabled.png
new file mode 100644
index 00000000..f2e25f75
Binary files /dev/null and b/android/app/src/main/res/drawable/audio_enabled.png differ
diff --git a/android/app/src/main/res/drawable/call.png b/android/app/src/main/res/drawable/call.png
new file mode 100644
index 00000000..fc00f4f9
Binary files /dev/null and b/android/app/src/main/res/drawable/call.png differ
diff --git a/android/app/src/main/res/drawable/flip_disapled.png b/android/app/src/main/res/drawable/flip_disapled.png
new file mode 100644
index 00000000..5226029e
Binary files /dev/null and b/android/app/src/main/res/drawable/flip_disapled.png differ
diff --git a/android/app/src/main/res/drawable/flip_enabled.png b/android/app/src/main/res/drawable/flip_enabled.png
new file mode 100644
index 00000000..152dc10e
Binary files /dev/null and b/android/app/src/main/res/drawable/flip_enabled.png differ
diff --git a/android/app/src/main/res/drawable/launch_image.png b/android/app/src/main/res/drawable/launch_image.png
new file mode 100644
index 00000000..a6d723fa
Binary files /dev/null and b/android/app/src/main/res/drawable/launch_image.png differ
diff --git a/android/app/src/main/res/drawable/mic_disabled.png b/android/app/src/main/res/drawable/mic_disabled.png
new file mode 100644
index 00000000..3603df75
Binary files /dev/null and b/android/app/src/main/res/drawable/mic_disabled.png differ
diff --git a/android/app/src/main/res/drawable/mic_enabled.png b/android/app/src/main/res/drawable/mic_enabled.png
new file mode 100644
index 00000000..5d9aa677
Binary files /dev/null and b/android/app/src/main/res/drawable/mic_enabled.png differ
diff --git a/android/app/src/main/res/drawable/video_disanabled.png b/android/app/src/main/res/drawable/video_disanabled.png
new file mode 100644
index 00000000..5c20c7bd
Binary files /dev/null and b/android/app/src/main/res/drawable/video_disanabled.png differ
diff --git a/android/app/src/main/res/drawable/video_enabled.png b/android/app/src/main/res/drawable/video_enabled.png
new file mode 100644
index 00000000..23331e30
Binary files /dev/null and b/android/app/src/main/res/drawable/video_enabled.png differ
diff --git a/android/app/src/main/res/drawable/video_off_fill.png b/android/app/src/main/res/drawable/video_off_fill.png
new file mode 100644
index 00000000..d153439f
Binary files /dev/null and b/android/app/src/main/res/drawable/video_off_fill.png differ
diff --git a/android/app/src/main/res/layout/activity_video_call.xml b/android/app/src/main/res/layout/activity_video_call.xml
new file mode 100644
index 00000000..c7500b6c
--- /dev/null
+++ b/android/app/src/main/res/layout/activity_video_call.xml
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml
new file mode 100644
index 00000000..d1d2a305
--- /dev/null
+++ b/android/app/src/main/res/values/colors.xml
@@ -0,0 +1,11 @@
+
+
+ #ffffff
+ #303F9F
+ #fc3850
+ #e4e9f2
+
+
+ #827b92
+ #484258
+
diff --git a/android/app/src/main/res/values/dimens.xml b/android/app/src/main/res/values/dimens.xml
new file mode 100644
index 00000000..79f3d269
--- /dev/null
+++ b/android/app/src/main/res/values/dimens.xml
@@ -0,0 +1,22 @@
+
+
+ 16dp
+ 16dp
+ 28dp
+ 24dp
+
+
+ 60dp
+ 54dp
+
+
+ 88dp
+ 117dp
+ 50dp
+ 100dp
+ 90dp
+
+
+ 24dp
+ 25dp
+
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
new file mode 100644
index 00000000..74349756
--- /dev/null
+++ b/android/app/src/main/res/values/strings.xml
@@ -0,0 +1,8 @@
+
+
+ Remaining Time In Seconds:
+ الوقت المتبقي بالثانيه:
+ Settings
+ Cancel
+
+
\ No newline at end of file
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
index 00fa4417..24355fae 100644
--- a/android/app/src/main/res/values/styles.xml
+++ b/android/app/src/main/res/values/styles.xml
@@ -5,4 +5,15 @@
Flutter draws its first frame -->
- @drawable/launch_background
+
+
+
+
diff --git a/android/build.gradle b/android/build.gradle
index 3100ad2d..357c6a1a 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,6 +15,7 @@ allprojects {
repositories {
google()
jcenter()
+ maven { url 'https://tokbox.bintray.com/maven' }
}
}
diff --git a/ios/Podfile b/ios/Podfile
index b30a428b..3b20de57 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -63,6 +63,7 @@ target 'Runner' do
# Keep pod path relative so it can be checked into Podfile.lock.
pod 'Flutter', :path => 'Flutter'
+ pod 'OpenTok'
# Plugin Pods
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 392290a0..ab95eb7c 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -22,6 +22,7 @@ PODS:
- local_auth (0.0.1):
- Flutter
- MTBBarcodeScanner (5.0.11)
+ - OpenTok (2.15.3)
- "permission_handler (5.0.0+hotfix.5)":
- Flutter
- Reachability (3.2)
@@ -50,6 +51,7 @@ DEPENDENCIES:
- hexcolor (from `.symlinks/plugins/hexcolor/ios`)
- imei_plugin (from `.symlinks/plugins/imei_plugin/ios`)
- local_auth (from `.symlinks/plugins/local_auth/ios`)
+ - OpenTok
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
@@ -59,8 +61,9 @@ DEPENDENCIES:
- url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)
SPEC REPOS:
- https://cdn.cocoapods.org/:
+ trunk:
- MTBBarcodeScanner
+ - OpenTok
- Reachability
- SwiftProtobuf
@@ -112,6 +115,7 @@ SPEC CHECKSUMS:
imei_plugin: cb1af7c223ac2d82dcd1457a7137d93d65d2a3cd
local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
+ OpenTok: fde03ecc5ea31fe0a453242847c4ee1f47e1d735
permission_handler: 6226fcb78b97c7c7458a95c7346a11d5184fec12
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
@@ -122,6 +126,6 @@ SPEC CHECKSUMS:
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
-PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83
+PODFILE CHECKSUM: ad71cae222b2dc22820a69b80873417b35fef79e
COCOAPODS: 1.9.3
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 8548667e..9488fd99 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -13,6 +13,7 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+ AF260AD724A4922F006461D3 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF260AD624A4922F006461D3 /* ViewController.swift */; };
B650DC3076E9D70CB188286A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93A5F83B23AB032D1E096663 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
@@ -46,6 +47,7 @@
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
9D4B7DB43C6A6C849D2387CE /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
+ AF260AD624A4922F006461D3 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewController.swift; path = ../../../../AndroidStudioProjects/open_tok_app/ios/Runner/ViewController.swift; sourceTree = ""; };
E698D7B14B12DF768FE47A1A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
/* End PBXFileReference section */
@@ -104,6 +106,7 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
+ AF260AD624A4922F006461D3 /* ViewController.swift */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
@@ -278,6 +281,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ AF260AD724A4922F006461D3 /* ViewController.swift in Sources */,
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
@@ -307,7 +311,6 @@
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -385,7 +388,6 @@
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -441,7 +443,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift
index 70693e4a..5e32b165 100644
--- a/ios/Runner/AppDelegate.swift
+++ b/ios/Runner/AppDelegate.swift
@@ -1,5 +1,9 @@
import UIKit
import Flutter
+import OpenTok
+
+// Created by Mohammad Aljammal & Elham Rababah on 24/06/20.
+// Copyright © 2020 Cloud. All rights reserved.
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
@@ -7,7 +11,47 @@ import Flutter
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
+
+
+ let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
+ let videoCallChannel = FlutterMethodChannel(name: "Dr.cloudSolution/videoCall",
+ binaryMessenger: controller.binaryMessenger)
+ videoCallChannel.setMethodCallHandler({
+ (call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
+ switch call.method {
+ case "openVideoCall":
+ do {
+ let arguments = call.arguments as? NSDictionary
+ let kApiKey = arguments!["kApiKey"] as? String
+ let kSessionId = arguments!["kSessionId"] as? String
+ let kToken = arguments!["kToken"] as? String
+ let appLang = arguments!["appLang"] as? String
+ self.openVideoChat(result: result,kApiKey: kApiKey!,kSessionId:kSessionId!,kToken: kToken!, appLang: appLang!)
+ }
+ default:
+ result(FlutterMethodNotImplemented)
+ }
+ })
+
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
+
+
+
+ private func openVideoChat(result: FlutterResult,kApiKey: String, kSessionId: String,kToken: String,appLang:String) {
+
+ let storyboard = UIStoryboard(name: "Main", bundle: nil)
+ let identifier = "ViewControllerNav"
+ let navVC = storyboard.instantiateViewController(withIdentifier: identifier) as! UINavigationController
+ let videoVC = navVC.viewControllers.first as! ViewController
+ videoVC.kApiKey=kApiKey
+ videoVC.kSessionId=kSessionId
+ videoVC.kToken=kToken
+ videoVC.navigationController?.setNavigationBarHidden(true, animated: false)
+ navVC.modalPresentationStyle = .fullScreen
+ window.rootViewController?.present(navVC, animated: true, completion: nil)
+
+
+ }
}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset copy/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset copy/Contents.json
new file mode 100755
index 00000000..d8db8d65
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset copy/Contents.json
@@ -0,0 +1,98 @@
+{
+ "images" : [
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "20x20",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "20x20",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "83.5x83.5",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ios-marketing",
+ "size" : "1024x1024",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/ios/Runner/Assets.xcassets/Contents.json b/ios/Runner/Assets.xcassets/Contents.json
new file mode 100755
index 00000000..da4a164c
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/ios/Runner/Assets.xcassets/hangUpButton.imageset/Contents.json b/ios/Runner/Assets.xcassets/hangUpButton.imageset/Contents.json
new file mode 100755
index 00000000..4d6f2ca5
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/hangUpButton.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "call.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "call-1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "call-2.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/hangUpButton.imageset/call-1.png b/ios/Runner/Assets.xcassets/hangUpButton.imageset/call-1.png
new file mode 100755
index 00000000..27bb36fb
Binary files /dev/null and b/ios/Runner/Assets.xcassets/hangUpButton.imageset/call-1.png differ
diff --git a/ios/Runner/Assets.xcassets/hangUpButton.imageset/call-2.png b/ios/Runner/Assets.xcassets/hangUpButton.imageset/call-2.png
new file mode 100755
index 00000000..fc00f4f9
Binary files /dev/null and b/ios/Runner/Assets.xcassets/hangUpButton.imageset/call-2.png differ
diff --git a/ios/Runner/Assets.xcassets/hangUpButton.imageset/call.png b/ios/Runner/Assets.xcassets/hangUpButton.imageset/call.png
new file mode 100755
index 00000000..34475399
Binary files /dev/null and b/ios/Runner/Assets.xcassets/hangUpButton.imageset/call.png differ
diff --git a/ios/Runner/Assets.xcassets/localVideoMutedBg.imageset/Contents.json b/ios/Runner/Assets.xcassets/localVideoMutedBg.imageset/Contents.json
new file mode 100755
index 00000000..88daa0cb
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/localVideoMutedBg.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "cameramute.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/ios/Runner/Assets.xcassets/localVideoMutedBg.imageset/cameramute.png b/ios/Runner/Assets.xcassets/localVideoMutedBg.imageset/cameramute.png
new file mode 100755
index 00000000..4778bb24
Binary files /dev/null and b/ios/Runner/Assets.xcassets/localVideoMutedBg.imageset/cameramute.png differ
diff --git a/ios/Runner/Assets.xcassets/muteButton.imageset/Contents.json b/ios/Runner/Assets.xcassets/muteButton.imageset/Contents.json
new file mode 100755
index 00000000..dc221130
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/muteButton.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "mic_enabled.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "mic_enabled-1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "mic_enabled-2.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/muteButton.imageset/mic_enabled-1.png b/ios/Runner/Assets.xcassets/muteButton.imageset/mic_enabled-1.png
new file mode 100755
index 00000000..6dccd908
Binary files /dev/null and b/ios/Runner/Assets.xcassets/muteButton.imageset/mic_enabled-1.png differ
diff --git a/ios/Runner/Assets.xcassets/muteButton.imageset/mic_enabled-2.png b/ios/Runner/Assets.xcassets/muteButton.imageset/mic_enabled-2.png
new file mode 100755
index 00000000..5d9aa677
Binary files /dev/null and b/ios/Runner/Assets.xcassets/muteButton.imageset/mic_enabled-2.png differ
diff --git a/ios/Runner/Assets.xcassets/muteButton.imageset/mic_enabled.png b/ios/Runner/Assets.xcassets/muteButton.imageset/mic_enabled.png
new file mode 100755
index 00000000..e42895e2
Binary files /dev/null and b/ios/Runner/Assets.xcassets/muteButton.imageset/mic_enabled.png differ
diff --git a/ios/Runner/Assets.xcassets/muteButtonSelected.imageset/Contents.json b/ios/Runner/Assets.xcassets/muteButtonSelected.imageset/Contents.json
new file mode 100755
index 00000000..d59e22e8
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/muteButtonSelected.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "mic_disabled.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "mic_disabled-1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "mic_disabled-2.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/muteButtonSelected.imageset/mic_disabled-1.png b/ios/Runner/Assets.xcassets/muteButtonSelected.imageset/mic_disabled-1.png
new file mode 100755
index 00000000..115381b6
Binary files /dev/null and b/ios/Runner/Assets.xcassets/muteButtonSelected.imageset/mic_disabled-1.png differ
diff --git a/ios/Runner/Assets.xcassets/muteButtonSelected.imageset/mic_disabled-2.png b/ios/Runner/Assets.xcassets/muteButtonSelected.imageset/mic_disabled-2.png
new file mode 100755
index 00000000..3603df75
Binary files /dev/null and b/ios/Runner/Assets.xcassets/muteButtonSelected.imageset/mic_disabled-2.png differ
diff --git a/ios/Runner/Assets.xcassets/muteButtonSelected.imageset/mic_disabled.png b/ios/Runner/Assets.xcassets/muteButtonSelected.imageset/mic_disabled.png
new file mode 100755
index 00000000..4101f849
Binary files /dev/null and b/ios/Runner/Assets.xcassets/muteButtonSelected.imageset/mic_disabled.png differ
diff --git a/ios/Runner/Assets.xcassets/speakerOff.imageset/Contents.json b/ios/Runner/Assets.xcassets/speakerOff.imageset/Contents.json
new file mode 100755
index 00000000..38db78c6
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/speakerOff.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "audio_enabled.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "audio_enabled-1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "audio_enabled-2.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/speakerOff.imageset/audio_enabled-1.png b/ios/Runner/Assets.xcassets/speakerOff.imageset/audio_enabled-1.png
new file mode 100755
index 00000000..3edbf65b
Binary files /dev/null and b/ios/Runner/Assets.xcassets/speakerOff.imageset/audio_enabled-1.png differ
diff --git a/ios/Runner/Assets.xcassets/speakerOff.imageset/audio_enabled-2.png b/ios/Runner/Assets.xcassets/speakerOff.imageset/audio_enabled-2.png
new file mode 100755
index 00000000..f2e25f75
Binary files /dev/null and b/ios/Runner/Assets.xcassets/speakerOff.imageset/audio_enabled-2.png differ
diff --git a/ios/Runner/Assets.xcassets/speakerOff.imageset/audio_enabled.png b/ios/Runner/Assets.xcassets/speakerOff.imageset/audio_enabled.png
new file mode 100755
index 00000000..8dca1127
Binary files /dev/null and b/ios/Runner/Assets.xcassets/speakerOff.imageset/audio_enabled.png differ
diff --git a/ios/Runner/Assets.xcassets/speakerOffSelected.imageset/Contents.json b/ios/Runner/Assets.xcassets/speakerOffSelected.imageset/Contents.json
new file mode 100755
index 00000000..866d9a2d
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/speakerOffSelected.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "audio_disabled.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "audio_disabled-1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "audio_disabled-2.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/speakerOffSelected.imageset/audio_disabled-1.png b/ios/Runner/Assets.xcassets/speakerOffSelected.imageset/audio_disabled-1.png
new file mode 100755
index 00000000..0bfea871
Binary files /dev/null and b/ios/Runner/Assets.xcassets/speakerOffSelected.imageset/audio_disabled-1.png differ
diff --git a/ios/Runner/Assets.xcassets/speakerOffSelected.imageset/audio_disabled-2.png b/ios/Runner/Assets.xcassets/speakerOffSelected.imageset/audio_disabled-2.png
new file mode 100755
index 00000000..3afc77ce
Binary files /dev/null and b/ios/Runner/Assets.xcassets/speakerOffSelected.imageset/audio_disabled-2.png differ
diff --git a/ios/Runner/Assets.xcassets/speakerOffSelected.imageset/audio_disabled.png b/ios/Runner/Assets.xcassets/speakerOffSelected.imageset/audio_disabled.png
new file mode 100755
index 00000000..13038522
Binary files /dev/null and b/ios/Runner/Assets.xcassets/speakerOffSelected.imageset/audio_disabled.png differ
diff --git a/ios/Runner/Assets.xcassets/switchCameraButton.imageset/Contents.json b/ios/Runner/Assets.xcassets/switchCameraButton.imageset/Contents.json
new file mode 100755
index 00000000..dce44933
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/switchCameraButton.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "flip_enabled-2.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "flip_enabled.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "flip_enabled-1.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/switchCameraButton.imageset/flip_enabled-1.png b/ios/Runner/Assets.xcassets/switchCameraButton.imageset/flip_enabled-1.png
new file mode 100755
index 00000000..152dc10e
Binary files /dev/null and b/ios/Runner/Assets.xcassets/switchCameraButton.imageset/flip_enabled-1.png differ
diff --git a/ios/Runner/Assets.xcassets/switchCameraButton.imageset/flip_enabled-2.png b/ios/Runner/Assets.xcassets/switchCameraButton.imageset/flip_enabled-2.png
new file mode 100755
index 00000000..b17a1c82
Binary files /dev/null and b/ios/Runner/Assets.xcassets/switchCameraButton.imageset/flip_enabled-2.png differ
diff --git a/ios/Runner/Assets.xcassets/switchCameraButton.imageset/flip_enabled.png b/ios/Runner/Assets.xcassets/switchCameraButton.imageset/flip_enabled.png
new file mode 100755
index 00000000..e28e69b2
Binary files /dev/null and b/ios/Runner/Assets.xcassets/switchCameraButton.imageset/flip_enabled.png differ
diff --git a/ios/Runner/Assets.xcassets/switchCameraButtonSelected.imageset/Contents.json b/ios/Runner/Assets.xcassets/switchCameraButtonSelected.imageset/Contents.json
new file mode 100755
index 00000000..457b9984
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/switchCameraButtonSelected.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "flip_disapled.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "flip_disapled-1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "flip_disapled-2.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/switchCameraButtonSelected.imageset/flip_disapled-1.png b/ios/Runner/Assets.xcassets/switchCameraButtonSelected.imageset/flip_disapled-1.png
new file mode 100755
index 00000000..7d3b6067
Binary files /dev/null and b/ios/Runner/Assets.xcassets/switchCameraButtonSelected.imageset/flip_disapled-1.png differ
diff --git a/ios/Runner/Assets.xcassets/switchCameraButtonSelected.imageset/flip_disapled-2.png b/ios/Runner/Assets.xcassets/switchCameraButtonSelected.imageset/flip_disapled-2.png
new file mode 100755
index 00000000..5226029e
Binary files /dev/null and b/ios/Runner/Assets.xcassets/switchCameraButtonSelected.imageset/flip_disapled-2.png differ
diff --git a/ios/Runner/Assets.xcassets/switchCameraButtonSelected.imageset/flip_disapled.png b/ios/Runner/Assets.xcassets/switchCameraButtonSelected.imageset/flip_disapled.png
new file mode 100755
index 00000000..37e68084
Binary files /dev/null and b/ios/Runner/Assets.xcassets/switchCameraButtonSelected.imageset/flip_disapled.png differ
diff --git a/ios/Runner/Assets.xcassets/videoMuteButton.imageset/Contents.json b/ios/Runner/Assets.xcassets/videoMuteButton.imageset/Contents.json
new file mode 100755
index 00000000..14969431
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/videoMuteButton.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "video_enabled-2.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "video_enabled-1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "video_enabled.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/videoMuteButton.imageset/video_enabled-1.png b/ios/Runner/Assets.xcassets/videoMuteButton.imageset/video_enabled-1.png
new file mode 100755
index 00000000..0d9912ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/videoMuteButton.imageset/video_enabled-1.png differ
diff --git a/ios/Runner/Assets.xcassets/videoMuteButton.imageset/video_enabled-2.png b/ios/Runner/Assets.xcassets/videoMuteButton.imageset/video_enabled-2.png
new file mode 100755
index 00000000..8dc7b66d
Binary files /dev/null and b/ios/Runner/Assets.xcassets/videoMuteButton.imageset/video_enabled-2.png differ
diff --git a/ios/Runner/Assets.xcassets/videoMuteButton.imageset/video_enabled.png b/ios/Runner/Assets.xcassets/videoMuteButton.imageset/video_enabled.png
new file mode 100755
index 00000000..23331e30
Binary files /dev/null and b/ios/Runner/Assets.xcassets/videoMuteButton.imageset/video_enabled.png differ
diff --git a/ios/Runner/Assets.xcassets/videoMuteButtonSelected.imageset/Contents.json b/ios/Runner/Assets.xcassets/videoMuteButtonSelected.imageset/Contents.json
new file mode 100755
index 00000000..c68d9986
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/videoMuteButtonSelected.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "video_disanabled.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "video_disanabled-1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "video_disanabled-2.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/videoMuteButtonSelected.imageset/video_disanabled-1.png b/ios/Runner/Assets.xcassets/videoMuteButtonSelected.imageset/video_disanabled-1.png
new file mode 100755
index 00000000..cd0faff8
Binary files /dev/null and b/ios/Runner/Assets.xcassets/videoMuteButtonSelected.imageset/video_disanabled-1.png differ
diff --git a/ios/Runner/Assets.xcassets/videoMuteButtonSelected.imageset/video_disanabled-2.png b/ios/Runner/Assets.xcassets/videoMuteButtonSelected.imageset/video_disanabled-2.png
new file mode 100755
index 00000000..5c20c7bd
Binary files /dev/null and b/ios/Runner/Assets.xcassets/videoMuteButtonSelected.imageset/video_disanabled-2.png differ
diff --git a/ios/Runner/Assets.xcassets/videoMuteButtonSelected.imageset/video_disanabled.png b/ios/Runner/Assets.xcassets/videoMuteButtonSelected.imageset/video_disanabled.png
new file mode 100755
index 00000000..c89b763e
Binary files /dev/null and b/ios/Runner/Assets.xcassets/videoMuteButtonSelected.imageset/video_disanabled.png differ
diff --git a/ios/Runner/Assets.xcassets/videoMutedIndicator.imageset/Contents.json b/ios/Runner/Assets.xcassets/videoMutedIndicator.imageset/Contents.json
new file mode 100755
index 00000000..c029fd7a
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/videoMutedIndicator.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "cameraoff_mainVideo.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/ios/Runner/Assets.xcassets/videoMutedIndicator.imageset/cameraoff_mainVideo.png b/ios/Runner/Assets.xcassets/videoMutedIndicator.imageset/cameraoff_mainVideo.png
new file mode 100755
index 00000000..29fcf060
Binary files /dev/null and b/ios/Runner/Assets.xcassets/videoMutedIndicator.imageset/cameraoff_mainVideo.png differ
diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard
old mode 100644
new mode 100755
index f3c28516..95f4bd10
--- a/ios/Runner/Base.lproj/Main.storyboard
+++ b/ios/Runner/Base.lproj/Main.storyboard
@@ -1,8 +1,10 @@
-
-
+
+
+
-
+
+
@@ -14,13 +16,281 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 4c18587e..d0d77b5e 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -45,5 +45,12 @@
UIViewControllerBasedStatusBarAppearance
+
+ NSCameraUsageDescription
+ ${PRODUCT_NAME} always camera use
+
+ NSMicrophoneUsageDescription
+ ${PRODUCT_NAME} always Microphone use
+
diff --git a/lib/client/app_client.dart b/lib/client/app_client.dart
index 68c4fb8b..89b62722 100644
--- a/lib/client/app_client.dart
+++ b/lib/client/app_client.dart
@@ -4,15 +4,14 @@ import 'package:http/http.dart';
// OWNER : Ibrahim albitar
// DATE : 22-04-2020
-// DESCRIPTION : Custom App client to pin base url for all srvices
+// DESCRIPTION : Custom App client to pin base url for all srvices
class AppClient {
-
static Client client = HttpInterceptor().getClient();
- static Future post(dynamic path, {dynamic body}) async {
+ static Future post(dynamic path, {dynamic body}) async {
String _fullUrl = BASE_URL + path;
final response = await client.post(_fullUrl, body: body);
return response;
}
-}
\ No newline at end of file
+}
diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart
index edd8802f..3ca3d40a 100644
--- a/lib/client/base_app_client.dart
+++ b/lib/client/base_app_client.dart
@@ -59,10 +59,10 @@ class BaseAppClient {
body['stamp'] = STAMP;
body['IPAdress'] = IP_ADDRESS;
body['VersionID'] = VERSION_ID;
- body['Channel'] = CHANNEL;
+ if (body['Channel'] == null) body['Channel'] = CHANNEL;
body['SessionID'] = SESSION_ID;
body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP;
- body['PatientOutSA'] = PATIENT_OUT_SA;
+ body['PatientOutSA'] = 0; // PATIENT_OUT_SA;
print("URL : $url");
print("Body : ${json.encode(body)}");
diff --git a/lib/config/config.dart b/lib/config/config.dart
index ec656fe7..261fcd46 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -2,32 +2,56 @@ const MAX_SMALL_SCREEN = 660;
const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]";
-const BASE_URL = 'https://hmgwebservices.com/Services/';
-//const BASE_URL = 'https://uat.hmgwebservices.com/Services/';
-const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems_Region";
-const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList";
+//const BASE_URL = 'https://hmgwebservices.com/Services/';
+const BASE_URL = 'https://uat.hmgwebservices.com/';
+const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region";
+const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL =
- "DoctorApplication.svc/REST/GetProgressNoteForInPatient";
+ "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
const PATIENT_INSURANCE_APPROVALS_URL =
- "DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
+ "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient";
const PATIENT_ORDERS_URL =
- "DoctorApplication.svc/REST/GetProgressNoteForInPatient";
-const PATIENT_REFER_TO_DOCTOR_URL = "DoctorApplication.svc/REST/ReferToDoctor";
+ "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";
+const PATIENT_REFER_TO_DOCTOR_URL =
+ "Services/DoctorApplication.svc/REST/ReferToDoctor";
const PATIENT_GET_DOCTOR_BY_CLINIC_URL =
- "DoctorApplication.svc/REST/GetDoctorsByClinicID";
+ "Services/DoctorApplication.svc/REST/GetDoctorsByClinicID";
const PATIENT_GET_LIST_REFERAL_URL =
- "Lists.svc/REST/GetList_STPReferralFrequency";
+ "Services/Lists.svc/REST/GetList_STPReferralFrequency";
const PATIENT_GET_CLINIC_BY_PROJECT_URL =
- "DoctorApplication.svc/REST/GetClinicsByProjectID";
+ "Services/DoctorApplication.svc/REST/GetClinicsByProjectID";
-const GET_PROJECTS = 'Lists.svc/REST/GetProjectForDoctorAPP';
-const GET_PATIENT_VITAL_SIGN = 'Doctors.svc/REST/Doctor_GetPatientVitalSign';
+const GET_PROJECTS = 'Services/Lists.svc/REST/GetProjectForDoctorAPP';
+const GET_PATIENT_VITAL_SIGN =
+ 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign';
const GET_PATIENT_LAB_OREDERS =
- 'DoctorApplication.svc/REST/GetPatientLabOreders';
-const GET_PRESCRIPTION = 'Patients.svc/REST/GetPrescriptionApptList';
-const GET_RADIOLOGY = 'DoctorApplication.svc/REST/GetPatientRadResult';
+ 'Services/DoctorApplication.svc/REST/GetPatientLabOreders';
+const GET_PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
+const GET_RADIOLOGY = 'Services/DoctorApplication.svc/REST/GetPatientRadResult';
-const LIVE_CARE_STATISTICS_FOR_CERTAIN_DOCTOR_URL = "Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor";
+const GET_LIVECARE_PENDINGLIST =
+ 'Services/DoctorApplication.svc/REST/GetPendingPatientER';
+const START_LIVECARE_CALL = 'LiveCareApi/DoctorApp/CallPatient';
+const LIVE_CARE_STATISTICS_FOR_CERTAIN_DOCTOR_URL =
+ "Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor";
+
+const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/GetPrescriptionReport';
+
+const GT_MY_PATIENT_QUESTION = 'Services/DoctorApplication.svc/REST/GtMyPatientsQuestions';
+
+const GET_PATIENT = 'Services/DoctorApplication.svc/REST/';
+
+const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT= 'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient';
+
+const GET_MY_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferralPatient';
+
+const ADD_REFERRED_DOCTOR_REMARKS= 'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks';
+
+const GET_MY_REFERRED_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferredPatient';
+
+const GET_DOCTOR_WORKING_HOURS_TABLE = 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable';
+
+const GET_PATIENT_LAB_RESULTS= 'Services/DoctorApplication.svc/REST/GetPatientLabResults';
var selectedPatientType = 1;
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index 20ad3ca6..892d54fe 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -211,6 +211,7 @@ const Map> localizedValues = {
'en': 'You don\'t have any Orders',
'ar': 'لا يوجد لديك اي طلبات'
},
+ 'livecare': {'en': 'Live Care', 'ar': 'Live Care'},
'beingBad': {'en': 'being bad', 'ar': 'سيء'},
'beingGreat': {'en': 'being great', 'ar': 'راثع'},
};
diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart
index fc74bb99..bfd350f1 100644
--- a/lib/config/shared_pref_kay.dart
+++ b/lib/config/shared_pref_kay.dart
@@ -1,8 +1,9 @@
final TOKEN = 'token';
-final PROJECT_ID='projectID';
+final PROJECT_ID = 'projectID';
//===========amjad============
-final DOCTOR_ID='doctorID';
+final DOCTOR_ID = 'doctorID';
//=======================
-final SLECTED_PATIENT_TYPE='slectedPatientType';
+final SLECTED_PATIENT_TYPE = 'slectedPatientType';
final APP_Language = 'language';
-final DOCTOR_PROFILE = 'doctorProfile';
\ No newline at end of file
+final DOCTOR_PROFILE = 'doctorProfile';
+final LIVE_CARE_PATIENT = 'livecare-patient-profile';
diff --git a/lib/main.dart b/lib/main.dart
index d5f65406..0e51a148 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,3 +1,5 @@
+import 'package:doctor_app_flutter/providers/livecare_provider.dart';
+import 'package:doctor_app_flutter/providers/medicine_provider.dart';
import 'package:doctor_app_flutter/providers/project_provider.dart';
import 'package:doctor_app_flutter/providers/schedule_provider.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@@ -26,11 +28,22 @@ class MyApp extends StatelessWidget {
SizeConfig().init(constraints, orientation);
return MultiProvider(
providers: [
- ChangeNotifierProvider(create: (context) => PatientsProvider()),
- ChangeNotifierProvider(create: (context) => AuthProvider()),
- ChangeNotifierProvider(create: (context) => HospitalProvider()),
- ChangeNotifierProvider(create: (context) => ProjectProvider(),),
- ChangeNotifierProvider(create: (context) => ScheduleProvider(),)
+ ChangeNotifierProvider(
+ create: (context) => PatientsProvider()),
+ ChangeNotifierProvider(
+ create: (context) => AuthProvider()),
+ ChangeNotifierProvider(
+ create: (context) => HospitalProvider()),
+ ChangeNotifierProvider(
+ create: (context) => ProjectProvider(),
+ ),
+ ChangeNotifierProvider(
+ create: (context) => ScheduleProvider(),
+ ),
+ ChangeNotifierProvider(
+ create: (context) => LiveCareProvider(),
+ ),
+ ChangeNotifierProvider(create: (context) => MedicineProvider(),),
],
child: Consumer(
builder: (context,projectProvider,child) => MaterialApp(
diff --git a/lib/models/livecare/get_panding_req_list.dart b/lib/models/livecare/get_panding_req_list.dart
new file mode 100644
index 00000000..719b9134
--- /dev/null
+++ b/lib/models/livecare/get_panding_req_list.dart
@@ -0,0 +1,49 @@
+class LiveCarePendingListRequest {
+ PatientData patientData;
+ int doctorID;
+ String sErServiceID;
+ int projectID;
+ int sourceID;
+
+ LiveCarePendingListRequest(
+ {this.patientData,
+ this.doctorID,
+ this.sErServiceID,
+ this.projectID,
+ this.sourceID});
+
+ LiveCarePendingListRequest.fromJson(Map json) {
+ patientData = new PatientData.fromJson(json['PatientData']);
+
+ doctorID = json['DoctorID'];
+ sErServiceID = json['SErServiceID'];
+ projectID = json['ProjectID'];
+ sourceID = json['SourceID'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['PatientData'] = this.patientData.toJson();
+ data['DoctorID'] = this.doctorID;
+ data['SErServiceID'] = this.sErServiceID;
+ data['ProjectID'] = this.projectID;
+ data['SourceID'] = this.sourceID;
+ return data;
+ }
+}
+
+class PatientData {
+ bool isOutKSA;
+
+ PatientData({this.isOutKSA});
+
+ PatientData.fromJson(Map json) {
+ isOutKSA = json['IsOutKSA'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['IsOutKSA'] = this.isOutKSA;
+ return data;
+ }
+}
diff --git a/lib/models/livecare/get_pending_res_list.dart b/lib/models/livecare/get_pending_res_list.dart
new file mode 100644
index 00000000..22839f91
--- /dev/null
+++ b/lib/models/livecare/get_pending_res_list.dart
@@ -0,0 +1,168 @@
+class LiveCarePendingListResponse {
+ Null acceptedBy;
+ Null acceptedOn;
+ int age;
+ Null appointmentNo;
+ String arrivalTime;
+ String arrivalTimeD;
+ int callStatus;
+ String clientRequestID;
+ String clinicName;
+ Null consoltationEnd;
+ Null consultationNotes;
+ Null createdOn;
+ String dateOfBirth;
+ String deviceToken;
+ String deviceType;
+ Null doctorName;
+ String editOn;
+ String gender;
+ bool isFollowUP;
+ Null isFromVida;
+ int isLoginB;
+ bool isOutKSA;
+ int isRejected;
+ String language;
+ double latitude;
+ double longitude;
+ String mobileNumber;
+ Null openSession;
+ Null openTokenID;
+ String patientID;
+ String patientName;
+ int patientStatus;
+ String preferredLanguage;
+ int projectID;
+ int scoring;
+ int serviceID;
+ Null tokenID;
+ int vCID;
+ String voipToken;
+
+ LiveCarePendingListResponse(
+ {this.acceptedBy,
+ this.acceptedOn,
+ this.age,
+ this.appointmentNo,
+ this.arrivalTime,
+ this.arrivalTimeD,
+ this.callStatus,
+ this.clientRequestID,
+ this.clinicName,
+ this.consoltationEnd,
+ this.consultationNotes,
+ this.createdOn,
+ this.dateOfBirth,
+ this.deviceToken,
+ this.deviceType,
+ this.doctorName,
+ this.editOn,
+ this.gender,
+ this.isFollowUP,
+ this.isFromVida,
+ this.isLoginB,
+ this.isOutKSA,
+ this.isRejected,
+ this.language,
+ this.latitude,
+ this.longitude,
+ this.mobileNumber,
+ this.openSession,
+ this.openTokenID,
+ this.patientID,
+ this.patientName,
+ this.patientStatus,
+ this.preferredLanguage,
+ this.projectID,
+ this.scoring,
+ this.serviceID,
+ this.tokenID,
+ this.vCID,
+ this.voipToken});
+
+ LiveCarePendingListResponse.fromJson(Map json) {
+ acceptedBy = json['AcceptedBy'];
+ acceptedOn = json['AcceptedOn'];
+ age = json['Age'];
+ appointmentNo = json['AppointmentNo'];
+ arrivalTime = json['ArrivalTime'];
+ arrivalTimeD = json['ArrivalTimeD'];
+ callStatus = json['CallStatus'];
+ clientRequestID = json['ClientRequestID'];
+ clinicName = json['ClinicName'];
+ consoltationEnd = json['ConsoltationEnd'];
+ consultationNotes = json['ConsultationNotes'];
+ createdOn = json['CreatedOn'];
+ dateOfBirth = json['DateOfBirth'];
+ deviceToken = json['DeviceToken'];
+ deviceType = json['DeviceType'];
+ doctorName = json['DoctorName'];
+ editOn = json['EditOn'];
+ gender = json['Gender'];
+ isFollowUP = json['IsFollowUP'];
+ isFromVida = json['IsFromVida'];
+ isLoginB = json['IsLoginB'];
+ isOutKSA = json['IsOutKSA'];
+ isRejected = json['IsRejected'];
+ language = json['Language'];
+ latitude = json['Latitude'];
+ longitude = json['Longitude'];
+ mobileNumber = json['MobileNumber'];
+ openSession = json['OpenSession'];
+ openTokenID = json['OpenTokenID'];
+ patientID = json['PatientID'];
+ patientName = json['PatientName'];
+ patientStatus = json['PatientStatus'];
+ preferredLanguage = json['PreferredLanguage'];
+ projectID = json['ProjectID'];
+ scoring = json['Scoring'];
+ serviceID = json['ServiceID'];
+ tokenID = json['TokenID'];
+ vCID = json['VC_ID'];
+ voipToken = json['VoipToken'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['AcceptedBy'] = this.acceptedBy;
+ data['AcceptedOn'] = this.acceptedOn;
+ data['Age'] = this.age;
+ data['AppointmentNo'] = this.appointmentNo;
+ data['ArrivalTime'] = this.arrivalTime;
+ data['ArrivalTimeD'] = this.arrivalTimeD;
+ data['CallStatus'] = this.callStatus;
+ data['ClientRequestID'] = this.clientRequestID;
+ data['ClinicName'] = this.clinicName;
+ data['ConsoltationEnd'] = this.consoltationEnd;
+ data['ConsultationNotes'] = this.consultationNotes;
+ data['CreatedOn'] = this.createdOn;
+ data['DateOfBirth'] = this.dateOfBirth;
+ data['DeviceToken'] = this.deviceToken;
+ data['DeviceType'] = this.deviceType;
+ data['DoctorName'] = this.doctorName;
+ data['EditOn'] = this.editOn;
+ data['Gender'] = this.gender;
+ data['IsFollowUP'] = this.isFollowUP;
+ data['IsFromVida'] = this.isFromVida;
+ data['IsLoginB'] = this.isLoginB;
+ data['IsOutKSA'] = this.isOutKSA;
+ data['IsRejected'] = this.isRejected;
+ data['Language'] = this.language;
+ data['Latitude'] = this.latitude;
+ data['Longitude'] = this.longitude;
+ data['MobileNumber'] = this.mobileNumber;
+ data['OpenSession'] = this.openSession;
+ data['OpenTokenID'] = this.openTokenID;
+ data['PatientID'] = this.patientID;
+ data['PatientName'] = this.patientName;
+ data['PatientStatus'] = this.patientStatus;
+ data['PreferredLanguage'] = this.preferredLanguage;
+ data['ProjectID'] = this.projectID;
+ data['Scoring'] = this.scoring;
+ data['ServiceID'] = this.serviceID;
+ data['TokenID'] = this.tokenID;
+ data['VC_ID'] = this.vCID;
+ data['VoipToken'] = this.voipToken;
+ return data;
+ }
+}
diff --git a/lib/models/livecare/start_call_req.dart b/lib/models/livecare/start_call_req.dart
new file mode 100644
index 00000000..1ad04480
--- /dev/null
+++ b/lib/models/livecare/start_call_req.dart
@@ -0,0 +1,56 @@
+class StartCallReq {
+ int vCID;
+ bool isrecall;
+ String tokenID;
+ String generalid;
+ int doctorId;
+ bool isOutKsa;
+ String projectName;
+ String docotrName;
+ String clincName;
+ String docSpec;
+ int clinicId;
+
+ StartCallReq(
+ {this.vCID,
+ this.isrecall,
+ this.tokenID,
+ this.generalid,
+ this.doctorId,
+ this.isOutKsa,
+ this.projectName,
+ this.docotrName,
+ this.clincName,
+ this.docSpec,
+ this.clinicId});
+
+ StartCallReq.fromJson(Map json) {
+ vCID = json['VC_ID'];
+ isrecall = json['isrecall'];
+ tokenID = json['TokenID'];
+ generalid = json['generalid'];
+ doctorId = json['DoctorId'];
+ isOutKsa = json['IsOutKsa'];
+ projectName = json['projectName'];
+ docotrName = json['DocotrName'];
+ clincName = json['clincName'];
+ docSpec = json['Doc_Spec'];
+ clinicId = json['ClinicId'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['VC_ID'] = this.vCID;
+ data['isrecall'] = this.isrecall;
+ data['TokenID'] = this.tokenID;
+ data['generalid'] = this.generalid;
+ data['DoctorId'] = this.doctorId;
+ data['IsOutKsa'] = this.isOutKsa;
+ data['projectName'] = this.projectName;
+ data['DocotrName'] = this.docotrName;
+ data['clincName'] = this.clincName;
+ data['Doc_Spec'] = this.docSpec;
+ data['ClinicId'] = this.clinicId;
+ return data;
+ }
+}
diff --git a/lib/providers/auth_provider.dart b/lib/providers/auth_provider.dart
index 22bd80f6..61a61530 100644
--- a/lib/providers/auth_provider.dart
+++ b/lib/providers/auth_provider.dart
@@ -6,17 +6,18 @@ import 'package:flutter/cupertino.dart';
import '../models/doctor/user_model.dart';
-const LOGIN_URL = 'Sentry.svc/REST/MemberLogIN_New';
-const INSERT_DEVICE_IMEI = 'Sentry.svc/REST/DoctorApplication_INSERTDeviceIMEI';
+const LOGIN_URL = 'Services/Sentry.svc/REST/MemberLogIN_New';
+const INSERT_DEVICE_IMEI =
+ 'Services/Sentry.svc/REST/DoctorApplication_INSERTDeviceIMEI';
const SELECT_DEVICE_IMEI =
- 'Sentry.svc/REST/DoctorApplication_SELECTDeviceIMEIbyIMEI';
+ 'Services/Sentry.svc/REST/DoctorApplication_SELECTDeviceIMEIbyIMEI';
const SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE =
- 'Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType';
+ 'Services/Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType';
const MEMBER_CHECK_ACTIVATION_CODE_NEW =
- 'Sentry.svc/REST/MemberCheckActivationCode_New';
-const GET_DOC_PROFILES = 'Doctors.svc/REST/GetDocProfiles';
+ 'Services/Sentry.svc/REST/MemberCheckActivationCode_New';
+const GET_DOC_PROFILES = 'Services/Doctors.svc/REST/GetDocProfiles';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED }
@@ -137,7 +138,7 @@ class AuthProvider with ChangeNotifier {
localRes = response;
selectedClinicName =
ClinicModel.fromJson(response['List_DoctorsClinic'][0]).clinicName;
- notifyListeners();
+ notifyListeners();
response['List_DoctorsClinic'].forEach((v) {
doctorsClinicList.add(new ClinicModel.fromJson(v));
});
@@ -166,10 +167,10 @@ class AuthProvider with ChangeNotifier {
localRes = response;
//ClinicDescription
selectedClinicName = response['DoctorProfileList'][0]['ClinicDescription'];
- notifyListeners();
}, onFailure: (String error, int statusCode) {
throw error;
}, body: docInfo);
+ notifyListeners();
return Future.value(localRes);
} catch (error) {
print(error);
diff --git a/lib/providers/doctor_reply_provider.dart b/lib/providers/doctor_reply_provider.dart
index bc5e401c..e254988d 100644
--- a/lib/providers/doctor_reply_provider.dart
+++ b/lib/providers/doctor_reply_provider.dart
@@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/client/base_app_client.dart';
+import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/doctor/request_doctor_reply.dart';
import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart';
import 'package:flutter/cupertino.dart';
@@ -17,8 +18,7 @@ class DoctorReplyProvider with ChangeNotifier {
getDoctorReply() async {
try {
- await BaseAppClient.post(
- 'DoctorApplication.svc/REST/GtMyPatientsQuestions',
+ await BaseAppClient.post(GT_MY_PATIENT_QUESTION,
body: _requestDoctorReply.toJson(),
onSuccess: (dynamic response, int statusCode) {
response['List_GtMyPatientsQuestions'].forEach((v) {
diff --git a/lib/providers/livecare_provider.dart b/lib/providers/livecare_provider.dart
new file mode 100644
index 00000000..31c012f8
--- /dev/null
+++ b/lib/providers/livecare_provider.dart
@@ -0,0 +1,78 @@
+import 'dart:convert';
+
+import 'package:doctor_app_flutter/client/base_app_client.dart';
+import 'package:doctor_app_flutter/config/config.dart';
+import 'package:doctor_app_flutter/models/livecare/get_panding_req_list.dart';
+import 'package:doctor_app_flutter/models/livecare/start_call_req.dart';
+import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
+import 'package:doctor_app_flutter/util/helpers.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
+
+class LiveCareProvider with ChangeNotifier {
+ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
+
+ var liveCarePendingList = [];
+ var inCallResponse = {};
+ bool isFinished = true;
+ bool hasError = false;
+ String errorMsg = '';
+
+ LiveCarePendingListRequest _pendingRequestModel =
+ LiveCarePendingListRequest();
+
+ Future getpendingList() async {
+ var profile = await sharedPref.getObj(DOCTOR_PROFILE);
+ _pendingRequestModel.projectID = await sharedPref.getInt(PROJECT_ID);
+ _pendingRequestModel.doctorID = profile['DoctorID'];
+ _pendingRequestModel.sErServiceID = "1,3";
+ _pendingRequestModel.sourceID = 1;
+ _pendingRequestModel.patientData = PatientData(isOutKSA: false);
+ resetDefaultValues();
+ // dynamic localRes;
+ await BaseAppClient.post(GET_LIVECARE_PENDINGLIST,
+ onSuccess: (response, statusCode) async {
+ isFinished = true;
+ liveCarePendingList = response["List_PendingPatientList"];
+ }, onFailure: (String error, int statusCode) {
+ isFinished = true;
+ throw error;
+ }, body: _pendingRequestModel.toJson());
+ return Future.value(liveCarePendingList);
+ }
+
+ Future