Ho aggiunto al WMAppManifest.xml:Non riesco a ottenere il mio ANID?
<Capability Name="ID_CAP_IDENTITY_DEVICE" />
<Capability Name="ID_CAP_IDENTITY_USER" />
Così Perché continuo a ottenere stringhe vuote da:
public static string GetWindowsLiveAnonymousID()
{
int ANIDLength = 32;
int ANIDOffset = 2;
string result = string.Empty;
object anid;
if (UserExtendedProperties.TryGetValue("ANID", out anid))
{
if (anid != null && anid.ToString().Length >= (ANIDLength + ANIDOffset))
{
result = anid.ToString().Substring(ANIDOffset, ANIDLength);
}
}
return result;
}
Non sembra per gestire che TryGetValue molto bene ... Qualcuno ha un indizio?
Sei sicuro che il problema deriva dal 'TryGetValue'? Potrebbe essere il prossimo 'se' pure. Hai provato a impostare un breakpoint per capire quale linea non funziona? –
@KooKiz TryGetValue restituisce false e l'oggetto anid è nullo: -/ – Jason94