Forum Discussion
StuartFerguson1980
Mar 14, 2022Copper Contributor
Unique Device Identifier in MAUI
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
- whann655Copper ContributorI was looking for a way to get the advertising app in maui and come across your post. Its not the thing i was looking for but i think its the one you could use:
https://medium.com/@govardhan_nag/device-id-from-ios-and-android-platforms-using-net-maui-a0ce08acdc22
Probably its too late?