F
F
foonfyrick2021-05-03 08:25:52
Android
foonfyrick, 2021-05-03 08:25:52

Is the webview constantly updated?

I have this code:

val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://id.twitch.tv/oauth2/authorize?client_id=id&scope=scope&redirect_uri=uri&response_type=typen"))
startActivity(intent)

A screen opens in which there is a choice through which to open the link, through the app or web view browser. I always set it through the app, and the browser string is constantly updated
608f882a0c1a4922734678.png
. I always receive a different access_token, and every second the browser string changes, it turns out that I receive a token and immediately send it via api to confirm authorization, and again I receive a new token. I need that after the first opening of the browser, as soon as I receive the browser line, I immediately exit it to the main screen of the application.

<activity android:name=".ui.activities.MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />

            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>

                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>

                <data
                    android:host="localhost"
                    android:scheme="http"/>
            </intent-filter>
        </activity>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question