1

I've been working in the development of a webapp that uses Solid to store information of the users such as the list of friends. In order to authenticate into the app, we are using the @solid/react library that generates a popup in which you can login and continue to use the app. That works perfectly. The problem appeared when we decided to make an android app with a webview that would reflect the webapp. At first, the webview wouldn't open the popup, so I decided to try something like this:

``` 
myWebView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {

                view.loadUrl(url);

                return true;
            }
        });
´´´

With that, I achieved to open the popup in the webview, but it would appear this error as it would lose connection to the app: solid.github.io can't open the app

I thought the problem was caused due to the webview now showingthe popup instead of the webapp caused the lost connection, so I tried openning the popup in a browser but the same problem happened:

``` 
myWebView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {

                Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                startActivity(browserIntent);

                return true;
            }
        });
´´´

solid.github.io can't open the app through browser

After trying several libraries that manage popups, I can't find any solutions. Can anyone help?

llomba
  • 11
  • 2
  • Unfortunately I don't have an answer, but if people with more experience with Android's webview see this question, it might be good to know that the mentioned library tries to communicate between the popup and the website that opened up via `window.addEventListener`, specifically using this code: https://github.com/solid/solid-auth-client/blob/main/src/ipc.js Presumably, that communication doesn't work so well in Android. – Vincent May 03 '21 at 11:00

0 Answers0