0

我正在制作一些主要由用户驱动的应用程序,当然这意味着他们将成为麻烦制造者,他们可能会使用脏话将虚假数据输入其中,或者更糟地将有效数据更改为坏数据(即更改为脏话)

当然会采取措施试图遏制这种情况,但最终我希望可以选择禁止某人参加我的申请。

我的第一个想法是通过电子邮件地址禁止他们的帐户。我也在想,也许除了禁止他们的设备。

我的问题是,如果他们使用,我可以从他们的手机上使用什么唯一 ID

Andriod
Iphone
Blackberry
Windows Phone 7/8

它有多独特?能轻易改变吗?

4

4 回答 4

1

对于 Windows Phone,您应该能够使用DeviceExtendedProperties。特别是DeviceUniqueId财产。

但请注意,正如他们在那篇文章中所说,如果您使用设备 ID 禁止用户,那么同一设备的任何未来用户都将被禁止使用您的应用程序,即使他们没有做错任何事情。

于 2013-04-23T21:11:29.507 回答
1

有 2 个标识符可以一起用于识别特定设备和用户。

DeviceUniqueId 和 WindowsLiveAnonymousId

第一个是设备,如前所述,在被禁止用户之后使用该设备的任何人也将被禁止。

WindowsLiveAnonymousId 对用户来说是唯一的。我在 3 个不同的设备上看到了相同的标识符,并且对于用户 LiveId 来说总是相同的。

我使用以下 2 种方法来获取这些 id 来识别排行榜的游戏玩家:

//Note: to get a result requires ID_CAP_IDENTITY_DEVICE
// to be added to the capabilities of the WMAppManifest
// this will then warn users in marketplace

public static byte[] GetDeviceUniqueId()
{
    byte[] result = null;
    object uniqueId;
    if (DeviceExtendedProperties.TryGetValue("DeviceUniqueId", out uniqueId)) 
        result = (byte[])uniqueId;
    return result;
}

// NOTE: to get a result requires ID_CAP_IDENTITY_USER
//  to be added to the capabilities of the WMAppManifest
// this will then warn users in marketplace

public static string GetWindowsLiveAnonymousId()
{
    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;
}

它们是这样使用的:

string deviceUniqueId = String.Empty;
for (int i = 0; i < GetDeviceUniqueId().GetLength(0); i++)
{
    deviceUniqueId += GetDeviceUniqueId().GetValue(i);
}

DeviceUniqueIDTextBlock.Text = deviceUniqueId;
WindowsLiveAnonymousIDTextBlock.Text = GetWindowsLiveAnonymousId().ToString(CultureInfo.InvariantCulture);

去年五月我写了一篇关于在 WP7 上获取系统信息的帖子。此代码可在此处找到:http: //www.adambenoit.com/applications/system-info-windows-phone/

希望这可以帮助。

于 2013-04-24T13:16:13.723 回答
0

所有这些设备都具有具有唯一 MAC 地址的网络接口,根据定义,这些地址是恒定的——MAC 地址被烧录到硬件中,并且不能 [容易] 被欺骗,尤其是在移动设备上。我会散列 MAC 地址并将其用作密钥。一旦苹果禁止使用 UDID,iOS 上的做法就很常见了。

于 2013-04-23T20:11:24.840 回答
0

我会使用指导方法。虽然这可以通过卸载并重新安装应用程序来规避。虽然没有什么完美的

如何使用 iPhone SDK 创建 GUID/UUID

如何在android中获取GUID?

如何在 Windows Phone 上创建 GUID http://msdn.microsoft.com/en-us/library/system.guid.newguid(v=vs.95).aspx

如何在黑莓上创建 GUID http://supportforums.blackberry.com/t5/Java-Development/how-to-generate-GUID/td-p/289947

于 2013-04-25T15:39:37.303 回答