Colleagues, good day.

I can not find specific information on the Internet, how can I launch another application from my application? For example the same WhatsApp or Viber ?

What needs to be written in XAML or * .cs file?

Banal code in XAML

<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:Spravochnik" x:Class="Spravochnik.MainPage"> <StackLayout> <Button x:Name="openMessage" Text="open WhatsApp" Clicked="openMessage_Clicked"/> </StackLayout> </ContentPage> 

    1 answer 1

    You are interested in working with the native API. In Xamarin, this is done via the DependencyService . After creating the interface describing the discovery of WhatsApp, its implementation on Android rolls into the banal Intent call. Accordingly, you look at the Java code and implement it by actively using Namespace Resolve in Visual Studio. In modern studios there is still a light bulb in the context menu ...

    namespace-resolve

    I have a repository on GitHub where, by the same principle, I implement getting the last location. Perhaps the source code of this solution come in handy.

    • Thank you) I will study) - Denis