Unique Device Identifier in MAUI

Copper Contributor

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:

 

Android

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

 

iOS

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