J'utilise le code suivant ...
String aid = Settings.Secure.getString(getContext().getContentResolver(), "android_id");
Object obj = null;
try {
((MessageDigest) (obj = MessageDigest.getInstance("MD5"))).update( aid.getBytes(), 0, aid.length());
obj = String.format("%032X", new Object[] { new BigInteger(1, ((MessageDigest) obj).digest()) });
} catch (NoSuchAlgorithmException localNoSuchAlgorithmException) {
obj = aid.substring(0, 32);
}
ou vérifier le Appto obtenir le dispositif ID.
https://play.google.com/store/apps/details?id=com.blogspot.atifsoftwares.deviceidfinderforadmob
Avez-vous déjà trouvé cela? Il ne semble pas que les réponses soient correctes. – anakin78z
Trouvé la bonne réponse ici: http://stackoverflow.com/questions/11029294/android-how-to-programmatically-access-the-device-serial-number-shown-in-the-av – anakin78z