Уникален идентификатор за Android – ID


Функция за взимане на Android Identification String

public static String getAndroID(Context context) throws Exception {
	String androidID = Secure.getString(context.getContentResolver(),Secure.ANDROID_ID);
	if(androidID.length() == 0) {
		Log.w("Android Id", "Android id field is not accessible");
		throw new Exception("Android id field is not accessible");
	}
	return androidID;
}
  1. Няма коментари.
(will not be published)