How to identify UWP app

BitSmithy 2,141 Reputation points
2024-01-22T13:10:15.94+00:00

Hello, I am creating a simple chat. User simply opens his uwp app, and he can see his chat history and next type new posts. Ofcourse if other user opens the app on other device it should to see only his own chat history. To make such behavior i need to identify uwp app instaled on user device to read a proper chat history from database. The same is when User writes new post to i must know app id to pair this post with the app. I dont want user to create any account, login, etc. I simply want to pair posts and app. How to identify an app instaled on any device?

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 119.6K Reputation points
    2024-01-22T19:56:20.3066667+00:00

    For example, you can generate a new identifier using Guid.NewId and store it to local storage (https://learn.microsoft.com/en-us/windows/apps/design/app-settings/store-and-retrieve-app-data) if it was empty. Use the stored value if exists.

    However, it will be lost if the Operating System or hardware is changed. Maybe it has sense to have user accounts too.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.