MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
281 stars 502 forks source link

Android Teams app cannot navigate to application tab deep link #5278

Open nbelyh opened 2 years ago

nbelyh commented 2 years ago

I am building a link to my tab using deep links: https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/deep-links#generate-a-deep-link-to-your-tab

My link looks like this: https://teams.microsoft.com/l/entity/${appId}/${entityId}?context=${encodedContext}

The link works (when executed, application "opens" the same tab) in desktop client, Web, iOS, but does not work on android. Instead of navigating to the tab, it navigates to the channel.

I have a fully-functional, minimal application to reproduce the issue here: https://github.com/nbelyh/teams-android-entity-id

There is the manifest file, and two app files (config.html + content.html) The code of the tab goes like this:

microsoftTeams.initialize();
microsoftTeams.getContext(teamsContext => {
  document.getElementById("clickme").addEventListener("click", () => {

    var encodedContext = encodeURI(`{"channelId": "${teamsContext.channelId}"}`);
    var appId = '<my app id here>';
    var entityId = teamsContext.entityId;
    var url = `https://teams.microsoft.com/l/entity/${appId}/${entityId}?context=${encodedContext}`;

    microsoftTeams.executeDeepLink(url);
  });
});
microsoftTeams.appInitialization.notifySuccess();

Basically, it is a minimalistic teams tab application that builds a deep link to navigate to itself. And when the user clicks the button, executes the link.

ghost commented 2 years ago

Hi nbelyh! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

Nivedipa-MSFT commented 2 years ago

@nbelyh - We have tested your code on web,desktop and on android mobile. For web its opening tab but for only first click. and for desktop it navigating to channel and for android its navigation to first tab in channel.

astawkieliszek commented 2 years ago

Hi, I suppose this is exactly the same behavior I described in issue #4028.

nbelyh commented 2 years ago

Yes, correct - overlookd this one 👍

Nivedipa-MSFT commented 2 years ago

@nbelyh - There is already bug raised for this issue. We will let you know once we get updates on it.