| 
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -20,6 +20,7 @@ import io.flutter.plugins.GeneratedPluginRegistrant
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler, VideoCallResponseListener {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    private val CHANNEL = "Dr.cloudSolution/videoCall"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    private lateinit var methodChannel: MethodChannel
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    private var result: MethodChannel.Result? = null
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    private var call: MethodCall? = null
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    private val LAUNCH_VIDEO: Int = 1
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -29,15 +30,10 @@ class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    override fun configureFlutterEngine(@NonNull flutterEngine: 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) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        this.result = result
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -154,7 +150,6 @@ class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        } else if (resultCode == Activity.RESULT_CANCELED) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            val callResponse: HashMap<String, String> = HashMap()
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            callResponse["callResponse"] = "CallEnd"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            result?.success(callResponse)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -164,5 +159,12 @@ class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				//        Toast.makeText(this, message, Toast.LENGTH_LONG).show()
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    override fun minimizeVideoEvent(isMinimize: Boolean) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        if (isMinimize)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            methodChannel.invokeMethod("onCallConnected", null)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        else
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            methodChannel.invokeMethod("onCallDisconnected", null)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				}
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
			
			 | 
			 | 
			
				
 
 |