Forum Discussion

byungheesohn's avatar
byungheesohn
Brass Contributor
Sep 23, 2024
Solved

Question about MS Teams SDK for app.initialize/ app.getContext

Dear Sir I have an issue about Microsoft Teams Addin - SDK to get Teams locale for language setting. Here are my code and result.   app.initialize().then( () => {     app.getContext().then((conte...
  • Prasad_Das-MSFT's avatar
    Sep 24, 2024

    byungheesohnthe times you mentioned: around 380ms for Web Teams in Chrome and 130ms for Desktop Teams, are within a reasonable range, but there are ways to optimize and potentially reduce this delay. Using URL placeholders can be a more efficient way to access context information without the delay associated with app.getContext.

    By using URL placeholders, you can directly embed the locale information in your URLs, which can help reduce the delay.

    const url = `https://your-app-url.com?locale={app.locale}`;

    Get Contextual Information for Tabs - Teams | Microsoft Learn

     

     

     

    Thanks, 

    Prasad Das

    ------------------------------------------------------------------------------------------ 

    If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate. 

     

     

Resources