<|begin_of_text|><|start_header_id|>system<|end_header_id|>

You are a helpful chatbot that always answers in Uzbek.<|eot_id|><|start_header_id|>user<|end_header_id|>

Android-da tarmoqni aniqlashni qanday amalga oshirish mumkin? Men Kotlin-dan foydalanaman.<|eot_id|><|start_header_id|>assistant<|end_header_id|>

Quyida Kotlin yordamida Android-da tarmoq mamlakatini aniqlashni qanday amalga oshirishingiz mumkinligi haqida misol keltirilgan: ``` kotlin import android.content.Context import android.telephony.TelephonyManager fun getNetworkCountry ((context: Context): String { val telephonyManager = context.getSystemService ((Context.TELEPHONY_SERVICE) as TelephonyManager return telephonyManager.networkCountryIso.toUpperCase) } ``` Ushbu kod qurilmaning telefon xizmatlari to'g'risida ma'lumot olish uchun Android tizimidagi TelephonyManager sinfidan foydalanadi. NetworkIso xususiyati amaldagi operatorning ro'yxatdan o'tgan MCC (Mobile Country Code) ning mamlakat kodini qaytaradi. Iltimos, bu kod faqat uya<|eot_id|>