thomasgalliker / Plugin.FirebasePushNotifications

Receive and handle firebase push notifications in .NET MAUI apps
MIT License
65 stars 5 forks source link

[Refactoring] Replace `Rng.NextInt()` as source for activity request codes #67

Open thomasgalliker opened 1 month ago

thomasgalliker commented 1 month ago

Description

Today, different way to generate activity request codes are used. Clarify what is the best and safest way to generate such codes. var requestCode = Rng.NextInt() var aRequestCode = Guid.NewGuid().GetHashCode();

Background & Context

We want to avoid possible collisions if we generate duplicate request codes. Or, at least we want to check if this can happen at all.