C
C#5mo ago
eduardoA

JavaScript button - deep linking

I cant create a Button with a link I have a very big problem, I am trying to open a Maui app with a link
https://demy-ia.daily.co/frfe
https://demy-ia.daily.co/frfe
I have a method to send emails with links
return $@"
<html>
<head>
</head>
<body>
<p>Here are the meeting details:</p>
<br> <!-- Add a line break -->
<p><strong>Meeting Name:</strong> {roomName}</p>
<p><strong>Teacher Name:</strong> {userName}</p>
<p>Click the button below to join the meeting:</p>
<p><a class='button' href='{meetingLink}'>Join</a></p>
</body>
</html>";
return $@"
<html>
<head>
</head>
<body>
<p>Here are the meeting details:</p>
<br> <!-- Add a line break -->
<p><strong>Meeting Name:</strong> {roomName}</p>
<p><strong>Teacher Name:</strong> {userName}</p>
<p>Click the button below to join the meeting:</p>
<p><a class='button' href='{meetingLink}'>Join</a></p>
</body>
</html>";
if(DeviceInfo.Platform == DevicePlatform.WinUI) {
string protocol = "demy-ia";
meetingLink = $"{protocol}://{roomName}";
} else {
meetingLink = $"{Constants.BASETTING_URL}{roomName}";
}

var body = GenerateHttmlTemplate(roomName, meetingLink, user!.Name, dateTimeMeeting);

...
if(DeviceInfo.Platform == DevicePlatform.WinUI) {
string protocol = "demy-ia";
meetingLink = $"{protocol}://{roomName}";
} else {
meetingLink = $"{Constants.BASETTING_URL}{roomName}";
}

var body = GenerateHttmlTemplate(roomName, meetingLink, user!.Name, dateTimeMeeting);

...
and this will send me a button link however, for Windows is very different after reading this (https://learn.microsoft.com/en-us/windows/uwp/launch-resume/handle-uri-activation) I found out that I should register
<uap:Protocol Name="demy-ia">
<uap:DisplayName>demy-ia</uap:DisplayName>
</uap:Protocol>
<uap:Protocol Name="demy-ia">
<uap:DisplayName>demy-ia</uap:DisplayName>
</uap:Protocol>
and to be able to open my app, I need to format my invitation
demy-ia://dew
demy-ia://dew
but because this is not a URL, the button doesn't appear
Handle URI activation - UWP applications
Learn how to register an app to become the default handler for a Uniform Resource Identifier (URI) scheme name.
No description
No description
1 Reply
eduardoA
eduardoA5mo ago
the button work for Android and Ios, but I am trying to make the link work on Windows