Forum Discussion

StuartFerguson1980's avatar
StuartFerguson1980
Copper Contributor
Mar 14, 2022

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

1 Reply

  • whann655's avatar
    whann655
    Copper Contributor
    I 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?

Resources