Jun 01 2020 08:32 AM
Jun 01 2020 08:32 AM
I'm starting to build personal tab app. What I wanted to achieve is to have the app a notification. Here's a scenario, I open the application on the left side navigation and do some operation, then I switch other app like chat. If something happened to the application the application will show a notification similar to activity feeds. Then, I'll open it again but the application should not be reloaded or refresh.
So basically does the microsoft custom apps offers the personal tab app to remain its state(without refreshing/reloading) when switching between application, and have notifications similar to notification new feeds? If possible, I also wanted to have control about the visibility of the notification inside the application, for instance, even though the application is already open I want the notification to remain visible. Is the above functionality possible? Please let me know.
Jun 01 2020 11:31 PM
@avillanueva , Could you please clarify what you are looking for? It seems you want to notify when user switch to chat from tab(if any change happened with tab like refresh or reload). You can maintain the state of tab at your end (tabs are iframe webpages so you can handle the refresh logic at your end). You can also fetch the recently used tabs instances using getMruTabInstances method. later you can notify user by sending proactive notification(if your app configured Bot). Currently there is no way to notify in activity feed using Tabs.
Jun 02 2020 06:52 AM
Thank you for the response. Apologies if my description is not clear to you. So what I wanted to do is to have a customer app where it keep its state. For instance, if I open the custom app and do some operation with it, I want to keep the state of that app and not refresh again if I switch the app to like chat or other apps because usually when I switch apps and open my custom app again, it refreshes the page and it goes back to initial page and all the progress is lost. Another thing is to have a notification with that custom app. For instance, there is an event occurred in the custom application. I want the app to show the notification icon in the app itself, not in the activity feeds because if I'm not mistaken most of the notification goes to the activity feeds but for this application, I want to have it on the custom application. It will show a small notification icon in the custom app icon in the side navigation bar. I hope everything is clear.
Mar 04 2021 01:44 PM
@avillanuevado you find any solution? I have the same requirement. The fun fact is that on mobile Teams apps, custom apps are behaving the way that I want to achieve (remember last state of custom application in case of switching context to chat or other one), but I cannot find a way to have the same experience in desktop/browser versions.
Thanks in advance.
Mar 19 2021 03:27 PM
@avillanueva What I've found in building personal apps is that this cannot be done without some server side caching of state. There is nothing in MS teams that would help with this. Your application is being rendered in an IFrame so MS teams has no real storage or state management for you. It is much more noticeable when you jump from Tab to Tab in a personal app. Basically the application is relaunching again but routed to another route of the same application. My team essentially did away with the Tabs because we lost all Global State and had to regenerate it again when the application reloaded. We switched to an In Application navigation system instead of tabs.
I suspect that if you cannot get around the refresh issue but you could possibly track state on the application and when the application refreshes, make sure you route to the previously visited route and load all the 'cached' state.
Hope it helps