Azure / azure-notificationhubs-dotnet

.NET SDK for Azure Notification Hubs
MIT License
70 stars 123 forks source link

[QUERY] What is InstallationId? #181

Closed JohnGalt1717 closed 3 years ago

JohnGalt1717 commented 3 years ago

Query/Question I'm looking at the sample and it just has "myid" in there. It doesn't tell me if this is unqiue to the install, where to get it from uwp or where I'm supposed to store it or what the value is supposed to be to start on first installation,

So what is it, how do we create it on first go (because it won't accept null), is it unique for the specific device and are we supposed to store the value and if so, does it change between runs etc?

            await hub.CreateOrUpdateInstallationAsync(new Installation
            {
                Platform = NotificationPlatform.Wns,
                InstallationId = "what goes here?",
                PushChannel = channel.Uri
            });

Also the documentation needs to be updated on docs because it doesn't even reference what the sample uses. (I'm copying the sample in hopes that it is more new)

Why is this not a Bug or a feature Request? Because the documentation doesn't contain any information about what the InstallationId is and it's required but who know's what this is supposed to be?

Setup (please complete the following information if applicable):

mpodwysocki commented 3 years ago

@JohnGalt1717 The InstallationId is a field that you can use to describe your installation's identifier. Unlike the RegistrationId, this is not system generated, and you can generate it yourself, although like RegistrationId, it must be unique. See the Installations page for more details of what an installation is versus a registration, and how to target using InstallationId.