Azure / azure-notificationhubs-xamarin

Azure Notification Hubs Sample for Xamarin Forms
MIT License
35 stars 23 forks source link

[FEATURE REQ] Have the possibility to decide the installation expiration window #51

Open andrekiba opened 3 years ago

andrekiba commented 3 years ago

Is your feature request related to a problem? Please describe. I still do not understand why you decided to reverse the default behavior (no expiration) but in this case we need I way to decide the expiration window (some apps are meant to be kiosks, they "never" restart...)

Describe the solution you'd like Provide a way to pass a custom (longer) duration through the NotificationHubInstallationAdapter constructor. Actually this constructor is private

Please tell me if I can help with a pr, the problem is the meaning of this project which is not clear to me. Is it something official? As already asked do you plan to have a nuget package? In which way I can help? Thanks @marstr

marstr commented 3 years ago

This is a valuable explanation of why you need more control over expiration dates. While expiration dates really help us at an operational level, I can start looking into an option for you. If nothing else, this could be a good cookbook addition.

marstr commented 3 years ago

Howdy @andrekiba,

There's a method called NotificationHub.BeginInstallationUpdate(). It's a public method, and under the covers it's what is used to alert us that we should look into updating an Installation for a myriad of reasons, but including that the installation is about to expire.

If you add a call to this method that happens periodically (say once a day), your installation will always be kept alive.

andrekiba commented 3 years ago

ok @marstr thanks, I try with a scheduled daily task to call this. I'll keep you posted.