Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query string does not work in Windows apps #4681

Open
drma-tech opened this issue Mar 14, 2024 · 5 comments
Open

query string does not work in Windows apps #4681

drma-tech opened this issue Mar 14, 2024 · 5 comments

Comments

@drma-tech
Copy link

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");
}

image

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

@jgw96
Copy link
Contributor

jgw96 commented Mar 18, 2024

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

@drma-tech
Copy link
Author

image
doesnt show anything

@jgw96
Copy link
Contributor

jgw96 commented Mar 19, 2024

Interesting, ok let me do some exploring and ill get back to you. Thanks!

@drma-tech
Copy link
Author

@jgw96 any progreess?

@drma-tech
Copy link
Author

drma-tech commented May 15, 2024

and I just discovered that it doesn't work on Android either. at least not currently (it worked when I implemented it, i think).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants