© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago
Tiger

MAUI Webview target=_blank href redirects not working on android

I have an MAUI app that is essentially a
WebView
WebView
that hosts a wordpress website.
My problem is that whenever I try to load an external link it will simply not load the "href" redirect... It works fine on Windows and iOS devices, but not in android.

EDIT: The href is a "_blank" target.

Is there a specific permission I need in the manifest?

In case it helps, here is the code for the page:
<?xml version="1.0" encoding="utf-8" ?>

    <Grid BackgroundColor="DarkSlateGrey">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackLayout Grid.Row="0" Grid.Column="0" 
                         Spacing="5" Orientation="Horizontal" Padding="8">
            <Button Text="Go Back" TextColor="DarkSlateGray" BackgroundColor="White"/>
            <Button Text="Change Language" x:Name="ChangeLangBtn" TextColor="DarkSlateGray" BackgroundColor="White"/>
        </StackLayout>
        <WebView Grid.Row="1" Grid.Column="0" 
                     Source="https://example.com"
                     x:Name="WebView"/>
    </Grid>
<?xml version="1.0" encoding="utf-8" ?>

    <Grid BackgroundColor="DarkSlateGrey">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackLayout Grid.Row="0" Grid.Column="0" 
                         Spacing="5" Orientation="Horizontal" Padding="8">
            <Button Text="Go Back" TextColor="DarkSlateGray" BackgroundColor="White"/>
            <Button Text="Change Language" x:Name="ChangeLangBtn" TextColor="DarkSlateGray" BackgroundColor="White"/>
        </StackLayout>
        <WebView Grid.Row="1" Grid.Column="0" 
                     Source="https://example.com"
                     x:Name="WebView"/>
    </Grid>

And here is the manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="2" android:versionName="2">
    <application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true" android:label="MYAPPNAME"></application>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" />
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="2" android:versionName="2">
    <application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true" android:label="MYAPPNAME"></application>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" />
</manifest>
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

.NET MAUI Android Licenses
C#CC# / help
16mo ago
❔ .NET MAUI Android Filesystem
C#CC# / help
3y ago
Loading shared library on Android Maui fails
C#CC# / help
2y ago
Working with platforms on MAUI
C#CC# / help
3y ago