获取IMEI code或/和MAC地址的设备 [英] Get IMEI code or/and Mac Address of a Device

查看:806
本文介绍了获取IMEI code或/和MAC地址的设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实现一个方法来唯一标识设备。

建筑师给我以下规格:

IMEI code

与WiFi + 3G设备

无线设备只 - MACADDRESS

这两种需求也制造商+产品型号为完整的ID。

我的问题是:


  1. 我如何从设备上获取IMEI?


  2. 我怎样才能从设备制造商和型号? (我看就孤单了其打造一流的一些常量,但不知道在哪里使用它们)


  3. 即使世界随着3G设备只?


  4. 我怎么能知道,如果该设备是只有WiFi,支持WiFi + 3G或仅使用3G是否存在?

此外,对于唯一标识符的建议是可用的。

PS:我已经能够通过WifiManager得到MacAddres


解决方案

这些问题一直困扰着Android开发了一会,看到的是否有独特的Andr​​oid设备ID?

Android开发团队曾试图直接在这里他们的博客解决这些问题:的http://android-developers.blogspot.com/2011/03/identifying-app-installations.html

在回答你的最后一个问题:刚测试空查询的SIM / MAC /无论何时,然后采取相应的行动。它已经报道,有些情况下,MAC将返回null;看到我的第一个环节。

I'm implementing an way to unique identify the device.

The architect send me the following specs:

devices with Wifi + 3G: IMEI Code

devices Wifi only - MacAddress

Both needs also the Manufacturer + Model for complete the id.

My questions are:

  1. How do I get the IMEI from the device?

  2. How can I get the Manufacturer and Model from the device? (I see theres some constants on Build class for it, but don't know where to use them)

  3. Theres devices with 3G only?

  4. How can I know if the device is wifi only, wifi+3g or 3g only if exists?

Also, suggestions for unique identifiers are available.

PS: I'm already able to get the MacAddres through WifiManager.

解决方案

These questions have plagued Android developers for a while, see Is there a unique Android device ID?

The Android development team has tried to address these concerns directly in their blog here: http://android-developers.blogspot.com/2011/03/identifying-app-installations.html

In answer to your last question: just test for null when querying for SIM/MAC/Whatever and then act accordingly. It's been reported that there are cases where MAC will return null; see my first link.

这篇关于获取IMEI code或/和MAC地址的设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆