From bd2c1c56cc6f23ddbd437617dcbfc5ec13091a09 Mon Sep 17 00:00:00 2001 From: Jaeseong Seo <07js23@gmail.com> Date: Fri, 10 Jan 2025 13:34:14 +0900 Subject: [PATCH] chore: add a method for debug --- pagecall/src/main/java/com/pagecall/PagecallWebView.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pagecall/src/main/java/com/pagecall/PagecallWebView.java b/pagecall/src/main/java/com/pagecall/PagecallWebView.java index c967405..8c6dc71 100644 --- a/pagecall/src/main/java/com/pagecall/PagecallWebView.java +++ b/pagecall/src/main/java/com/pagecall/PagecallWebView.java @@ -199,6 +199,11 @@ public void loadDataWithBaseURL(@Nullable String baseUrl, @NonNull String data, private PagecallWebChromeClient webChromeClient; + private void sendChatForDebug(String message) { + String escapedMessage = message.replace("'", "\\'"); + this.evaluateJavascriptWithLog("Pagecall.chat.sendMessage('" + escapedMessage + "');"); + } + private void updateCommunicationDevice() { AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); List devices = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S ? audioManager.getAvailableCommunicationDevices() : Arrays.asList(audioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS));