Jan 07 2023 12:32 AM - edited Jan 07 2023 01:30 AM
We are encoding the data(object) and assigning it to the subEntityId in context object from our nodejs application. Then in teams client, we get that data from teams context using microsoft teams sdk and redirect user to the respective page in our application based on whatever data we get in subEntityId
In desktop, deeplinking is working perfectly but in android client, we're not getting any data in subEntityId. It is just opening the homepage of our tab app but I need to redirect user to specific page based whatever data is assigned to subEntityId.
Below I've provided how we're encoding the data and assigning it to subEntityId.
Server Side Code:
const context = encodeURIComponent( JSON.stringify({ "subEntityId": { "type": "PROGRAM_PROFILE", "program_id": "12345", uid: uuidv4(), } }) ); const body = { topic: { source: 'text', value: notificationTopic, webUrl: `https://teams.microsoft.com/l/entity/${TEAMS_APP_ID}/index?context=${context}`, }, activityType: 'commonNotification', previewText: { content: notificationSubtitle, }, templateParameters: [ { name: 'title', value: notificationTitle, }, ], }; const url = `https://graph.microsoft.com/v1.0/users/${userId}/teamwork/sendActivityNotification`; await axios.post(url, body));
Client Side Code:
const context = await app.getContext(); console.log(context?.page?.subPageId); // getting undefined
Any kind of help is appreciated!