G
G
gleb shtraus2020-07-31 20:43:16
Android
gleb shtraus, 2020-07-31 20:43:16

How to redirect to a site in xamarin when launching an application?

I don’t really understand how, during the normal launch of the application, it was transferred to the site through the default browser.
Through the button it's easy, but if you don't understand right away.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Korotenko, 2020-07-31
@firedragon

I didn't understand the same. But apparently somewhere in the main screen

await Share.RequestAsync(new ShareTextRequest
            {
                Uri = uri,
                Text = Resource.ShareSocialShareBody,
                Title = Resource.ShareSocialShareTitle
            });

B
BrianGalaxy, 2020-07-31
@BrianGalaxy

Hmmmmm if it helps, then in WinForms you can immediately through Form1_Load, it works immediately upon loading.
Perhaps here on the same principle.

G
gleb shtraus, 2020-08-02
@erzik

Is it possible to do it through webview?

<ContentPage.Content>
        <StackLayout>
            <Label Text="" IsVisible="False" x:Name="labelLoading"/>
            <WebView x:Name="webView" WidthRequest="1000" HeightRequest="1000"/>
        </StackLayout>
    </ContentPage.Content>

in MainPage.xaml.cs
public MainPage()
        {
 InitializeComponent();
webView.sources="google.com";
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question