'id'에 해당되는 글 2건

  1. 2016.04.20 Simple Uniq ID만들기
  2. 2011.04.25 [wp7] 폰에서 유니크한 ID 만들기
c#2016. 4. 20. 11:05
Guid.NewGuid()

출처 : http://stackoverflow.com/questions/11313205/generate-a-unique-id

Posted by 동동(이재동)
Windows Phone 72011. 4. 25. 15:16

일단 폰 정보를 얻기 위해서

WMAppManifest.xml에 이걸 추가하고

 

<Capability Name="ID_CAP_IDENTITY_USER" />

<Capability Name="ID_CAP_IDENTITY_DEVICE" />
 
private string GetPhoneANID()
{
    object anid = UserExtendedProperties.GetValue("ANID");
    if (anid == null)
    {
        byte[] deviceId = (byte[])DeviceExtendedProperties.GetValue("DeviceUniqueId");
 
        string id = BitConverter.ToString(deviceId).Replace("-", "");
        anid = id;
    }
    else
    {
        anid = anid.ToString();
    }
 
    return anid as string;
}

이렇게 해서 얻어오면 된다.
Posted by 동동(이재동)