query string does not work in Windows apps
What happened?
https://www.streamingdiscovery.com/?platform=play
https://www.streamingdiscovery.com/?platform=windows
https://www.streamingdiscovery.com/?platform=amazon
So, I'm generating my apps with different urls, so I can capture these parameters, save them in local storage and then use them on one of my screens. The problem is that in the Windows app this doesn't work.
How do we reproduce the behavior?
if (platform.NotEmpty())
{
await JsRuntime.InvokeAsync<string>("SetLocalStorage", "platform", platform);
}
else
{
await JsRuntime.InvokeAsync<string>("SetLocalStorage", "platform", "webapp");
}
In the case of Windows, it only generates the webapp, because it cannot capture this query string. In the case of Android, this works normally.
What do you expect to happen?
I believe that the build is excluding the parameters from the url that I enter, only leaving the root, which is why I cannot detect the query strings.
What environment were you using?
windows: last, edge: last, installed from windows store
Additional context
No response
Hey @drma-tech, it is interesting that your query params are not being included in the Windows package. With the store installed version of your app, if you open up devtools, and in the console type window.location, does the URL look right to you?
Second, the best way to know if your PWA is running on Windows, installed from the Store is this https://learn.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/how-to/microsoft-store#measure-usage-of-your-pwa-installed-from-the-microsoft-store
doesnt show anything
Interesting, ok let me do some exploring and ill get back to you. Thanks!
@jgw96 any progreess?
and I just discovered that it doesn't work on Android either. at least not currently (it worked when I implemented it, i think).