| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -20,6 +20,7 @@ import io.flutter.plugins.GeneratedPluginRegistrant
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler, VideoCallResponseListener {
 | 
					 | 
					 | 
					 | 
					class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler, VideoCallResponseListener {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    private val CHANNEL = "Dr.cloudSolution/videoCall"
 | 
					 | 
					 | 
					 | 
					    private val CHANNEL = "Dr.cloudSolution/videoCall"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    private lateinit var methodChannel: MethodChannel
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    private var result: MethodChannel.Result? = null
 | 
					 | 
					 | 
					 | 
					    private var result: MethodChannel.Result? = null
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    private var call: MethodCall? = null
 | 
					 | 
					 | 
					 | 
					    private var call: MethodCall? = null
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    private val LAUNCH_VIDEO: Int = 1
 | 
					 | 
					 | 
					 | 
					    private val LAUNCH_VIDEO: Int = 1
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -29,15 +30,10 @@ class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
 | 
					 | 
					 | 
					 | 
					    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        GeneratedPluginRegistrant.registerWith(flutterEngine)
 | 
					 | 
					 | 
					 | 
					        GeneratedPluginRegistrant.registerWith(flutterEngine)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL).setMethodCallHandler(this)
 | 
					 | 
					 | 
					 | 
					        methodChannel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        methodChannel.setMethodCallHandler(this)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    override fun onCreate(savedInstanceState: Bundle?) {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        super.onCreate(savedInstanceState)
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
 | 
					 | 
					 | 
					 | 
					    override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.result = result
 | 
					 | 
					 | 
					 | 
					        this.result = result
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -67,7 +63,7 @@ class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            "closeVideoCall" -> {
 | 
					 | 
					 | 
					 | 
					            "closeVideoCall" -> {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                dialogFragment?.onCallClicked()
 | 
					 | 
					 | 
					 | 
					                dialogFragment?.onCallClicked()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            "onCallConnected"->{
 | 
					 | 
					 | 
					 | 
					            "onCallConnected" -> {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            else -> {
 | 
					 | 
					 | 
					 | 
					            else -> {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -87,7 +83,7 @@ class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//        intent.putExtra("sessionStatusModel", sessionStatusModel)
 | 
					 | 
					 | 
					 | 
					//        intent.putExtra("sessionStatusModel", sessionStatusModel)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//        startActivityForResult(intent, LAUNCH_VIDEO)
 | 
					 | 
					 | 
					 | 
					//        startActivityForResult(intent, LAUNCH_VIDEO)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (dialogFragment == null){
 | 
					 | 
					 | 
					 | 
					        if (dialogFragment == null) {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            val arguments = Bundle()
 | 
					 | 
					 | 
					 | 
					            val arguments = Bundle()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            arguments.putString("apiKey", apiKey)
 | 
					 | 
					 | 
					 | 
					            arguments.putString("apiKey", apiKey)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            arguments.putString("sessionId", sessionId)
 | 
					 | 
					 | 
					 | 
					            arguments.putString("sessionId", sessionId)
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -103,47 +99,47 @@ class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                it.isCancelable = true
 | 
					 | 
					 | 
					 | 
					                it.isCancelable = true
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                it.show(transaction, "dialog")
 | 
					 | 
					 | 
					 | 
					                it.show(transaction, "dialog")
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } else if (!dialogFragment!!.isVisible){
 | 
					 | 
					 | 
					 | 
					        } else if (!dialogFragment!!.isVisible) {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            val transaction = supportFragmentManager.beginTransaction()
 | 
					 | 
					 | 
					 | 
					            val transaction = supportFragmentManager.beginTransaction()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            dialogFragment!!.show(transaction, "dialog")
 | 
					 | 
					 | 
					 | 
					            dialogFragment!!.show(transaction, "dialog")
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					   /* override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
 | 
					 | 
					 | 
					 | 
					    /* override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        super.onActivityResult(requestCode, resultCode, data)
 | 
					 | 
					 | 
					 | 
					         super.onActivityResult(requestCode, resultCode, data)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        var asd = "";
 | 
					 | 
					 | 
					 | 
					         var asd = "";
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (requestCode == LAUNCH_VIDEO) {
 | 
					 | 
					 | 
					 | 
					         if (requestCode == LAUNCH_VIDEO) {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (resultCode == Activity.RESULT_OK) {
 | 
					 | 
					 | 
					 | 
					             if (resultCode == Activity.RESULT_OK) {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                val result  : SessionStatusModel? = data?.getParcelableExtra("sessionStatusNotRespond")
 | 
					 | 
					 | 
					 | 
					                 val result  : SessionStatusModel? = data?.getParcelableExtra("sessionStatusNotRespond")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                val callResponse : HashMap<String, String> = HashMap()
 | 
					 | 
					 | 
					 | 
					                 val callResponse : HashMap<String, String> = HashMap()
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                val sessionStatus : HashMap<String, String> = HashMap()
 | 
					 | 
					 | 
					 | 
					                 val sessionStatus : HashMap<String, String> = HashMap()
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                val gson = GsonBuilder().serializeNulls().create()
 | 
					 | 
					 | 
					 | 
					                 val gson = GsonBuilder().serializeNulls().create()
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                callResponse["callResponse"] = "CallNotRespond"
 | 
					 | 
					 | 
					 | 
					                 callResponse["callResponse"] = "CallNotRespond"
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                val jsonRes = gson.toJson(result)
 | 
					 | 
					 | 
					 | 
					                 val jsonRes = gson.toJson(result)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                callResponse["sessionStatus"] = jsonRes
 | 
					 | 
					 | 
					 | 
					                 callResponse["sessionStatus"] = jsonRes
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                this.result?.success(callResponse)
 | 
					 | 
					 | 
					 | 
					                 this.result?.success(callResponse)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					             }
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (resultCode == Activity.RESULT_CANCELED) {
 | 
					 | 
					 | 
					 | 
					             if (resultCode == Activity.RESULT_CANCELED) {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                val callResponse : HashMap<String, String> = HashMap()
 | 
					 | 
					 | 
					 | 
					                 val callResponse : HashMap<String, String> = HashMap()
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                callResponse["callResponse"] = "CallEnd"
 | 
					 | 
					 | 
					 | 
					                 callResponse["callResponse"] = "CallEnd"
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                result?.success(callResponse)
 | 
					 | 
					 | 
					 | 
					                 result?.success(callResponse)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					             }
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					         }
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }*/
 | 
					 | 
					 | 
					 | 
					     }*/
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    override fun onCallFinished(resultCode: Int, intent: Intent?) {
 | 
					 | 
					 | 
					 | 
					    override fun onCallFinished(resultCode: Int, intent: Intent?) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        dialogFragment = null
 | 
					 | 
					 | 
					 | 
					        dialogFragment = null
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (resultCode == Activity.RESULT_OK) {
 | 
					 | 
					 | 
					 | 
					        if (resultCode == Activity.RESULT_OK) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            val result  : SessionStatusModel? = intent?.getParcelableExtra("sessionStatusNotRespond")
 | 
					 | 
					 | 
					 | 
					            val result: SessionStatusModel? = intent?.getParcelableExtra("sessionStatusNotRespond")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            val callResponse : HashMap<String, String> = HashMap()
 | 
					 | 
					 | 
					 | 
					            val callResponse: HashMap<String, String> = HashMap()
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            val sessionStatus : HashMap<String, String> = HashMap()
 | 
					 | 
					 | 
					 | 
					            val sessionStatus: HashMap<String, String> = HashMap()
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            val gson = GsonBuilder().serializeNulls().create()
 | 
					 | 
					 | 
					 | 
					            val gson = GsonBuilder().serializeNulls().create()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            callResponse["callResponse"] = "CallNotRespond"
 | 
					 | 
					 | 
					 | 
					            callResponse["callResponse"] = "CallNotRespond"
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -152,9 +148,8 @@ class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            this.result?.success(callResponse)
 | 
					 | 
					 | 
					 | 
					            this.result?.success(callResponse)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } else if (resultCode == Activity.RESULT_CANCELED) {
 | 
					 | 
					 | 
					 | 
					        } else if (resultCode == Activity.RESULT_CANCELED) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            val callResponse : HashMap<String, String> = HashMap()
 | 
					 | 
					 | 
					 | 
					            val callResponse: HashMap<String, String> = HashMap()
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            callResponse["callResponse"] = "CallEnd"
 | 
					 | 
					 | 
					 | 
					            callResponse["callResponse"] = "CallEnd"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            result?.success(callResponse)
 | 
					 | 
					 | 
					 | 
					            result?.success(callResponse)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        }
 | 
					 | 
					 | 
					 | 
					        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					    }
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -164,5 +159,12 @@ class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//        Toast.makeText(this, message, Toast.LENGTH_LONG).show()
 | 
					 | 
					 | 
					 | 
					//        Toast.makeText(this, message, Toast.LENGTH_LONG).show()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    override fun minimizeVideoEvent(isMinimize: Boolean) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (isMinimize)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            methodChannel.invokeMethod("onCallConnected", null)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        else
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            methodChannel.invokeMethod("onCallDisconnected", null)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					 | 
					
 
 |