Unique Device Identifier in MAUI

Occasional Visitor

I am looking for a way to get a device identifier in NET MAUI that is cross platform compliant between Android/iOS/Windows.


I originally had this code working in Xamarin Forms with the following:



Context context = Application.Context;
id = Settings.Secure.GetString(context.ContentResolver, Settings.Secure.AndroidId);



UIDevice.CurrentDevice.IdentifierForVendor.AsString().Replace("-", "");


Is there anything currently or planned in the future for use in NET MAUI.


Thanks In Advance,


Stuart Ferguson

0 Replies