تجدید نظر 1
آخرین به روز رسانی: 27 نوامبر 2013
حق نشر © 2013، Google Inc. کلیه حقوق محفوظ است.
compatibility@android.com
فهرست مطالب
2. منابع
3. نرم افزار
3.2. سازگاری نرم افزار API
3.3. سازگاری Native API
3.4. سازگاری وب
3.5. سازگاری رفتاری API
3.6. فضاهای نام API
3.7. سازگاری با ماشین مجازی
3.8. سازگاری با رابط کاربری
3.8.2. ابزارک ها
3.8.3. اطلاعیه ها
3.8.4. جستجو کنید
3.8.5. نان تست
3.8.6. تم ها
3.8.7. تصاویر پس زمینه زنده
3.8.8. نمایش برنامه اخیر
3.8.9. مدیریت ورودی
3.8.10. کنترل از راه دور رسانه قفل صفحه نمایش
3.8.11. رویاها
3.8.12. مکان
3.8.13. یونیکد
3.10 دسترسی
3.11 تبدیل متن به گفتار
5. سازگاری چند رسانه ای
5.2. رمزگذاری ویدیو
5.3. رمزگشایی ویدیو
5.4. ضبط صدا
5.5. تأخیر صوتی
5.6. پروتکل های شبکه
7. سازگاری سخت افزار
7.1.2. معیارهای نمایش
7.1.3. جهت صفحه نمایش
7.1.4. شتاب گرافیک دوبعدی و سه بعدی
7.1.5. حالت سازگاری برنامه قدیمی
7.1.6. انواع صفحه نمایش
7.1.7. فناوری صفحه نمایش
7.1.8. نمایشگرهای خارجی
7.2.2. ناوبری بدون لمس
7.2.3. کلیدهای ناوبری
7.2.4. ورودی صفحه لمسی
7.2.5. ورودی لمسی جعلی
7.2.6. میکروفون
7.3.2. مغناطیس سنج
7.3.3. جی پی اس
7.3.4. ژیروسکوپ
7.3.5. فشارسنج
7.3.6. دماسنج
7.3.7. فتومتر
7.3.8. سنسور مجاورت
7.4.2. IEEE 802.11 (Wi-Fi)
7.4.3. بلوتوث
7.4.4. ارتباطات میدان نزدیک
7.4.5. حداقل قابلیت شبکه
7.4.6. تنظیمات همگام سازی
7.6. حافظه و ذخیره سازی
7.7. USB
9. سازگاری مدل امنیتی
9.2. UID و جداسازی فرآیند
9.3. مجوزهای سیستم فایل
9.4. محیط های اجرایی جایگزین
9.5. پشتیبانی چند کاربره
9.6. هشدار پیامک برتر
9.7. ویژگی های امنیتی کرنل
9.8. حریم خصوصی
9.9. رمزگذاری فول دیسک
11. نرم افزار قابل به روز رسانی
12. سند تغییرات
13. تماس با ما
1. مقدمه
این سند شرایطی را که باید برای سازگاری دستگاهها با Android 4.4 رعایت شود، برشمرده است.
استفاده از "باید"، "نباید"، "لازم"، "نباید"، "نباید"، "باید"، "نباید"، "توصیه شده"، "ممکن است" و "اختیاری" طبق استاندارد IETF تعریف شده در RFC2119 است [ منابع، 1 ].
همانطور که در این سند استفاده میشود، «پیادهکننده دستگاه» یا «اجراکننده» شخص یا سازمانی است که راهحل سختافزار/نرمافزاری را با Android 4.4 توسعه میدهد. "پیاده سازی دستگاه" یا "پیاده سازی" راه حل سخت افزاری/نرم افزاری است که به این شکل توسعه یافته است.
برای اینکه پیادهسازیهای دستگاه با Android 4.4 سازگار در نظر گرفته شوند، باید الزامات ارائهشده در این تعریف سازگاری، از جمله هر سندی که از طریق مرجع گنجانده شدهاند، داشته باشند.
در مواردی که این تعریف یا تستهای نرمافزاری توضیح داده شده در بخش 10 بیصدا، مبهم یا ناقص است، این مسئولیت اجرای دستگاه است که از سازگاری با پیادهسازیهای موجود اطمینان حاصل کند.
به همین دلیل، پروژه منبع باز اندروید [ منابع، 3 ] هم مرجع و هم پیاده سازی ترجیحی اندروید است. پیادهسازان دستگاه به شدت تشویق میشوند تا پیادهسازیهای خود را تا حد امکان بر اساس کد منبع «بالادست» موجود در پروژه منبع باز Android قرار دهند. در حالی که برخی از مؤلفهها را میتوان به طور فرضی با پیادهسازیهای جایگزین جایگزین کرد، این عمل به شدت ممنوع است، زیرا گذراندن آزمونهای نرمافزار به طور قابلتوجهی دشوارتر میشود. این مسئولیت پیادهکننده است که از سازگاری کامل رفتاری با پیادهسازی استاندارد Android، از جمله و فراتر از مجموعه تست سازگاری اطمینان حاصل کند. در نهایت، توجه داشته باشید که تعویض و اصلاح برخی از اجزا به صراحت توسط این سند ممنوع است.
2. منابع
- سطوح مورد نیاز IETF RFC2119: http://www.ietf.org/rfc/rfc2119.txt
- مروری بر برنامه سازگاری اندروید: http://source.android.com/docs/compatibility/index.html
- پروژه متن باز اندروید: http://source.android.com/
- تعاریف و مستندات API: http://developer.android.com/reference/packages.html
- مرجع مجوزهای Android: http://developer.android.com/reference/android/Manifest.permission.html
- مرجع android.os.Build: http://developer.android.com/reference/android/os/Build.html
- رشته های نسخه مجاز Android 4.4: http://source.android.com/docs/compatibility/4.4/versions.html
- Renderscript: http://developer.android.com/guide/topics/graphics/renderscript.html
- شتاب سخت افزار: http://developer.android.com/guide/topics/graphics/hardware-accel.html
- کلاس android.webkit.WebView: http://developer.android.com/reference/android/webkit/WebView.html
- HTML5: http://www.whatwg.org/specs/web-apps/current-work/multipage/
- قابلیت های آفلاین HTML5: http://dev.w3.org/html5/spec/Overview.html#offline
- برچسب ویدیوی HTML5: http://dev.w3.org/html5/spec/Overview.html#video
- HTML5/W3C geolocation API: http://www.w3.org/TR/geolocation-API/
- HTML5/W3C webstorage API: http://www.w3.org/TR/webstorage/
- HTML5/W3C IndexedDB API: http://www.w3.org/TR/IndexedDB/
- مشخصات ماشین مجازی Dalvik: در کد منبع Android در dalvik/docs موجود است
- AppWidgets: http://developer.android.com/guide/practices/ui_guidelines/widget_design.html
- اعلان ها: http://developer.android.com/guide/topics/ui/notifiers/notifications.html
- منابع برنامه: http://code.google.com/android/reference/available-resources.html
- راهنمای سبک نماد نوار وضعیت: http://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html
- مدیر جستجو: http://developer.android.com/reference/android/app/SearchManager.html
- نان تست: http://developer.android.com/reference/android/widget/Toast.html
- تم ها: http://developer.android.com/guide/topics/ui/themes.html
- کلاس R.style: http://developer.android.com/reference/android/R.style.html
- تصاویر پس زمینه زنده: https://android-developers.googleblog.com/2010/02/live-wallpapers.html
- مدیریت دستگاه Android: http://developer.android.com/guide/topics/admin/device-admin.html
- مرجع DevicePolicyManager: http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html
- APIهای سرویس دسترسپذیری Android: http://developer.android.com/reference/android/accessibilityservice/package-summary.html
- APIهای دسترسی Android: http://developer.android.com/reference/android/view/accessibility/package-summary.html
- پروژه Eyes Free: http://code.google.com/p/eyes-free
- APIهای Text-To-Speech: http://developer.android.com/reference/android/speech/tts/package-summary.html
- مستندات ابزار مرجع (برای adb، aapt، ddms، systrace): http://developer.android.com/guide/developing/tools/index.html
- توضیحات فایل apk اندروید: http://developer.android.com/guide/topics/fundamentals.html
- فایل های مانیفست: http://developer.android.com/guide/topics/manifest/manifest-intro.html
- ابزار تست میمون: https://developer.android.com/studio/test/other-testing-tools/monkey
- Android android.content.pm.PackageManager کلاس و لیست ویژگی های سخت افزار: http://developer.android.com/reference/android/content/pm/PackageManager.html
- پشتیبانی از چند صفحه: http://developer.android.com/guide/practices/screens_support.html
- android.util.DisplayMetrics: http://developer.android.com/reference/android/util/DisplayMetrics.html
- android.content.res.Configuration: http://developer.android.com/reference/android/content/res/Configuration.html
- android.hardware.SensorEvent: http://developer.android.com/reference/android/hardware/SensorEvent.html
- API بلوتوث: http://developer.android.com/reference/android/bluetooth/package-summary.html
- NDEF Push Protocol: http://source.android.com/docs/compatibility/ndef-push-protocol.pdf
- MIFARE MF1S503X: http://www.nxp.com/documents/data_sheet/MF1S503x.pdf
- MIFARE MF1S703X: http://www.nxp.com/documents/data_sheet/MF1S703x.pdf
- MIFARE MF0ICU1: http://www.nxp.com/documents/data_sheet/MF0ICU1.pdf
- MIFARE MF0ICU2: http://www.nxp.com/documents/short_data_sheet/MF0ICU2_SDS.pdf
- MIFARE AN130511: http://www.nxp.com/documents/application_note/AN130511.pdf
- MIFARE AN130411: http://www.nxp.com/documents/application_note/AN130411.pdf
- API جهتگیری دوربین: http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)
- دوربین: http://developer.android.com/reference/android/hardware/Camera.html
- لوازم جانبی باز اندروید: http://developer.android.com/guide/topics/usb/accessory.html
- USB Host API: http://developer.android.com/guide/topics/usb/host.html
- مرجع امنیت و مجوزهای Android: http://developer.android.com/guide/topics/security/permissions.html
- برنامه های اندروید: http://code.google.com/p/apps-for-android
- Android DownloadManager: http://developer.android.com/reference/android/app/DownloadManager.html
- انتقال فایل اندروید: http://www.android.com/filetransfer
- قالبهای رسانه اندروید: http://developer.android.com/guide/appendix/media-formats.html
- پروتکل پیشنویس پخش جریانی زنده HTTP: http://tools.ietf.org/html/draft-pantos-http-live-streaming-03
- انتقال اتصال NFC: http://www.nfc-forum.org/specs/spec_list/#conn_handover
- جفتسازی ساده بلوتوث ایمن با استفاده از NFC: http://www.nfc-forum.org/resources/AppDocs/NFCForum_AD_BTSSP_1_0.pdf
- Wi-Fi Multicast API: http://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock.html
- Action Assist: http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST
- مشخصات شارژ USB: http://www.usb.org/developers/devclass_docs/USB_Battery_Charging_1.2.pdf
- Android Beam: http://developer.android.com/guide/topics/nfc/nfc.html
- Android USB Audio: http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO
- تنظیمات اشتراکگذاری NFC Android: http://developer.android.com/reference/android/provider/Settings.html#ACTION_NFCSHARING_SETTINGS
- Wi-Fi Direct (Wi-Fi P2P): http://developer.android.com/reference/android/net/wifi/p2p/WifiP2pManager.html
- ویجت قفل و صفحه اصلی: http://developer.android.com/reference/android/appwidget/AppWidgetProviderInfo.html
- مرجع UserManager: http://developer.android.com/reference/android/os/UserManager.html
- مرجع ذخیره سازی خارجی: /docs/core/storage
- APIهای حافظه خارجی: http://developer.android.com/reference/android/os/Environment.html
- کد کوتاه پیامکی: http://en.wikipedia.org/wiki/Short_code
- سرویس گیرنده کنترل از راه دور رسانه: http://developer.android.com/reference/android/media/RemoteControlClient.html
- مدیر نمایش: http://developer.android.com/reference/android/hardware/display/DisplayManager.html
- رویاها: http://developer.android.com/reference/android/service/dreams/DreamService.html
- تنظیمات مربوط به توسعه برنامه Android: http://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DEVELOPMENT_SETTINGS
- دوربین: http://developer.android.com/reference/android/hardware/Camera.Parameters.html
- برنامه افزودنی EGL-EGL_ANDROID_RECORDABLE: http://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_recordable.txt
- Motion Event API: http://developer.android.com/reference/android/view/MotionEvent.html
- پیکربندی ورودی لمسی: http://source.android.com/docs/core/interaction/input/touch-devices.html
- یونیکد 6.1.0: http://www.unicode.org/versions/Unicode6.1.0/
- سازگاری WebView: http://www.chromium.org/
- برنامه مالک دستگاه Android: http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp(java.lang.String)
- WifiManager API: http://developer.android.com/reference/android/net/wifi/WifiManager.html
- الزامات کدگذاری سخت افزار RTC: http://www.webmproject.org/hardware/rtc-coding-requirements/
- Settings.Secure LOCATION_MODE: http://developer.android.com/reference/android/provider/Settings.Secure.html#LOCATION_MODE
- حلکننده محتوا: http://developer.android.com/reference/android/content/ContentResolver.html
- SettingInjectorService: http://developer.android.com/reference/android/location/SettingInjectorService.html
- شبیه سازی کارت مبتنی بر میزبان: http://developer.android.com/guide/topics/connectivity/nfc/hce.html
- ارائه دهنده تلفن: http://developer.android.com/reference/android/provider/Telephony.html
بسیاری از این منابع به طور مستقیم یا غیرمستقیم از Android SDK مشتق شده اند و از نظر عملکردی با اطلاعات موجود در اسناد آن SDK یکسان خواهند بود. در هر موردی که این تعریف سازگاری یا مجموعه تست سازگاری با مستندات SDK مخالف باشد، اسناد SDK معتبر تلقی میشوند. هر گونه جزئیات فنی ارائه شده در مراجع ذکر شده در بالا به عنوان بخشی از این تعریف سازگاری در نظر گرفته می شود.
3. نرم افزار
3.1. سازگاری API مدیریت شده
محیط اجرای مدیریت شده (مبتنی بر دالویک) وسیله اصلی برنامه های اندروید است. رابط برنامه نویسی برنامه اندروید (API) مجموعه ای از رابط های پلتفرم اندروید است که در معرض برنامه های کاربردی در حال اجرا در محیط VM مدیریت شده قرار دارند. پیادهسازیهای دستگاه باید پیادهسازیهای کامل، از جمله تمام رفتارهای مستند، هر API مستندی را که توسط Android SDK در معرض دید قرار میگیرد [ منابع، 4 ] ارائه کند.
پیادهسازیهای دستگاه نباید هیچیک از APIهای مدیریتشده را حذف کنند، رابطها یا امضاهای API را تغییر دهند، از رفتار مستند منحرف شوند، یا شامل موارد بدون عملیات باشند، مگر در مواردی که بهطور خاص توسط این تعریف سازگاری مجاز است.
این تعریف سازگاری اجازه میدهد برخی از انواع سختافزاری که Android برای آنها دارای API است توسط پیادهسازی دستگاه حذف شوند. در چنین مواردی، APIها باید همچنان وجود داشته باشند و به روشی معقول رفتار کنند. برای شرایط خاص این سناریو به بخش 7 مراجعه کنید.
3.2. سازگاری نرم افزار API
علاوه بر APIهای مدیریت شده از بخش 3.1، Android همچنین شامل یک API "نرم" فقط زمان اجرا قابل توجه است، به شکل مواردی مانند Intent ها، مجوزها، و جنبه های مشابه برنامه های Android که در زمان کامپایل برنامه قابل اجرا نیستند.
3.2.1. مجوزها
پیادهکنندههای دستگاه باید تمام ثابتهای مجوز را همانطور که در صفحه مرجع مجوز [ منابع، 5 ] مستند شده است، پشتیبانی و اجرا کنند. توجه داشته باشید که بخش 9 الزامات اضافی مربوط به مدل امنیتی اندروید را فهرست میکند.
3.2.2. ساخت پارامترها
APIهای Android شامل تعدادی ثابت در کلاس android.os.Build
[ منابع، 6 ] هستند که برای توصیف دستگاه فعلی در نظر گرفته شده است. برای ارائه مقادیر معنادار و منسجم در بین پیادهسازیهای دستگاه، جدول زیر شامل محدودیتهای اضافی در قالبهای این مقادیر است که پیادهسازی دستگاه باید با آنها مطابقت داشته باشد.
پارامتر | نظرات |
VERSION.RELEASE | نسخه سیستم اندروید در حال اجرا، در قالب قابل خواندن توسط انسان. این فیلد باید دارای یکی از مقادیر رشته تعریف شده در [ منابع، 7 ] باشد. |
VERSION.SDK | نسخه سیستم Android در حال اجرا، در قالبی که برای کد برنامه شخص ثالث قابل دسترسی است. برای اندروید 4.4، این فیلد باید دارای عدد صحیح 19 باشد. |
VERSION.SDK_INT | نسخه سیستم Android در حال اجرا، در قالبی که برای کد برنامه شخص ثالث قابل دسترسی است. برای اندروید 4.4، این فیلد باید دارای عدد صحیح 19 باشد. |
VERSION.INCREMENTAL | مقداری که توسط پیادهکننده دستگاه انتخاب شده است که ساختار خاص سیستم Android در حال اجرا را در قالب قابل خواندن توسط انسان تعیین میکند. این مقدار نباید برای ساختهای مختلفی که در دسترس کاربران نهایی قرار گرفتهاند دوباره استفاده شود. یک استفاده معمولی از این فیلد این است که نشان دهد کدام شماره ساخت یا شناسه تغییر منبع-کنترل برای تولید بیلد استفاده شده است. هیچ الزامی برای قالب خاص این فیلد وجود ندارد، به جز اینکه نباید خالی یا رشته خالی ("") باشد. |
هیئت مدیره | مقداری که توسط پیادهکننده دستگاه انتخاب میشود و سختافزار داخلی خاص مورد استفاده دستگاه را در قالب قابل خواندن توسط انسان شناسایی میکند. یکی از کاربردهای احتمالی این فیلد نشان دادن بازبینی خاص برد تغذیه کننده دستگاه است. مقدار این فیلد باید به صورت ASCII 7 بیتی قابل رمزگذاری باشد و با عبارت منظم "^[a-zA-Z0-9.,_-]+$" مطابقت داشته باشد. |
برند | مقداری که نشان دهنده نام تجاری مرتبط با دستگاه است که برای کاربران نهایی شناخته شده است. باید در قالب قابل خواندن برای انسان باشد و باید نماینده سازنده دستگاه یا برند شرکتی باشد که دستگاه تحت آن به بازار عرضه می شود. مقدار این فیلد باید به صورت ASCII 7 بیتی قابل رمزگذاری باشد و با عبارت منظم "^[a-zA-Z0-9.,_-]+$" مطابقت داشته باشد. |
CPU_ABI | نام مجموعه دستورالعمل (نوع CPU + قرارداد ABI) کد بومی. به بخش 3.3: سازگاری Native API مراجعه کنید. |
CPU_ABI2 | نام مجموعه دستورات دوم (نوع CPU + قرارداد ABI) کد بومی. به بخش 3.3: سازگاری Native API مراجعه کنید. |
DEVICE | مقداری که توسط پیادهکننده دستگاه انتخاب میشود که حاوی نام توسعه یا نام کد است که پیکربندی ویژگیهای سختافزاری و طراحی صنعتی دستگاه را مشخص میکند. مقدار این فیلد باید به صورت ASCII 7 بیتی قابل رمزگذاری باشد و با عبارت منظم "^[a-zA-Z0-9.,_-]+$" مطابقت داشته باشد. |
اثر انگشت | رشته ای که به طور منحصر به فرد این ساخت را مشخص می کند. باید به طور منطقی برای انسان قابل خواندن باشد. باید از این الگو پیروی کند:$(BRAND)/$(PRODUCT)/$(DEVICE):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/$(TAGS) به عنوان مثال: acme/myproduct/mydevice:4.4/KRT16/3359:userdebug/test-keys اثر انگشت نباید شامل کاراکترهای فضای خالی باشد. اگر سایر فیلدهای موجود در الگوی بالا دارای نویسههای فضای خالی هستند، باید در اثر انگشت ساخت با نویسه دیگری مانند نویسه زیرخط ("_") جایگزین شوند. مقدار این فیلد باید به صورت ASCII 7 بیتی قابل رمزگذاری باشد. |
سخت افزار | نام سخت افزار (از خط فرمان هسته یا /proc). باید به طور منطقی برای انسان قابل خواندن باشد. مقدار این فیلد باید به صورت ASCII 7 بیتی قابل رمزگذاری باشد و با عبارت منظم "^[a-zA-Z0-9.,_-]+$" مطابقت داشته باشد. |
میزبان | رشته ای که به طور منحصر به فرد میزبانی را که ساخت بر روی آن ساخته شده است، در قالب قابل خواندن توسط انسان، شناسایی می کند. هیچ الزامی برای قالب خاص این فیلد وجود ندارد، به جز اینکه نباید خالی یا رشته خالی ("") باشد. |
شناسه | شناسهای که توسط پیادهکننده دستگاه برای ارجاع به یک نسخه خاص، در قالب قابل خواندن توسط انسان انتخاب شده است. این فیلد می تواند همان android.os.Build.VERSION.INCREMENTAL باشد، اما باید مقداری باشد که به اندازه کافی معنی دار باشد تا کاربران نهایی بتوانند بین ساخت های نرم افزار تمایز قائل شوند. مقدار این فیلد باید به صورت ASCII 7 بیتی قابل رمزگذاری باشد و با عبارت منظم "^[a-zA-Z0-9.,_-]+$" مطابقت داشته باشد. |
سازنده | نام تجاری سازنده اصلی تجهیزات (OEM) محصول. هیچ الزامی برای قالب خاص این فیلد وجود ندارد، به جز اینکه نباید خالی یا رشته خالی ("") باشد. |
مدل | مقداری که توسط پیادهکننده دستگاه انتخاب شده و حاوی نام دستگاهی است که کاربر نهایی آن را میشناسد. این باید همان نامی باشد که دستگاه تحت آن به بازار عرضه شده و به کاربران نهایی فروخته می شود. هیچ الزامی برای قالب خاص این فیلد وجود ندارد، به جز اینکه نباید خالی یا رشته خالی ("") باشد. |
محصول | مقداری انتخاب شده توسط پیادهکننده دستگاه حاوی نام توسعه یا نام کد محصول خاص (SKU) که باید در همان برند منحصر به فرد باشد. باید برای انسان قابل خواندن باشد، اما لزوماً برای مشاهده توسط کاربران نهایی در نظر گرفته نشده است. مقدار این فیلد باید به صورت ASCII 7 بیتی قابل رمزگذاری باشد و با عبارت منظم "^[a-zA-Z0-9.,_-]+$" مطابقت داشته باشد. |
سریال | شماره سریال سخت افزاری که باید در دسترس باشد. مقدار این فیلد باید به صورت ASCII 7 بیتی قابل رمزگذاری باشد و با عبارت منظم "^([a-zA-Z0-9]{6,20})$" مطابقت داشته باشد. |
برچسب ها | فهرستی از برچسبهای جدا شده با کاما که توسط پیادهکننده دستگاه انتخاب شدهاند که ساخت را بیشتر متمایز میکند. به عنوان مثال، "unsigned, debug". مقدار این فیلد باید به صورت ASCII 7 بیتی قابل رمزگذاری باشد و با عبارت منظم "^[a-zA-Z0-9.,_-]+$" مطابقت داشته باشد. |
TIME | مقداری که نشاندهنده مُهر زمانی زمان وقوع ساخت است. |
تایپ کنید | مقداری که توسط پیادهکننده دستگاه انتخاب شده و پیکربندی زمان اجرا ساخت را مشخص میکند. این فیلد باید یکی از مقادیر مربوط به سه پیکربندی معمول زمان اجرا اندروید را داشته باشد: "user"، "userdbug"، یا "eng". مقدار این فیلد باید به صورت ASCII 7 بیتی قابل رمزگذاری باشد و با عبارت منظم "^[a-zA-Z0-9.,_-]+$" مطابقت داشته باشد. |
کاربر | نام یا شناسه کاربری کاربر (یا کاربر خودکار) که ساخت را ایجاد کرده است. هیچ الزامی برای قالب خاص این فیلد وجود ندارد، به جز اینکه نباید خالی یا رشته خالی ("") باشد. |
3.2.3. سازگاری قصد
پیادهسازیهای دستگاه باید از سیستم Intent با اتصال شل، همانطور که در بخشهای زیر توضیح داده شده است، احترام بگذارند. منظور از "honored" این است که پیادهکننده دستگاه باید یک فعالیت یا سرویس Android ارائه دهد که فیلتر Intent منطبق را مشخص میکند و به هر الگوی Intent مشخص شده متصل میشود و رفتار صحیح را اجرا میکند.
3.2.3.1. اهداف اصلی برنامه
پروژه upstream اندروید تعدادی برنامه اصلی مانند مخاطبین، تقویم، گالری عکس، پخش کننده موسیقی و غیره را تعریف می کند. پیادهکنندههای دستگاه ممکن است این برنامهها را با نسخههای جایگزین جایگزین کنند.
با این حال، هر گونه نسخه جایگزین باید از همان الگوهای Intent ارائه شده توسط پروژه بالادستی استفاده کند. به عنوان مثال، اگر دستگاهی حاوی یک پخش کننده موسیقی جایگزین باشد، همچنان باید الگوی Intent صادر شده توسط برنامه های شخص ثالث را برای انتخاب آهنگ رعایت کند.
برنامه های زیر به عنوان برنامه های اصلی سیستم اندروید در نظر گرفته می شوند:
- ساعت رومیزی
- مرورگر
- تقویم
- مخاطبین
- گالری
- جستجوی جهانی
- پرتاب کننده
- موسیقی
- تنظیمات
برنامه های اصلی سیستم اندروید شامل اجزای مختلف Activity یا Service هستند که "عمومی" در نظر گرفته می شوند. به این معنی که ویژگی "android:exported" ممکن است وجود نداشته باشد یا مقدار "true" را داشته باشد.
برای هر فعالیت یا سرویسی که در یکی از برنامههای اصلی سیستم Android تعریف شده است و از طریق ویژگی android:exported با مقدار "false" بهعنوان غیرعمومی علامتگذاری نشده است، پیادهسازی دستگاه باید شامل یک جزء از همان نوع باشد که الگوهای فیلتر Intent مشابه برنامه اصلی سیستم Android را اجرا میکند.
به عبارت دیگر، پیاده سازی دستگاه ممکن است جایگزین برنامه های اصلی سیستم اندروید شود. با این حال، اگر چنین باشد، پیادهسازی دستگاه باید از همه الگوهای Intent که توسط هر برنامه اصلی سیستم اندرویدی که جایگزین میشود، پشتیبانی کند.
3.2.3.2. نادیده گرفتن قصد
از آنجایی که Android یک پلتفرم توسعهپذیر است، پیادهسازی دستگاه باید به هر الگوی Intent اشارهشده در بخش 3.2.3.1 اجازه دهد تا توسط برنامههای شخص ثالث لغو شود. اجرای متن باز اندروید بالادستی به طور پیش فرض این امکان را می دهد. پیادهکنندههای دستگاه نباید امتیازات ویژهای را به استفاده برنامههای سیستمی از این الگوهای Intent اختصاص دهند یا از اتصال برنامههای شخص ثالث به این الگوها و کنترل آنها جلوگیری کنند. این ممنوعیت به طور خاص شامل غیرفعال کردن رابط کاربری "انتخاب کننده" است که به کاربر اجازه می دهد بین برنامه های متعددی که همه یک الگوی Intent را مدیریت می کنند، انتخاب کند، اما محدود به آن نمی شود.
با این حال، اگر فعالیت پیشفرض فیلتر مشخصتری برای URI داده ارائه دهد، ممکن است پیادهسازیهای دستگاه، فعالیتهای پیشفرض را برای الگوهای URI خاص (مانند http://play.google.com) ارائه دهند. به عنوان مثال، فیلتر قصدی که URI داده "http://www.android.com" را مشخص می کند، از فیلتر مرورگر برای "http://" خاص تر است. پیادهسازیهای دستگاه باید یک رابط کاربری برای کاربران فراهم کنند تا فعالیت پیشفرض را برای intent تغییر دهند.
3.2.3.3. Intent Namespaces
پیادهسازیهای دستگاه نباید شامل هیچ مؤلفه Android باشد که با استفاده از ACTION، CATEGORY یا رشتههای کلیدی دیگر در فضای نام android.* یا com.android.*، از الگوهای Intent یا Broadcast Intent جدید استفاده میکند. پیادهکنندههای دستگاه نباید دارای اجزای Android باشند که از الگوهای Intent یا Broadcast Intent با استفاده از ACTION، CATEGORY یا رشتههای کلیدی دیگر در فضای بسته متعلق به سازمان دیگری استفاده میکنند. پیادهکنندههای دستگاه نباید هیچ یک از الگوهای Intent را که توسط برنامههای اصلی فهرستشده در بخش 3.2.3.1 استفاده میشود، تغییر داده یا گسترش دهند. پیادهسازیهای دستگاه ممکن است شامل الگوهای Intent با استفاده از فضاهای نام به وضوح و واضح با سازمان خود باشد.
این ممنوعیت مشابه آن چیزی است که برای کلاس های زبان جاوا در بخش 3.6 مشخص شده است.
3.2.3.4. اهداف پخش
برنامه های شخص ثالث برای پخش Intent های خاص به پلتفرم متکی هستند تا تغییرات در محیط سخت افزاری یا نرم افزاری را به آنها اطلاع دهند. دستگاه های سازگار با Android باید Intent های پخش عمومی را در پاسخ به رویدادهای سیستم مناسب پخش کنند. اهداف پخش در مستندات SDK توضیح داده شده است.
3.2.3.5. تنظیمات پیش فرض برنامه
Android 4.4 تنظیماتی را اضافه می کند که به کاربران امکان می دهد برنامه های Home و SMS پیش فرض خود را انتخاب کنند. پیادهسازیهای دستگاه باید یک منوی تنظیمات کاربر مشابه برای هر کدام ارائه دهند، که با الگوی فیلتر Intent و روشهای API که در مستندات SDK توضیح داده شده است، سازگار باشد [ Resources, 91 ].
3.3. سازگاری Native API
3.3.1 رابط های باینری برنامه
کدهای مدیریت شده در حال اجرا در Dalvik می توانند به کد بومی ارائه شده در فایل apk برنامه کاربردی به عنوان یک فایل ELF .so که برای معماری سخت افزاری مناسب دستگاه کامپایل شده است فراخوانی کند. از آنجایی که کد بومی به شدت به فناوری پردازنده اصلی وابسته است، Android تعدادی رابط باینری برنامه (ABIs) را در Android NDK در فایل docs/CPU-ARCH-ABIS.html
تعریف میکند. اگر پیادهسازی دستگاه با یک یا چند ABI تعریفشده سازگار باشد، باید مطابق زیر با Android NDK سازگاری داشته باشد.
اگر پیاده سازی دستگاه شامل پشتیبانی از Android ABI باشد، این موارد:
- باید شامل پشتیبانی از کدهای در حال اجرا در محیط مدیریت شده برای فراخوانی کد بومی، با استفاده از معناشناسی استاندارد Java Native Interface (JNI) باشد.
- باید با منبع سازگار (یعنی سازگار با هدر) و سازگار با دودویی (برای ABI) با هر کتابخانه مورد نیاز در لیست زیر باشد.
- باید از طریق پارامترهای
android.os.Build.CPU_ABI
API وandroid.os.Build.CPU_ABI2
، رابط باینری برنامه (ABI) بومی پشتیبانی شده توسط دستگاه را به طور دقیق گزارش کند. - باید از طریق
android.os.Build.CPU_ABI2
، فقط آن دسته از ABI های مستند شده در آخرین نسخه Android NDK، در فایلdocs/CPU-ARCH-ABIS.html
گزارش شود. - باید از طریق
android.os.Build.CPU_ABI
فقط یکی از ABI های فهرست شده در زیر گزارش شود - armeabi-v7a
- x86
- mips
- باید با استفاده از کد منبع و فایلهای سرصفحه موجود در پروژه منبع باز اندروید بالادست ساخته شود
APIهای کد اصلی زیر باید برای برنامههایی که شامل کد بومی هستند در دسترس باشند:
- libc (کتابخانه C)
- libm (کتابخانه ریاضی)
- حداقل پشتیبانی از C++
- رابط JNI
- liblog (لاگ اندروید)
- libz (فشرده سازی Zlib)
- libdl (پیوند دهنده پویا)
- libGLESv1_CM.so (OpenGL ES 1.0)
- libGLESv2.so (OpenGL ES 2.0)
- libGLESv3.so (OpenGL ES 3.0)
- libEGL.so (مدیریت سطح OpenGL بومی)
- libjnigraphics.so
- libOpenSLES.so (پشتیبانی صوتی OpenSL ES 1.0.1)
- libOpenMAXAL.so (پشتیبانی از OpenMAX AL 1.0.1)
- libandroid.so (پشتیبانی از فعالیت های Android بومی)
- پشتیبانی از OpenGL، همانطور که در زیر توضیح داده شده است
توجه داشته باشید که نسخههای بعدی Android NDK ممکن است از ABIهای اضافی پشتیبانی کند. اگر پیاده سازی دستگاه با ABI از پیش تعریف شده موجود سازگار نباشد، اصلاً نباید پشتیبانی از هیچ ABI را گزارش کند.
توجه داشته باشید که پیادهسازیهای دستگاه باید شامل libGLESv3.so باشد و باید پیوند نمادین (سمبلیک) به libGLESv2.so باشد. در پیادهسازیهای دستگاهی که از OpenGL ES 3.0، libGLESv2.so پشتیبانی میکنند، باید نمادهای تابع OpenGL ES 3.0 را علاوه بر نمادهای عملکرد OpenGL ES 2.0 صادر کنند.
سازگاری کد بومی چالش برانگیز است. به همین دلیل، باید تکرار شود که پیادهکنندههای دستگاه به شدت تشویق میشوند تا از پیادهسازیهای بالادستی کتابخانههای فهرستشده در بالا برای اطمینان از سازگاری استفاده کنند.
3.4. سازگاری وب
3.4.1. سازگاری WebView
اجرای متن باز Android از کد پروژه Chromium برای پیاده سازی android.webkit.WebView
[ منابع، 10 ] استفاده می کند. از آنجایی که امکان توسعه یک مجموعه آزمایشی جامع برای یک سیستم رندر وب وجود ندارد، پیادهکنندگان دستگاه باید از ساخت بالادستی خاص Chromium در پیادهسازی WebView استفاده کنند. به طور مشخص:
- پیادهسازیهای دستگاه
android.webkit.WebView
باید بر اساس ساخت Chromium از پروژه منبع باز Android بالادستی برای Android 4.4 باشد. این ساخت شامل مجموعه خاصی از عملکردها و اصلاحات امنیتی برای WebView است. [ منابع، 83 ] - رشته عامل کاربر گزارش شده توسط WebView باید در این قالب باشد:
Mozilla/5.0 (Linux; Android $(VERSION); $(LOCALE); $(MODEL) Build/$(BUILD)) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 $(CHROMIUM_VER) Mobile Safari/537.36
- مقدار رشته $(VERSION) باید با مقدار
android.os.Build.VERSION.RELEASE
یکسان باشد. - مقدار رشته $(LOCALE) اختیاری است، باید از قوانین ISO برای کد کشور و زبان پیروی کند، و باید به محلی پیکربندی شده فعلی دستگاه اشاره کند. اگر حذف شود، نقطه ویرگول انتهایی نیز باید حذف شود.
- مقدار رشته $(MODEL) باید با مقدار
android.os.Build.MODEL
یکسان باشد. - مقدار رشته $(BUILD) باید با مقدار
android.os.Build.ID
یکسان باشد. - مقدار رشته $(CHROMIUM_VER) باید نسخه Chromium در پروژه منبع باز Android بالادستی باشد.
- پیاده سازی دستگاه ممکن است
Mobile
در رشته عامل کاربر حذف کند.
- مقدار رشته $(VERSION) باید با مقدار
مؤلفه WebView باید تا حد امکان از HTML5 پشتیبانی کند [ منابع، 11 ].
3.4.2. سازگاری مرورگر
پیاده سازی دستگاه باید شامل یک برنامه مرورگر مستقل برای مرور وب کاربر عمومی باشد. ممکن است مرورگر مستقل مبتنی بر فناوری مرورگری غیر از WebKit باشد. با این حال، حتی اگر یک برنامه مرورگر جایگزین استفاده شود، مؤلفه android.webkit.WebView
ارائه شده به برنامه های شخص ثالث باید بر اساس WebKit باشد، همانطور که در بخش 3.4.1 توضیح داده شد.
پیاده سازی ها ممکن است یک رشته عامل کاربر سفارشی را در برنامه مرورگر مستقل ارسال کنند.
برنامه مرورگر مستقل (چه بر اساس برنامه بالادستی مرورگر WebKit یا یک جایگزین شخص ثالث) باید تا حد امکان از HTML5 پشتیبانی کند [ منابع، 11 ]. حداقل، پیاده سازی دستگاه باید از هر یک از این API های مرتبط با HTML5 پشتیبانی کند:
بهعلاوه، پیادهسازیهای دستگاه باید از API ذخیرهسازی وب HTML5/W3C [ منابع، 15 ] پشتیبانی کنند، و باید از HTML5/W3C IndexedDB API [ منابع، 16 ] پشتیبانی کنند. توجه داشته باشید که از آنجایی که نهادهای استاندارد توسعه وب در حال انتقال به سمت ترجیح IndexedDB بر ذخیرهسازی وب هستند، انتظار میرود که IndexedDB به یک جزء ضروری در نسخه آینده اندروید تبدیل شود.
3.5. سازگاری رفتاری API
رفتارهای هر یک از انواع API (مدیریت شده، نرم، بومی و وب) باید با اجرای ترجیحی پروژه منبع باز بالادستی Android مطابقت داشته باشد [ منابع، 3 ]. برخی از زمینه های خاص سازگاری عبارتند از:
- دستگاه ها نباید رفتار یا معنای یک Intent استاندارد را تغییر دهند
- دستگاه ها نباید چرخه عمر یا چرخه حیات معنایی نوع خاصی از اجزای سیستم (مانند سرویس، فعالیت، ارائه دهنده محتوا و غیره) را تغییر دهند.
- دستگاه ها نباید معنای یک مجوز استاندارد را تغییر دهند
لیست فوق جامع نیست. مجموعه تست سازگاری (CTS) بخش های قابل توجهی از پلت فرم را برای سازگاری رفتاری آزمایش می کند، اما نه همه آنها. اطمینان از سازگاری رفتاری با پروژه متن باز اندروید بر عهده مجری است. به همین دلیل، پیادهکنندههای دستگاه باید در صورت امکان از کد منبع موجود از طریق پروژه منبع باز Android استفاده کنند، نه اینکه بخشهای مهمی از سیستم را دوباره پیادهسازی کنند.
3.6. فضاهای نام API
اندروید از قراردادهای فضای نام بسته و کلاس تعریف شده توسط زبان برنامه نویسی جاوا پیروی می کند. برای اطمینان از سازگاری با برنامههای شخص ثالث، پیادهکنندههای دستگاه نباید هیچ گونه تغییر ممنوعه (به زیر را ببینید) در این فضاهای نام بسته ایجاد کنند:
- جاوا.*
- javax.*
- خورشید.*
- اندروید.*
- com.android.*
تغییرات ممنوعه عبارتند از:
- پیادهسازیهای دستگاه نباید با تغییر هر روش یا امضای کلاس، یا با حذف کلاسها یا فیلدهای کلاس، APIهای در معرض عموم در پلتفرم Android را تغییر دهند.
- پیادهکنندههای دستگاه ممکن است پیادهسازی اساسی APIها را تغییر دهند، اما چنین تغییراتی نباید بر رفتار بیانشده و امضای زبان جاوا هر یک از APIهای در معرض عموم تأثیر بگذارد.
- پیادهکنندههای دستگاه نباید هیچ عنصری که بهصورت عمومی در معرض دید قرار میگیرد (مانند کلاسها یا رابطها، یا فیلدها یا روشها به کلاسها یا رابطهای موجود) به APIهای بالا اضافه کنند.
"عنصر در معرض عموم" هر ساختاری است که با نشانگر "@hide" همانطور که در کد منبع بالادست Android استفاده می شود تزئین نشده باشد. به عبارت دیگر، پیادهکنندههای دستگاه نباید APIهای جدید را افشا کنند یا APIهای موجود را در فضاهای نام ذکر شده در بالا تغییر دهند. مجریان دستگاه ممکن است اصلاحات داخلی را ایجاد کنند ، اما این تغییرات نباید تبلیغ شوند یا در غیر این صورت در معرض توسعه دهندگان قرار بگیرند.
مجریان دستگاه ممکن است API های سفارشی را اضافه کنند ، اما هر نوع API نباید در فضای نام متعلق به یا به سازمان دیگری باشد. به عنوان مثال ، مجریان دستگاه نباید API را به Com.Google اضافه کنند.* یا فضای نام مشابه ؛ فقط گوگل ممکن است این کار را انجام دهد. به همین ترتیب ، Google نباید API را به فضای نام شرکت های دیگر اضافه کند. علاوه بر این ، اگر اجرای دستگاه شامل API های سفارشی در خارج از فضای نام استاندارد Android باشد ، آن API ها باید در یک کتابخانه مشترک Android بسته بندی شوند تا فقط برنامه هایی که صریحاً از آنها استفاده می کنند (از طریق مکانیسم <uses-library>
) تحت تأثیر افزایش حافظه از چنین API ها قرار می گیرند.
اگر یک مجری دستگاه پیشنهاد می کند یکی از فضای نام بسته های فوق را بهبود بخشد (مانند اضافه کردن عملکرد جدید مفید به API موجود یا اضافه کردن API جدید) ، مجری باید با توجه به اطلاعات موجود در آن سایت ، به Source.android.com مراجعه کند و روند کار را برای کمک به تغییرات و کد آغاز کند.
توجه داشته باشید که محدودیت های فوق با کنوانسیون های استاندارد برای نامگذاری API ها در زبان برنامه نویسی جاوا مطابقت دارد. این بخش به سادگی با هدف تقویت آن کنوانسیون ها و اتصال آنها از طریق گنجاندن در این تعریف سازگاری انجام می شود.
3.7. سازگاری با ماشین مجازی
پیاده سازی دستگاه باید از مشخصات کامل Dalvik اجرایی (DEX) BYTECODE و معناشناسی دستگاه مجازی Dalvik پشتیبانی کند [ منابع ، 17 ].
پیاده سازی های دستگاه باید Dalvik را پیکربندی کند تا حافظه را مطابق با پلت فرم Android بالادست و مطابق جدول زیر مشخص کند. (به بخش 7.1.1 برای اندازه صفحه و تعاریف تراکم صفحه مراجعه کنید.)
توجه داشته باشید که مقادیر حافظه مشخص شده در زیر حداقل مقادیر در نظر گرفته شده است و اجرای دستگاه ممکن است حافظه بیشتری را در هر برنامه اختصاص دهد.
اندازه صفحه نمایش | تراکم صفحه | حافظه کاربردی |
کوچک / عادی / بزرگ | LDPI / MDPI | 16 مگابایت |
کوچک / عادی / بزرگ | TVDPI / HDPI | 32 مگابایت |
کوچک / عادی / بزرگ | XHDPI | 64 مگابایت |
کوچک / عادی / بزرگ | 400dpi | 96 مگابایت |
کوچک / عادی / بزرگ | xxhdpi | 128 مگابایت |
کوچک / عادی / بزرگ | xxxhdpi | 256 مگابایت |
xlarge | MDPI | 32 مگابایت |
xlarge | TVDPI / HDPI | 64 مگابایت |
xlarge | XHDPI | 128 مگابایت |
xlarge | 400dpi | 192 مگابایت |
xlarge | xxhdpi | 256 مگابایت |
xlarge | xxxhdpi | 512 مگابایت |
3.8. سازگاری رابط کاربری
3.8.1. پرتابگر (صفحه اصلی)
Android شامل یک برنامه پرتاب (صفحه اصلی) و پشتیبانی از برنامه های شخص ثالث برای جایگزینی پرتاب دستگاه (صفحه اصلی) است. پیاده سازی های دستگاه که به برنامه های شخص ثالث اجازه می دهد تا صفحه اصلی دستگاه را جایگزین کند ، باید ویژگی سیستم عامل android.software.home_screen
را اعلام کند.
3.8.2. ابزارک ها
Android یک نوع مؤلفه و API و چرخه حیات مربوطه را تعریف می کند که به برنامه ها اجازه می دهد تا "AppWidget" را در معرض کاربر نهایی قرار دهند [ منابع ، 18 ]. پیاده سازی دستگاه هایی که از ابزارک های تعبیه شده در صفحه اصلی پشتیبانی می کنند باید شرایط زیر را برآورده کرده و پشتیبانی از ویژگی های سیستم عامل android.software.app_widgets
را اعلام کنند.
- پرتاب کننده های دستگاه باید شامل پشتیبانی داخلی برای AppWidgets ، و در معرض هزینه های رابط کاربری برای افزودن ، پیکربندی ، مشاهده و حذف AppWidgets به طور مستقیم در داخل پرتاب قرار بگیرند.
- اجرای دستگاه باید قادر به ارائه ابزارک هایی باشد که در اندازه شبکه استاندارد 4 4 4 باشد. (برای جزئیات بیشتر به دستورالعمل های طراحی ویجت برنامه در اسناد Android SDK [ منابع ، 18 ] مراجعه کنید.
- پیاده سازی دستگاه هایی که شامل پشتیبانی از صفحه قفل هستند باید از ابزارک های برنامه در صفحه قفل پشتیبانی کنند.
3.8.3. اطلاعیه ها
Android شامل API است که به توسعه دهندگان اجازه می دهد تا کاربران را از رویدادهای قابل توجه [ منابع ، 19 ] ، با استفاده از ویژگی های سخت افزار و نرم افزاری دستگاه ، مطلع کنند.
برخی از API ها به برنامه ها اجازه می دهند تا با استفاده از سخت افزار ، به طور خاص صدا ، لرزش و نور ، اعلان ها را انجام دهند یا توجه کنند. اجرای دستگاه باید از اعلان هایی که از ویژگی های سخت افزاری استفاده می کنند ، همانطور که در مستندات SDK توضیح داده شده است ، و تا حد امکان با سخت افزار اجرای دستگاه پشتیبانی کند. به عنوان مثال ، اگر اجرای دستگاه شامل ویبراتور باشد ، باید API های لرزش را به درستی پیاده سازی کند. اگر اجرای دستگاه فاقد سخت افزار باشد ، API های مربوطه باید به عنوان No-Ops اجرا شوند. توجه داشته باشید که این رفتار در بخش 7 بیشتر شرح داده شده است.
علاوه بر این ، اجرای باید به درستی تمام منابع (نمادها ، پرونده های صوتی و غیره) را که در API ها ارائه شده است [ منابع ، 20 ] یا در راهنمای سبک نماد وضعیت/سیستم [ منابع ، 21 ] ارائه دهد. مجریان دستگاه ممکن است تجربه کاربری جایگزین را برای اعلان ها نسبت به آنچه که توسط اجرای منبع باز اندروید ارائه شده است ، ارائه دهند. با این حال ، چنین سیستم های اطلاع رسانی جایگزین باید مانند موارد فوق از منابع اعلان موجود پشتیبانی کنند.
Android شامل پشتیبانی از اعلان های غنی ، مانند دیدگاه های تعاملی برای اعلان های مداوم است. اجرای دستگاه باید به درستی اعلان های غنی را نمایش داده و اجرا کند ، همانطور که در API های Android ثبت شده است.
3.8.4. جستجو کنید
Android شامل API [ منابع ، 22 ] است که به توسعه دهندگان اجازه می دهد تا جستجو را در برنامه های خود بگنجانند و داده های برنامه خود را در جستجوی سیستم جهانی قرار دهند. به طور کلی ، این عملکرد شامل یک رابط کاربری واحد و گسترده است که به کاربران امکان می دهد نمایش داده ها را وارد کنند ، پیشنهادات را به عنوان نوع کاربران نشان می دهد و نتایج را نمایش می دهد. API های Android به توسعه دهندگان اجازه می دهند از این رابط استفاده مجدد کنند تا در برنامه های خود جستجو کنند و به توسعه دهندگان اجازه دهند تا نتایج را به رابط کاربری مشترک جهانی جستجوی ارائه دهند.
پیاده سازی های دستگاه باید شامل یک رابط کاربری جستجوی منفرد ، مشترک و در سطح سیستم باشد که بتواند در پاسخ به ورودی کاربر ، پیشنهادات زمان واقعی را داشته باشد. پیاده سازی دستگاه باید API هایی را که به توسعه دهندگان اجازه می دهد از این رابط کاربری استفاده مجدد کنند تا جستجو را در برنامه های خود انجام دهند ، پیاده سازی کنند. اجرای دستگاه باید API هایی را اجرا کند که به برنامه های شخص ثالث اجازه می دهد تا هنگام اجرای در حالت جستجوی جهانی ، پیشنهادات را به کادر جستجو اضافه کنند. اگر هیچ برنامه شخص ثالث نصب نشده باشد که از این قابلیت استفاده کند ، رفتار پیش فرض برای نمایش نتایج و پیشنهادات موتور جستجوی وب است.
3.8.5. نان تست
برنامه ها می توانند از API "Toast" (تعریف شده در [ منابع ، 23 ]) برای نمایش رشته های غیر معدنی کوتاه به کاربر نهایی استفاده کنند ، که پس از یک دوره زمانی کوتاه ناپدید می شوند. پیاده سازی دستگاه ها باید نان تست را از برنامه های کاربران نهایی به روش دید بالا نشان دهند.
3.8.6. تم ها
Android "مضامین" را به عنوان مکانیسمی برای برنامه های کاربردی در کل یک فعالیت یا برنامه کاربردی ارائه می دهد.
Android شامل یک خانواده تم "Holo" به عنوان مجموعه ای از سبک های تعریف شده برای توسعه دهندگان برنامه در صورت تمایل به مطابقت با موضوع هولو و احساس مطابق با Android SDK [ منابع ، 24 ] است. اجرای دستگاه نباید هیچ یک از ویژگی های تم Holo را در معرض برنامه ها تغییر دهد [ منابع ، 25 ].
Android همچنین شامل یک خانواده تم "پیش فرض دستگاه" به عنوان مجموعه ای از سبک های تعریف شده برای توسعه دهندگان برنامه است که در صورت تمایل با ظاهر و احساس موضوع دستگاه مطابق با مجری دستگاه ، از آنها استفاده می کنند. پیاده سازی دستگاه ممکن است ویژگی های موضوع Devedefault را در معرض برنامه ها تغییر دهد [ منابع ، 25 ].
از نسخه 4.4 ، Android اکنون از یک موضوع جدید با میله های سیستم شفاف پشتیبانی می کند و به توسعه دهندگان برنامه اجازه می دهد تا با محتوای برنامه خود ، منطقه پشت وضعیت و نوار ناوبری را پر کنند. برای فعال کردن یک تجربه سازگار سازگار در این پیکربندی ، مهم است که سبک نماد نوار وضعیت در پیاده سازی های مختلف دستگاه حفظ شود. بنابراین ، اجرای دستگاه Android باید از سفید برای نمادهای وضعیت سیستم (مانند قدرت سیگنال و سطح باتری) و اعلان های صادر شده توسط سیستم استفاده کند ، مگر اینکه نماد نشانگر وضعیت مشکل ساز باشد [ منابع ، 25 ].
3.8.7. تصاویر پس زمینه زنده
Android یک نوع مؤلفه و API و چرخه حیات مربوطه را تعریف می کند که به برنامه ها اجازه می دهد تا یک یا چند "تصاویر پس زمینه زنده" را در معرض کاربر نهایی قرار دهند [ منابع ، 26 ]. تصاویر پس زمینه زنده انیمیشن ها ، الگوهای یا تصاویر مشابه با قابلیت ورودی محدود است که به عنوان یک تصویر زمینه ، در پشت برنامه های دیگر نمایش داده می شود.
اگر بتواند تمام تصاویر پس زمینه زنده را اجرا کند ، بدون هیچ محدودیتی در عملکرد ، در یک فریم و فریمراسیون معقول و بدون تأثیر منفی بر سایر برنامه ها ، سخت افزاری در نظر گرفته می شود. اگر محدودیت در سخت افزار باعث ایجاد تصاویر پس زمینه و/یا برنامه های کاربردی برای خرابی ، نقص عملکرد ، مصرف بیش از حد CPU یا باتری شود ، یا با نرخ فریم غیرقابل قبول اجرا شود ، سخت افزار ناتوان از اجرای تصویر زمینه زنده محسوب می شود. به عنوان نمونه ، برخی از تصاویر پس زمینه زنده ممکن است از زمینه GL 1.0 یا 2.0 باز برای ارائه محتوای خود استفاده کنند. تصویر زمینه زنده به طور قابل اعتماد روی سخت افزاری که از چندین زمینه OpenGL پشتیبانی نمی کند ، اجرا نمی شود زیرا استفاده از تصویر زمینه زنده از یک زمینه OpenGL ممکن است با سایر برنامه هایی که از یک زمینه OpenGL استفاده می کنند ، مغایرت داشته باشد.
پیاده سازی های دستگاه قادر به اجرای تصاویر پس زمینه زنده به طور قابل اعتماد همانطور که در بالا توضیح داده شد باید تصاویر پس زمینه زنده را پیاده سازی کند. پیاده سازی های دستگاه مصمم برای اجرای تصاویر پس زمینه زنده به طور قابل اعتماد همانطور که در بالا توضیح داده شد ، نباید تصاویر پس زمینه زنده را پیاده سازی کند.
3.8.8. نمایشگاه برنامه اخیر
کد منبع بالادست Android شامل یک رابط کاربری برای نمایش برنامه های اخیر با استفاده از تصویر تصویربرداری از وضعیت گرافیکی برنامه در لحظه آخرین کار کاربر از برنامه است. اجرای دستگاه ممکن است این رابط کاربری را تغییر داده یا از بین ببرد. با این حال ، نسخه آینده اندروید برای استفاده گسترده تر از این قابلیت ها برنامه ریزی شده است. پیاده سازی های دستگاه به شدت از استفاده از رابط کاربری آندروید بالادست (یا یک رابط مبتنی بر تصویر کوچک) برای برنامه های اخیر تشویق می شوند ، وگرنه ممکن است با نسخه آینده Android سازگار نباشند.
3.8.9. مدیریت ورودی
Android شامل پشتیبانی از مدیریت ورودی و پشتیبانی از ویرایشگرهای روش ورودی شخص ثالث است. پیاده سازی دستگاه هایی که به کاربران امکان می دهد از روشهای ورودی شخص ثالث در دستگاه استفاده کنند ، باید ویژگی پلتفرم android.software.input_methods
را اعلام کرده و از API های IME پشتیبانی کنند که در اسناد Android SDK تعریف شده است.
پیاده سازی دستگاه هایی که اعلام می کنند ویژگی android.software.input_methods
باید مکانیسم قابل دسترسی کاربر را برای افزودن و پیکربندی روش های ورودی شخص ثالث فراهم کند. اجرای دستگاه باید رابط تنظیمات را در پاسخ به android.settings.INPUT_METHOD_SETTINGS
نشان دهد.
3.8.10. کنترل از راه دور رسانه صفحه قفل
Android شامل پشتیبانی از API کنترل از راه دور است که به برنامه های رسانه ای اجازه می دهد تا با کنترل های پخش که در یک نمای از راه دور مانند صفحه قفل دستگاه نمایش داده می شوند ، ادغام شوند [ منابع ، 74 ]. پیاده سازی دستگاه هایی که از صفحه قفل در دستگاه پشتیبانی می کنند و به کاربران امکان اضافه کردن ویجت ها در صفحه اصلی را می دهند ، باید شامل پشتیبانی از تعبیه کنترل های از راه دور در صفحه قفل دستگاه باشند [ منابع ، 69 ].
3.8.11. رویاها
Android شامل پشتیبانی از صفحه نمایش های تعاملی به نام Dreams [ Resources ، 76 ] است. رویاها به کاربران امکان می دهد در هنگام بیکار بودن دستگاه شارژ ، یا در حوض میز لنگر بزنند ، با برنامه ها ارتباط برقرار کنند. پیاده سازی های دستگاه باید شامل پشتیبانی از رویاها باشد و گزینه تنظیمات را برای کاربران برای پیکربندی رویاها فراهم کند.
3.8.12. مکان
حالت های موقعیت مکانی باید در منوی مکان در تنظیمات نمایش داده شوند [ منابع ، 87 ]. خدمات موقعیت مکانی ارائه شده از طریق SettingInjectorService
معرفی شده در Android 4.4 باید در همان منوی مکان نمایش داده شود [ منابع ، 89 ].
3.8.13. یونیکد
Android 4.4 شامل پشتیبانی از شخصیت های ایموجی رنگی است. پیاده سازی های دستگاه Android باید برای شخصیت های ایموجی تعریف شده در یونیکد 6.1 [ منابع ، 82 ] یک روش ورودی را برای کاربر فراهم کند و باید بتواند این شخصیت های ایموجی را در گلیف رنگی ارائه دهد.
3.9. مدیریت دستگاه
Android شامل ویژگی هایی است که به برنامه های آگاه از امنیت اجازه می دهد تا عملکردهای مدیریت دستگاه را در سطح سیستم انجام دهند ، مانند اجرای خط مشی رمز عبور یا انجام پاکسازی از راه دور ، از طریق API مدیریت دستگاه Android [ منابع ، 27 ]. اجرای دستگاه باید اجرای کلاس DevicePolicyManager
[ منابع ، 28 ] را فراهم کند. پیاده سازی دستگاه هایی که شامل پشتیبانی از صفحه قفل هستند ، باید از طیف کاملی از خط مشی های مدیریت دستگاه تعریف شده در اسناد Android SDK [ منابع ، 27 ] پشتیبانی کنند.
پیاده سازی های دستگاه ممکن است دارای یک برنامه از پیش نصب شده در انجام توابع مدیریت دستگاه باشد اما این برنامه نباید از کادر خارج به عنوان برنامه پیش فرض دستگاه مالک [ منابع ، 84 ] تنظیم شود.
3.10. دسترسی
Android یک لایه دسترسی فراهم می کند که به کاربران دارای معلولیت کمک می کند تا راحت تر دستگاه های خود را حرکت دهند. علاوه بر این ، Android API های پلتفرم را فراهم می کند که اجرای خدمات دسترسی را برای دریافت پاسخ به تماس برای رویدادهای کاربر و سیستم امکان پذیر می کند و مکانیسم های بازخورد متناوب مانند متن به گفتار ، بازخورد هاپتیک و ناوبری Trackball/D-Pad را تولید می کند [ منابع ، 29 ]. اجرای دستگاه باید اجرای چارچوب دسترسی Android را مطابق با اجرای پیش فرض Android ارائه دهد. به طور خاص ، اجرای دستگاه باید شرایط زیر را برآورده کند.
- اجرای دستگاه باید از پیاده سازی خدمات دسترسی به شخص ثالث از طریق API های
android.accessibilityservice
[ منابع ، 30 ] پشتیبانی کند. - پیاده سازی دستگاه ها باید
AccessibilityEvents
ایجاد کرده و این رویدادها را به کلیه پیاده سازی های ثبت شدهAccessibilityService
به روشی متناسب با اجرای پیش فرض Android ارائه دهد. - پیاده سازی های دستگاه باید یک مکانیسم قابل دسترسی کاربر را برای فعال کردن و غیرفعال کردن خدمات دسترسی فراهم کند ، و باید این رابط را در پاسخ به
android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS
هدف نشان دهد.
علاوه بر این ، پیاده سازی دستگاه ها باید اجرای یک سرویس دسترسی به دستگاه را فراهم کند و باید مکانیسمی را برای کاربران فراهم کند تا سرویس دسترسی را هنگام تنظیم دستگاه فعال کنند. اجرای منبع باز از یک سرویس دسترسی از پروژه Free Eyes [ منابع ، 31 ] در دسترس است.
3.11. تبدیل متن به گفتار
Android شامل API هایی است که به برنامه های کاربردی اجازه می دهد از خدمات متن به گفتار (TTS) استفاده کنند و به ارائه دهندگان خدمات اجازه می دهد تا خدمات TTS را ارائه دهند [ منابع ، 32 ]. پیاده سازی دستگاه باید این شرایط مربوط به چارچوب Android TTS را برآورده کند:
- پیاده سازی های دستگاه باید از API های Android TTS Framework پشتیبانی کنند و باید یک موتور TTS را شامل شود که از زبانهای موجود در دستگاه پشتیبانی می کند. توجه داشته باشید که نرم افزار منبع باز آندروید بالادست شامل اجرای موتور کامل TTS است.
- پیاده سازی دستگاه باید از نصب موتورهای TTS شخص ثالث پشتیبانی کند.
- اجرای دستگاه باید یک رابط قابل دسترسی کاربر را فراهم کند که به کاربران امکان می دهد موتور TTS را برای استفاده در سطح سیستم انتخاب کنند.
4. سازگاری بسته بندی برنامه
پیاده سازی های دستگاه باید پرونده های Android ".APK" را که توسط ابزار "AAPT" موجود در SDK رسمی Android ایجاد شده است ، نصب و اجرا کند.
پیاده سازی دستگاه ها نباید از .APK [ منابع ، 34 ] ، آندروید [ منابع ، 35 ] ، Dalvik Bytecode [ منابع ، 17 ] یا فرمت های Bytecode Renderscript را به گونه ای گسترش دهد که مانع از نصب و اجرای صحیح آن پرونده ها بر روی سایر دستگاه های سازگار شود. مجریان دستگاه باید از اجرای بالادست مرجع Dalvik و سیستم مدیریت بسته اجرای مرجع استفاده کنند.
5. سازگاری چندرسانه ای
اجرای دستگاه باید حداقل یک شکل از خروجی صوتی ، مانند بلندگوها ، جک هدفون ، اتصال بلندگو خارجی و غیره را شامل شود.
5.1. کدک های رسانه ای
اجرای دستگاه باید از قالب های اصلی رسانه های مشخص شده در اسناد Android SDK [ منابع ، 58 ] پشتیبانی کند ، به جز مواردی که در این سند صریح مجاز است. به طور خاص ، اجرای دستگاه باید از قالب های رسانه ، رمزگذار ، رمزگشایی ، انواع پرونده و قالب های کانتینر تعریف شده در جداول زیر پشتیبانی کند. همه این کدک ها به عنوان پیاده سازی نرم افزار در اجرای ترجیحی Android از پروژه منبع باز اندروید ارائه شده اند.
لطفاً توجه داشته باشید که نه Google و نه اتحاد گوشی آزاد هیچ گونه نمایشی را ارائه نمی دهند که این کدک ها توسط ثبت اختراعات شخص ثالث بدون کنترل نیستند. به کسانی که قصد استفاده از این کد منبع را در محصولات سخت افزاری یا نرم افزاری دارند ، توصیه می شود که پیاده سازی این کد ، از جمله در نرم افزار منبع باز یا نرم افزار اشتراک گذاری ، ممکن است نیاز به مجوزهای ثبت اختراع از طرف دارندگان ثبت اختراع مربوط داشته باشد.
توجه داشته باشید که این جداول نیازهای خاص بیت را برای اکثر کدک های ویدیویی ذکر نمی کنند زیرا سخت افزار دستگاه فعلی لزوماً از بیت هایی پشتیبانی نمی کند که دقیقاً بر روی بیت های مورد نیاز مشخص شده توسط استانداردهای مربوطه نقشه برداری شود. درعوض ، پیاده سازی دستگاه باید از بالاترین کاربردی Bitrate در سخت افزار ، تا حد تعریف شده توسط مشخصات پشتیبانی کند.
تایپ کنید | قالب / کدک | رمزگذار | رمزگشا | جزئیات | قالب (ها) / قالبهای کانتینر |
---|---|---|---|---|---|
صوتی | پروفایل MPEG-4 AAC (AAC LC) | برای پیاده سازی دستگاه هایی که شامل سخت افزار میکروفون است و android.hardware.microphone را تعریف می کند. | مورد نیاز | پشتیبانی از مونو/استریو/5.0/5.1* محتوای با نرخ نمونه برداری استاندارد از 8 تا 48 کیلوهرتز. |
|
پروفایل MPEG-4 HE AAC (AAC+) | برای پیاده سازی دستگاه هایی که شامل سخت افزار میکروفون است و Android.Hardware.microphone را تعریف می کند | مورد نیاز | پشتیبانی از مونو/استریو/5.0/5.1* با نرخ نمونه برداری استاندارد از 16 تا 48 کیلوهرتز. | ||
پروفایل MPEG-4 HE AAC V2 (پیشرفته AAC+) | مورد نیاز | پشتیبانی از مونو/استریو/5.0/5.1* با نرخ نمونه برداری استاندارد از 16 تا 48 کیلوهرتز. | |||
MPEG-4 Audio Object Type ER AAC ELD (افزایش تأخیر کم AAC) | برای پیاده سازی دستگاه هایی که شامل سخت افزار میکروفون است و Android.Hardware.microphone را تعریف می کند | مورد نیاز | پشتیبانی از محتوای مونو/استریو با نرخ نمونه برداری استاندارد از 16 تا 48 کیلوهرتز. | ||
AMR-NB | برای پیاده سازی دستگاه هایی که شامل سخت افزار میکروفون است و android.hardware.microphone را تعریف می کند. | مورد نیاز | 4.75 تا 12.2 kbps نمونه برداری شده @ 8kHz | 3GPP (.3gp) | |
AMR-WB | برای پیاده سازی دستگاه هایی که شامل سخت افزار میکروفون است و android.hardware.microphone را تعریف می کند. | مورد نیاز | 9 نرخ از 6.60 kbit/s تا 23.85 kbit/s نمونه برداری @ 16kHz | 3GPP (.3gp) | |
FLAC | مورد نیاز (Android 3.1+) | مونو/استریو (بدون چند کاناله). نرخ نمونه تا 48 کیلوهرتز (اما حداکثر 44.1 کیلوهرتز در دستگاه هایی با خروجی 44.1 کیلوهرتز توصیه می شود ، زیرا Downsampler 48 تا 44.1 کیلوهرتز شامل فیلتر کم گذر نیست). 16 بیتی توصیه می شود ؛ هیچ DITH برای 24 بیتی درخواست نکرد. | flac (.flac) فقط | ||
MP3 | مورد نیاز | Mono/Stereo 8-320Kbps ثابت (CBR) یا نرخ بیت متغیر (VBR) | mp3 (.mp3) | ||
MIDI | مورد نیاز | MIDI نوع 0 و 1. DLS نسخه 1 و 2. XMF و موبایل XMF. پشتیبانی از قالب های زنگ RTTTL/RTX ، OTA و IMELODY |
| ||
وربیس | مورد نیاز |
| |||
PCM/موج | مورد نیاز | مورد نیاز | PCM خطی 8 بیتی و 16 بیتی ** (نرخ تا حد سخت افزاری) | موج (.wav) | |
تصویر | JPEG | مورد نیاز | مورد نیاز | پایه+مترقی | JPEG (jpg.) |
GIF | مورد نیاز | gif (.gif) | |||
PNG | مورد نیاز | مورد نیاز | PNG (png.) | ||
BMP | مورد نیاز | BMP (.bmp) | |||
WEBP | مورد نیاز | مورد نیاز | وب (.webp) | ||
ویدیو | H.263 | مورد نیاز برای پیاده سازی دستگاه هایی که شامل سخت افزار دوربین است و android.hardware.camera یا android.hardware.camera.front را تعریف می کند. | مورد نیاز |
| |
H.264 AVC | مورد نیاز برای پیاده سازی دستگاه هایی که شامل سخت افزار دوربین است و android.hardware.camera یا android.hardware.camera.front را تعریف می کند. | مورد نیاز | مشخصات پایه (BP) |
| |
MPEG-4 SP | مورد نیاز | 3GPP (.3gp) | |||
VP8 **** | مورد نیاز (Android 4.3+) | مورد نیاز (Android 2.3.3+) | WebM (.webm) و Matroska (.mkv ، Android 4.0+) *** | ||
VP9 | مورد نیاز (Android 4.4+) | WebM (.webm) و Matroska (.mkv ، Android 4.0+) *** |
- *توجه: فقط Downmix از محتوای 5.0/5.1 لازم است. ضبط یا ارائه بیش از 2 کانال اختیاری است.
- ** توجه: ضبط PCM خطی 16 بیتی اجباری است. ضبط PCM خطی 8 بیتی اجباری نیست.
- *** توجه: اجرای دستگاه باید از نوشتن پرونده های WebM Matroska پشتیبانی کند.
- **** توجه: برای کیفیت قابل قبول پخش ویدیوی وب و خدمات کنفرانس ویدیویی ، اجرای دستگاه باید از کدک سخت افزاری VP8 استفاده کند که مطابق با نیازهای موجود در [ منابع ، 86 ] باشد.
5.2. رمزگذاری ویدیو
پیاده سازی های دستگاه Android که شامل یک دوربین عقب است و android.hardware.camera
باید از پروفایل رمزگذاری ویدیویی H.264 زیر پشتیبانی کند.
SD (کیفیت پایین) | SD (با کیفیت بالا) | HD (هنگامی که توسط سخت افزار پشتیبانی می شود) | |
---|---|---|---|
وضوح تصویر | 176 x 144 px | 480 x 360 px | 1280 x 720 پیکسل |
نرخ فریم ویدیو | 12 فریم بر ثانیه | 30 فریم بر ثانیه | 30 فریم بر ثانیه |
میزان بیت ویدیو | 56 کیلوبیت بر ثانیه | 500 کیلوبیت در ثانیه یا بالاتر | 2 مگابیت در ثانیه یا بالاتر |
کدک صوتی | AAC-LC | AAC-LC | AAC-LC |
کانال های صوتی | 1 (مونو) | 2 (استریو) | 2 (استریو) |
میزان بیت صدا | 24 کیلوبیت بر ثانیه | 128 کیلوبیت بر ثانیه | 192 Kbps |
پیاده سازی های دستگاه Android که شامل یک دوربین پشتی است و android.hardware.camera
را اعلام می کند. Camera باید از پروفایل رمزگذاری ویدیویی VP8 زیر پشتیبانی کند
SD (کیفیت پایین) | SD (با کیفیت بالا) | HD 720p (هنگامی که توسط سخت افزار پشتیبانی می شود) | HD 1080p (هنگامی که توسط سخت افزار پشتیبانی می شود) | |
---|---|---|---|---|
وضوح تصویر | 320 x 180 px | 640 x 360 px | 1280 x 720 پیکسل | 1920 x 1080 پیکسل |
نرخ فریم ویدیو | 30 فریم بر ثانیه | 30 فریم بر ثانیه | 30 فریم بر ثانیه | 30 فریم بر ثانیه |
میزان بیت ویدیو | 800 کیلوبیت بر ثانیه | 2 مگابیت بر ثانیه | 4 مگابیت بر ثانیه | 10 مگابیت بر ثانیه |
5.3. رمزگشایی ویدیو
پیاده سازی دستگاه های Android باید از پروفایل های رمزگشایی ویدیویی VP8 ، VP9 و H.264 زیر پشتیبانی کند. اجرای دستگاه همچنین باید از تعویض وضوح ویدیوی پویا در همان جریان برای کدک های VP8 ، VP9 و H.264 پشتیبانی کند.
SD (کیفیت پایین) | SD (با کیفیت بالا) | HD 720p (هنگامی که توسط سخت افزار پشتیبانی می شود) | HD 1080p (هنگامی که توسط سخت افزار پشتیبانی می شود) | |
---|---|---|---|---|
وضوح تصویر | 320 x 180 px | 640 x 360 px | 1280 x 720 پیکسل | 1920 x 1080 پیکسل |
نرخ فریم ویدیو | 30 فریم بر ثانیه | 30 فریم بر ثانیه | 30 فریم بر ثانیه | 30 فریم بر ثانیه |
میزان بیت ویدیو | 800 کیلوبیت بر ثانیه | 2 مگابیت بر ثانیه | 8 مگابیت بر ثانیه | 20 مگابیت بر ثانیه |
5.4. ضبط صدا
هنگامی که یک برنامه از android.media.AudioRecord
API برای شروع ضبط یک جریان صوتی استفاده کرده است ، پیاده سازی دستگاه هایی که شامل سخت افزار میکروفون است و android.hardware.microphone
را باید با هر یک از این رفتارها نمونه و ضبط کند:
- دستگاه باید دامنه تقریباً مسطح در مقابل ویژگی های فرکانس را نشان دهد. به طور خاص ، 3 دسی بل ، از 100 هرتز تا 4000 هرتز
- حساسیت ورودی صوتی باید به گونه ای تنظیم شود که یک منبع قدرت صدا 90 دسی بل (SPL) در 1000 هرتز RMS از 2500 برای نمونه های 16 بیتی تولید کند.
- سطح دامنه PCM باید به صورت خطی تغییرات SPL ورودی را حداقل در محدوده 30 دسی بل از -18 dB به +12 dB RE 90 dB SPL در میکروفون تغییر دهد.
- اعوجاج هارمونیک کل باید برای 1KHz در سطح ورودی SPL 90 دسی بل کمتر از 1 ٪ باشد.
علاوه بر مشخصات ضبط فوق ، هنگامی که یک برنامه شروع به ضبط یک جریان صوتی با استفاده از android.media.MediaRecorder.AudioSource.VOICE_RECOGNITION
منبع صوتی کرد:
- در صورت وجود ، پردازش کاهش نویز باید غیرفعال شود.
- در صورت وجود ، کنترل افزایش اتوماتیک باید غیرفعال شود.
از Android 4.4 ، android.media.MediaRecorder.AudioSource
کلاس منبع صوتی جدیدی دارد: REMOTE_SUBMIX
. دستگاه ها باید منبع صوتی REMOTE_SUBMIX
به درستی پیاده سازی کنند به گونه ای که وقتی یک برنامه از android.media.AudioRecord
API استفاده می کند تا از این منبع صوتی ضبط کند ، می تواند ترکیبی از همه جریان های صوتی را به جز موارد زیر ضبط کند:
-
STREAM_RING
-
STREAM_ALARM
-
STREAM_NOTIFICATION
توجه: در حالی که برخی از الزامات ذکر شده در بالا به عنوان "باید" از زمان Android 4.3 بیان شده است ، تعریف سازگاری برای نسخه آینده برای تغییر این موارد به "باید" برنامه ریزی شده است. یعنی این الزامات در Android 4.4 اختیاری است اما توسط نسخه آینده مورد نیاز خواهد بود . دستگاه های موجود و جدید که Android را اجرا می کنند ، به شدت برای برآورده کردن این الزامات تشویق می شوند ، یا در صورت بروزرسانی به نسخه آینده قادر به دستیابی به سازگاری اندرویدی نخواهند بود.
اگر این پلتفرم از فن آوری های سرکوب سر و صدای تنظیم شده برای تشخیص گفتار پشتیبانی کند ، این اثر باید از android.media.audiofx.NoiseSuppressor
API قابل کنترل باشد. علاوه بر این ، زمینه "UUID" برای توصیف کننده اثر سرکوبگر سر و صدا باید به طور منحصر به فرد هر اجرای فناوری سرکوب سر و صدا را شناسایی کند.
5.5. تأخیر صوتی
تأخیر صوتی تأخیر زمان است زیرا یک سیگنال صوتی از یک سیستم عبور می کند. برای دستیابی به جلوه های صوتی در زمان واقعی ، بسیاری از کلاس های برنامه ها به تأخیر کوتاه متکی هستند.
برای اهداف این بخش:
- "تأخیر خروجی" به عنوان فاصله بین زمانی تعریف می شود که یک برنامه یک قاب از داده های کد شده PCM را می نویسد و هنگامی که صدای مربوطه توسط یک شنونده خارجی قابل شنیدن است یا توسط یک مبدل مشاهده می شود
- "تأخیر خروجی سرد" به عنوان تأخیر خروجی برای اولین قاب تعریف می شود ، هنگامی که سیستم خروجی صوتی قبل از درخواست بیکار بوده و از آن استفاده می شود
- "تأخیر در خروجی مداوم" به عنوان تأخیر خروجی برای فریم های بعدی تعریف می شود ، پس از اینکه دستگاه در حال پخش صوتی است
- "تأخیر ورودی" فاصله بین زمانی است که صدای خارجی به دستگاه ارائه می شود و هنگامی که یک برنامه قاب مربوطه داده های کد شده PCM را می خواند
- "تأخیر ورودی سرد" به عنوان مجموع زمان ورودی از دست رفته و تأخیر ورودی برای اولین قاب تعریف می شود ، هنگامی که سیستم ورودی صوتی قبل از درخواست بیکار بوده و از آن استفاده می کند
- "تأخیر ورودی مداوم" به عنوان تأخیر ورودی برای فریم های بعدی تعریف شده است ، در حالی که دستگاه در حال حاضر ضبط صوتی است
- "OpenSl ES PCM Buffer Queue API" مجموعه ای از API های OpenSL ES مربوط به PCM در Android NDK است. به ndk_root
/docs/opensles/index.html
مراجعه کنید
در هر بخش 5 ، کلیه پیاده سازی های دستگاه سازگار باید حداقل یک شکل از خروجی صوتی را شامل شود. اجرای دستگاه باید این شرایط تأخیر در خروجی را برآورده یا فراتر رود:
- تأخیر خروجی سرد 100 میلی ثانیه یا کمتر
- تأخیر مداوم خروجی 45 میلی ثانیه یا کمتر
اگر اجرای دستگاه پس از هرگونه کالیبراسیون اولیه هنگام استفاده از API OpenSL ES PCM بافر API ، نیازهای این بخش را برآورده کند ، برای تأخیر مداوم خروجی و تأخیر در خروجی سرد حداقل یک دستگاه خروجی صوتی پشتیبانی شده ، ممکن است با گزارش ویژگی " android.content.pm.PackageManager
. [ منابع ، 37 ] برعکس ، اگر اجرای دستگاه این الزامات را برآورده نکند ، نباید از پشتیبانی از صدای کم تأخیر خبر دهد.
در هر بخش 7.2.5 ، سخت افزار میکروفون ممکن است با اجرای دستگاه حذف شود.
پیاده سازی دستگاه هایی که شامل سخت افزار میکروفون است و android.hardware.microphone
باید این شرایط تأخیر صوتی ورودی را برآورده کند:
- تأخیر ورودی سرد 100 میلی ثانیه یا کمتر
- تأخیر مداوم ورودی 50 میلی ثانیه یا کمتر
5.6. پروتکل های شبکه
دستگاه ها باید از پروتکل های شبکه رسانه ای برای پخش صوتی و تصویری همانطور که در اسناد Android SDK مشخص شده است پشتیبانی کنند [ منابع ، 58 ]. به طور خاص ، دستگاه ها باید از پروتکل های شبکه رسانه زیر پشتیبانی کنند:
- RTSP (RTP ، SDP)
- HTTP (ها) جریان مترقی
- HTTP (S) پیش نویس پروتکل پخش مستقیم ، نسخه 3 [ منابع ، 59 ]
6. ابزارهای توسعه دهنده و سازگاری گزینه ها
6.1. ابزارهای توسعه دهنده
پیاده سازی دستگاه باید از ابزارهای توسعه دهنده Android ارائه شده در Android SDK پشتیبانی کند. به طور خاص ، دستگاه های سازگار با اندرویدی باید با:
- Bridge Debug Android (معروف به ADB) [ منابع ، 33 ]
پیاده سازی دستگاه باید از کلیه عملکردهایadb
مطابق مستندات Android SDK پشتیبانی کند. Daemonadb
در سمت دستگاه باید به طور پیش فرض غیرفعال باشد و برای روشن کردن پل اشکال زدایی اندرویدی باید یک مکانیسم قابل دسترسی کاربر وجود داشته باشد. - Android شامل پشتیبانی از ADB ایمن است. Secure ADB ADB را در میزبان های معتبر شناخته شده فعال می کند. پیاده سازی دستگاه باید از ADB ایمن پشتیبانی کند.
- سرویس مانیتور اشکال زدایی Dalvik (معروف به DDMS) [ منابع ، 33 ]
پیاده سازی دستگاه باید از تمام ویژگی هایddms
همانطور که در Android SDK ثبت شده است ، پشتیبانی کند. از آنجا کهddms
adb
استفاده می کند ، پشتیبانی ازddms
باید به طور پیش فرض غیرفعال باشد ، اما هر زمان که کاربر پل اشکال زدایی اندرویدی را فعال کرده باشد ، باید پشتیبانی شود. - میمون [ منابع ، 36 ]
پیاده سازی های دستگاه باید شامل چارچوب میمون باشد و آن را برای استفاده از برنامه ها در دسترس قرار دهد. - Systrace [ منابع ، 33 ]
پیاده سازی های دستگاه باید از ابزار Systrace همانطور که در Android SDK ثبت شده است ، پشتیبانی کند. Systrace باید به طور پیش فرض غیرفعال باشد و برای روشن کردن Systrace باید یک مکانیسم قابل دسترسی کاربر وجود داشته باشد.
بیشتر سیستم های مبتنی بر لینوکس و سیستم های اپل مکینتاش دستگاه های Android را با استفاده از ابزارهای استاندارد SDK Android ، بدون پشتیبانی اضافی ، تشخیص می دهند. با این حال سیستم های ویندوز مایکروسافت به طور معمول به درایور دستگاه های جدید Android نیاز دارند. (به عنوان مثال ، شناسه های جدید فروشنده و گاهی اوقات شناسه های دستگاه جدید نیاز به درایور USB سفارشی برای سیستم های ویندوز دارند.) اگر اجرای دستگاه توسط ابزار adb
مطابق با استاندارد Android SDK شناخته نشده باشد ، مجریان دستگاه باید درایورهای ویندوز را فراهم کنند که به توسعه دهندگان اجازه می دهند با استفاده از پروتکل adb
به دستگاه متصل شوند. این درایورها باید در هر دو نسخه 32 بیتی و 64 بیتی برای ویندوز XP ، ویندوز ویستا ، ویندوز 7 و ویندوز 8 تهیه شوند.
6.2. گزینه های توسعه دهنده
Android شامل پشتیبانی از توسعه دهندگان برای پیکربندی تنظیمات مربوط به توسعه برنامه است. پیاده سازی های دستگاه باید از Android.settings.Application_Development_settings قصد نشان دادن تنظیمات مربوط به توسعه برنامه [ منابع ، 77 ] را احترام بگذارد. اجرای بالادست Android منوی گزینه های توسعه دهنده را به طور پیش فرض پنهان می کند و کاربران را قادر می سازد پس از فشار دادن هفت (7) بار در تنظیمات> درباره دستگاه> ساخت منوی شماره ، گزینه های توسعه دهنده را راه اندازی کنند. پیاده سازی دستگاه باید یک تجربه مداوم را برای گزینه های توسعه دهنده فراهم کند. به طور خاص ، اجرای دستگاه باید گزینه های توسعه دهنده را به طور پیش فرض مخفی کند و باید مکانیسمی را فراهم کند تا گزینه های توسعه دهنده سازگار با اجرای Android بالادست را فعال کند.
6.2.1. تجربی
Android 4.4 ART را معرفی می کند ، یک زمان اجرا آزمایشی Android ، در منوی گزینه های توسعه دهنده برای پیش نمایش قابل دسترسی است. پیاده سازی های دستگاه باید شامل ART (libart.so) و پشتیبانی از بوت دوگانه از گزینه های توسعه دهنده باشد ، اما باید Dalvik (libdvm.so) را به عنوان زمان پیش فرض نگه دارد.
7. سازگاری سخت افزار
اگر یک دستگاه شامل یک مؤلفه سخت افزار خاص باشد که دارای API مربوطه برای توسعه دهندگان شخص ثالث باشد ، اجرای دستگاه باید آن API را مطابق با اسناد Android SDK اجرا کند. اگر یک API در SDK با یک مؤلفه سخت افزاری که گفته می شود اختیاری است و اجرای دستگاه دارای آن مؤلفه نیست:
- تعاریف کلاس کامل (همانطور که توسط SDK مستند شده است) برای API های مؤلفه هنوز هم باید موجود باشد
- رفتارهای API باید به صورت غیر معقول به عنوان No-Ops اجرا شود
- روشهای API باید مقادیر تهی را در جایی که توسط مستندات SDK مجاز است بازگرداند
- روشهای API باید اجرای NO-OP کلاس ها را بازگرداند که مقادیر تهی توسط مستندات SDK مجاز نیستند
- روشهای API نباید استثنائاتی را که توسط مستندات SDK ثبت نشده است ، پرتاب کند
نمونه بارز سناریویی که این الزامات در آن اعمال می شود API تلفنی است: حتی در دستگاه های غیر تلفن ، این API ها باید به عنوان No-Ops معقول اجرا شوند.
پیاده سازی های دستگاه باید اطلاعات دقیق پیکربندی سخت افزار را از طریق روش های getSystemAvailableFeatures()
و hasSystemFeature(String)
در کلاس android.content.pm.PackageManager
گزارش دهند. [ منابع ، 37 ]
7.1. نمایش و گرافیک
Android شامل امکاناتی است که به طور خودکار دارایی های برنامه و طرح های UI را به طور مناسب برای دستگاه تنظیم می کند تا اطمینان حاصل شود که برنامه های شخص ثالث به خوبی در انواع تنظیمات سخت افزاری اجرا می شوند [ منابع ، 38 ]. دستگاه ها باید به طور صحیح این API ها و رفتارها را اجرا کنند ، همانطور که در این بخش شرح داده شده است.
واحدهای ارجاع شده توسط الزامات موجود در این بخش به شرح زیر است:
- "اندازه مورب فیزیکی" فاصله اینچ بین دو گوشه مخالف قسمت روشن شده صفحه نمایش است.
- "DPI" (به معنی "نقاط در هر اینچ") تعداد پیکسل های موجود توسط یک دهانه افقی یا عمودی خطی 1 "است.
- "نسبت ابعاد" نسبت ابعاد طولانی تر صفحه به بعد کوتاه تر است. به عنوان مثال ، نمایشگر 480x854 پیکسل 854 /480 = 1.779 یا تقریباً "16: 9" خواهد بود.
- "پیکسل مستقل از چگالی" یا ("DP") واحد پیکسل مجازی است که به صفحه 160 dpi نرمال می شود ، به صورت:
pixels = dps * (density / 160)
محاسبه می شود.
7.1.1. پیکربندی صفحه نمایش
اندازه صفحه نمایش
The Android UI framework supports a variety of different screen sizes, and allows applications to query the device screen size (aka "screen layout") via android.content.res.Configuration.screenLayout
with the SCREENLAYOUT_SIZE_MASK
. Device implementations MUST report the correct screen size as defined in the Android SDK documentation [ Resources, 38 ] and determined by the upstream Android platform. Specifically, device implementations must report the correct screen size according to the following logical density-independent pixel (dp) screen dimensions.
- Devices MUST have screen sizes of at least 426 dp x 320 dp ('small')
- Devices that report screen size 'normal' MUST have screen sizes of at least 480 dp x 320 dp
- Devices that report screen size 'large' MUST have screen sizes of at least 640 dp x 480 dp
- Devices that report screen size 'xlarge' MUST have screen sizes of at least 960 dp x 720 dp
In addition, devices MUST have screen sizes of at least 2.5 inches in physical diagonal size.
Devices MUST NOT change their reported screen size at any time.
Applications optionally indicate which screen sizes they support via the <supports-screens>
attribute in the AndroidManifest.xml file. Device implementations MUST correctly honor applications' stated support for small, normal, large, and xlarge screens, as described in the Android SDK documentation.
Screen Aspect Ratio
The aspect ratio MUST be a value from 1.3333 (4:3) to 1.86 (roughly 16:9)
Screen Density
The Android UI framework defines a set of standard logical densities to help application developers target application resources. Device implementations MUST report one of the following logical Android framework densities through the android.util.DisplayMetrics
APIs, and MUST execute applications at this standard density.
- 120 dpi, known as 'ldpi'
- 160 dpi, known as 'mdpi'
- 213 dpi, known as 'tvdpi'
- 240 dpi, known as 'hdpi'
- 320 dpi, known as 'xhdpi'
- 400 dpi, known as '400dpi'
- 480 dpi, known as 'xxhdpi'
- 640 dpi, known as 'xxxhdpi'
7.1.2. Display Metrics
Device implementations MUST report correct values for all display metrics defined in android.util.DisplayMetrics
[ Resources, 39 ].
7.1.3. جهت صفحه نمایش
Devices MUST support dynamic orientation by applications to either portrait or landscape screen orientation. That is, the device must respect the application's request for a specific screen orientation. Device implementations MAY select either portrait or landscape orientation as the default.
Devices MUST report the correct value for the device's current orientation, whenever queried via the android.content.res.Configuration.orientation, android.view.Display.getOrientation(), or other APIs.
Devices MUST NOT change the reported screen size or density when changing orientation.
Devices MUST report which screen orientations they support ( android.hardware.screen.portrait
and/or android.hardware.screen.landscape
) and MUST report at least one supported orientation. For example, a device with a fixed-orientation landscape screen, such as a television or laptop, MUST only report android.hardware.screen.landscape
.
7.1.4. 2D and 3D Graphics Acceleration
Device implementations MUST support both OpenGL ES 1.0 and 2.0, as embodied and detailed in the Android SDK documentations. Device implementations SHOULD support OpenGL ES 3.0 on devices capable of supporting OpenGL ES 3.0. Device implementations MUST also support Android Renderscript, as detailed in the Android SDK documentation [ Resources, 8 ].
Device implementations MUST also correctly identify themselves as supporting OpenGL ES 1.0, OpenGL ES 2.0, or OpenGL ES 3.0. یعنی:
- The managed APIs (such as via the
GLES10.getString()
method) MUST report support for OpenGL ES 1.0 and OpenGL ES 2.0 - The native C/C++ OpenGL APIs (that is, those available to apps via libGLES_v1CM.so, libGLES_v2.so, or libEGL.so) MUST report support for OpenGL ES 1.0 and OpenGL ES 2.0.
- Device implementations that declare support for OpenGL ES 3.0 MUST support OpenGL ES 3.0 managed APIs and include support for native C/C++ APIs. On device implementations that declare support for OpenGL ES 3.0, libGLESv2.so MUST export the OpenGL ES 3.0 function symbols in addition to the OpenGL ES 2.0 function symbols.
Device implementations MAY implement any desired OpenGL ES extensions. However, device implementations MUST report via the OpenGL ES managed and native APIs all extension strings that they do support, and conversely MUST NOT report extension strings that they do not support.
Note that Android includes support for applications to optionally specify that they require specific OpenGL texture compression formats. These formats are typically vendor-specific. Device implementations are not required by Android to implement any specific texture compression format. However, they SHOULD accurately report any texture compression formats that they do support, via the getString()
method in the OpenGL API.
Android includes a mechanism for applications to declare that they wanted to enable hardware acceleration for 2D graphics at the Application, Activity, Window or View level through the use of a manifest tag android:hardwareAccelerated
or direct API calls [ Resources, 9 ].
In Android 4.4, device implementations MUST enable hardware acceleration by default, and MUST disable hardware acceleration if the developer so requests by setting android:hardwareAccelerated="false"
or disabling hardware acceleration directly through the Android View APIs.
In addition, device implementations MUST exhibit behavior consistent with the Android SDK documentation on hardware acceleration [ Resources, 9 ].
Android includes a TextureView
object that lets developers directly integrate hardware-accelerated OpenGL ES textures as rendering targets in a UI hierarchy. Device implementations MUST support the TextureView
API, and MUST exhibit consistent behavior with the upstream Android implementation.
Android includes support for EGL_ANDROID_RECORDABLE
, a EGLConfig attribute that indicates whether the EGLConfig supports rendering to an ANativeWindow that records images to a video. Device implementations MUST support EGL_ANDROID_RECORDABLE
extension [ Resources, 79 ].
7.1.5. Legacy Application Compatibility Mode
Android specifies a "compatibility mode" in which the framework operates in an 'normal' screen size equivalent (320dp width) mode for the benefit of legacy applications not developed for old versions of Android that pre-date screen-size independence. Device implementations MUST include support for legacy application compatibility mode as implemented by the upstream Android open source code. That is, device implementations MUST NOT alter the triggers or thresholds at which compatibility mode is activated, and MUST NOT alter the behavior of the compatibility mode itself.
7.1.6. Screen Types
Device implementation screens are classified as one of two types:
- Fixed-pixel display implementations: the screen is a single panel that supports only a single pixel width and height. Typically the screen is physically integrated with the device. Examples include mobile phones, tablets, and so on.
- Variable-pixel display implementations: the device implementation either has no embedded screen and includes a video output port such as VGA, HDMI or a wireless port for display, or has an embedded screen that can change pixel dimensions. Examples include televisions, set-top boxes, and so on.
Fixed-Pixel Device Implementations
Fixed-pixel device implementations MAY use screens of any pixel dimensions, provided that they meet the requirements defined this Compatibility Definition.
Fixed-pixel implementations MAY include a video output port for use with an external display. However, if that display is ever used for running apps, the device MUST meet the following requirements:
- The device MUST report the same screen configuration and display metrics, as detailed in Sections 7.1.1 and 7.1.2, as the fixed-pixel display.
- The device MUST report the same logical density as the fixed-pixel display.
- The device MUST report screen dimensions that are the same as, or very close to, the fixed-pixel display.
For example, a tablet that is 7" diagonal size with a 1024x600 pixel resolution is considered a fixed-pixel large mdpi display implementation. If it contains a video output port that displays at 720p or 1080p the device implementation MUST scale the output so that applications are only executed in a large mdpi window, regardless of whether the fixed-pixel display or video output port is in use.
Variable-Pixel Device Implementations
Variable-pixel device implementations MUST support at least one of 1280x720, 1920x1080, or 3840x2160 (that is, 720p, 1080p, or 4K). Device implementations with variable-pixel displays MUST NOT support any other screen configuration or mode. Device implementations with variable-pixel screens MAY change screen configuration or mode at runtime or boot-time. For example, a user of a set-top box may replace a 720p display with a 1080p display, and the device implementation may adjust accordingly.
Additionally, variable-pixel device implementations MUST report the following configuration buckets for these pixel dimensions:
- 1280x720 (also known as 720p): 'large' screen size, 'tvdpi' (213 dpi) density
- 1920x1080 (also known as 1080p): 'large' screen size, 'xhdpi' (320 dpi) density
- 3840x2160 (also known as 4K): 'large' screen size, 'xxxhdpi' (640 dpi) density
For clarity, device implementations with variable pixel dimensions are restricted to 720p, 1080p, or 4K in Android 4.4, and MUST be configured to report screen size and density buckets as noted above.
7.1.7. فناوری صفحه نمایش
The Android platform includes APIs that allow applications to render rich graphics to the display. Devices MUST support all of these APIs as defined by the Android SDK unless specifically allowed in this document. به طور مشخص:
- Devices MUST support displays capable of rendering 16-bit color graphics and SHOULD support displays capable of 24-bit color graphics.
- Devices MUST support displays capable of rendering animations.
- The display technology used MUST have a pixel aspect ratio (PAR) between 0.9 and 1.1. That is, the pixel aspect ratio MUST be near square (1.0) with a 10% tolerance.
7.1.8. External Displays
Android includes support for secondary display to enable media sharing capabilities and developer APIs for accessing external displays. If a device supports an external display either via a wired, wireless or an embedded additional display connection then the device implementation MUST implement the display manager API as described in the Android SDK documentation [ Resources, 75 ]. Device implementations that support secure video output and are capable of supporting secure surfaces MUST declare support for Display.FLAG_SECURE
. Specifically, device implementations that declare support for Display.FLAG_SECURE
, MUST support HDCP 2.x or higher for Miracast wireless displays or HDCP 1.2 or higher for wired displays. The upstream Android open source implementation includes support for wireless (Miracast) and wired (HDMI) displays that satisfies this requirement.
7.2. دستگاه های ورودی
7.2.1. صفحه کلید
Device implementations:
- MUST include support for the Input Management Framework (which allows third party developers to create Input Management Engines - ie soft keyboard) as detailed at http://developer.android.com
- MUST provide at least one soft keyboard implementation (regardless of whether a hard keyboard is present)
- MAY include additional soft keyboard implementations
- MAY include a hardware keyboard
- MUST NOT include a hardware keyboard that does not match one of the formats specified in
android.content.res.Configuration.keyboard
[ Resources, 40 ] (that is, QWERTY, or 12-key)
7.2.2. Non-touch Navigation
Device implementations:
- MAY omit a non-touch navigation option (that is, may omit a trackball, d-pad, or wheel)
- MUST report the correct value for
android.content.res.Configuration.navigation
[ Resources, 40 ] - MUST provide a reasonable alternative user interface mechanism for the selection and editing of text, compatible with Input Management Engines. The upstream Android open source implementation includes a selection mechanism suitable for use with devices that lack non-touch navigation inputs.
7.2.3. کلیدهای ناوبری
The Home, Recents and Back functions are essential to the Android navigation paradigm. Device implementations MUST make these functions available to the user at all times when running applications. These functions MAY be implemented via dedicated physical buttons (such as mechanical or capacitive touch buttons), or MAY be implemented using dedicated software keys on a distinct portion of the screen, gestures, touch panel, etc. Android supports both implementations. All of these functions MUST be accessible with a single action (eg tap, double-click or gesture) when visible.
The Back and Recents functions SHOULD have a visible button or icon unless hidden together with other navigation functions in full-screen mode. The Home function MUST have a visible button or icon unless hidden together with other navigation functions in full-screen mode.
The Menu function is deprecated in favor of action bar since Android 4.0. Device implementations SHOULD NOT implement a dedicated physical button for the Menu function. If the physical Menu button is implemented and the device is running applications with targetSdkVersion
> 10, the device implementation:
- for a device launching with Android 4.4, MUST display the action overflow button on the action bar when the action bar is visible and the resulting action overflow menu popu is not empty.
- for an existing device launched with an earlier version but upgrading to Android 4.4, SHOULD display the action overflow button on the action bar when the action bar is visible and the resulting action overflow menu popup is not empty.
- MUST NOT modify the position of the action overflow popup displayed by selecting the overflow button in the action bar.
- MAY render the action overflow popup at a modified position on the screen when it is displayed by selecting the physical menu button.
For backwards compatibility, device implementations MUST make available the Menu function to applications when targetSdkVersion
<= 10, either by a physical button, a software key or gestures. This Menu function should be presented unless hidden together with other navigation functions.
Android supports Assist action [ Resources, 63 ]. Device implementations MUST make the Assist action available to the user at all times when running applications. The Assist action SHOULD be implemented as a long-press on the Home button or a swipe-up gesture on the software Home key. This function MAY be implemented via another physical button, software key or gestures, but MUST be accessible with a single action (eg tap, double-click or gesture) when other navigation keys are visible.
Device implementations MAY use a distinct portion of the screen to display the navigation keys, but if so, MUST meet these requirements:
- Device implementation navigation keys MUST use a distinct portion of the screen, not available to applications, and MUST NOT obscure or otherwise interfere with the portion of the screen available to applications.
- Device implementations MUST make available a portion of the display to applications that meets the requirements defined in Section 7.1.1 .
- Device implementations MUST display the navigation keys when applications do not specify a system UI mode, or specify
SYSTEM_UI_FLAG_VISIBLE
. - Device implementations MUST present the navigation keys in an unobtrusive "low profile" (eg. dimmed) mode when applications specify
SYSTEM_UI_FLAG_LOW_PROFILE
. - Device implementations MUST hide the navigation keys when applications specify
SYSTEM_UI_FLAG_HIDE_NAVIGATION
.
7.2.4. Touchscreen input
Device implementations SHOULD have a pointer input system of some kind (either mouse-like, or touch). However, if a device implementation does not support a pointer input system, it MUST NOT report the android.hardware.touchscreen
or android.hardware.faketouch
feature constant. Device implementations that do include a pointer input system:
- SHOULD support fully independently tracked pointers, if the device input system supports multiple pointers
- MUST report the value of
android.content.res.Configuration.touchscreen
[ Resources, 40 ] corresponding to the type of the specific touchscreen on the device
Android includes support for a variety of touch screens, touch pads, and fake touch input devices. Touch screen based device implementations are associated with a display [ Resources, 81 ] such that the user has the impression of directly manipulating items on screen. Since the user is directly touching the screen, the system does not require any additional affordances to indicate the objects being manipulated. In contrast, a fake touch interface provides a user input system that approximates a subset of touchscreen capabilities. For example, a mouse or remote control that drives an on-screen cursor approximates touch, but requires the user to first point or focus then click. Numerous input devices like the mouse, trackpad, gyro-based air mouse, gyro-pointer, joystick, and multi-touch trackpad can support fake touch interactions. Android 4.0 includes the feature constant android.hardware.faketouch
, which corresponds to a high-fidelity non-touch (that is, pointer-based) input device such as a mouse or trackpad that can adequately emulate touch-based input (including basic gesture support), and indicates that the device supports an emulated subset of touchscreen functionality. Device implementations that declare the fake touch feature MUST meet the fake touch requirements in Section 7.2.5 .
Device implementations MUST report the correct feature corresponding to the type of input used. Device implementations that include a touchscreen (single-touch or better) MUST report the platform feature constant android.hardware.touchscreen
. Device implementations that report the platform feature constant android.hardware.touchscreen
MUST also report the platform feature constant android.hardware.faketouch
. Device implementations that do not include a touchscreen (and rely on a pointer device only) MUST NOT report any touchscreen feature, and MUST report only android.hardware.faketouch
if they meet the fake touch requirements in Section 7.2.5 .
7.2.5. Fake touch input
Device implementations that declare support for android.hardware.faketouch
- MUST report the absolute X and Y screen positions of the pointer location and display a visual pointer on the screen [ Resources, 80 ]
- MUST report touch event with the action code [ Resources, 80 ] that specifies the state change that occurs on the pointer going
down
orup
on the screen [ Resources, 80 ] - MUST support pointer
down
andup
on an object on the screen, which allows users to emulate tap on an object on the screen - MUST support pointer
down
, pointerup
, pointerdown
then pointerup
in the same place on an object on the screen within a time threshold, which allows users to emulate double tap on an object on the screen [ Resources, 80 ] - MUST support pointer
down
on an arbitrary point on the screen, pointer move to any other arbitrary point on the screen, followed by a pointerup
, which allows users to emulate a touch drag - MUST support pointer
down
then allow users to quickly move the object to a different position on the screen and then pointerup
on the screen, which allows users to fling an object on the screen
Devices that declare support for android.hardware.faketouch.multitouch.distinct
MUST meet the requirements for faketouch above, and MUST also support distinct tracking of two or more independent pointer inputs.
7.2.6. میکروفون
Device implementations MAY omit a microphone. However, if a device implementation omits a microphone, it MUST NOT report the android.hardware.microphone
feature constant, and must implement the audio recording API as no-ops, per Section 7 . Conversely, device implementations that do possess a microphone:
- MUST report the
android.hardware.microphone
feature constant - SHOULD meet the audio quality requirements in Section 5.4
- SHOULD meet the audio latency requirements in Section 5.5
7.3. حسگرها
Android includes APIs for accessing a variety of sensor types. Devices implementations generally MAY omit these sensors, as provided for in the following subsections. If a device includes a particular sensor type that has a corresponding API for third-party developers, the device implementation MUST implement that API as described in the Android SDK documentation. For example, device implementations:
- MUST accurately report the presence or absence of sensors per the
android.content.pm.PackageManager
class. [ Resources, 37 ] - MUST return an accurate list of supported sensors via the
SensorManager.getSensorList()
and similar methods - MUST behave reasonably for all other sensor APIs (for example, by returning true or false as appropriate when applications attempt to register listeners, not calling sensor listeners when the corresponding sensors are not present; etc.)
- MUST report all sensor measurements using the relevant International System of Units (ie metric) values for each sensor type as defined in the Android SDK documentation [ Resources, 41 ]
The list above is not comprehensive; the documented behavior of the Android SDK is to be considered authoritative.
Some sensor types are synthetic, meaning they can be derived from data provided by one or more other sensors. (Examples include the orientation sensor, and the linear acceleration sensor.) Device implementations SHOULD implement these sensor types, when they include the prerequisite physical sensors.
Android includes a notion of a "streaming" sensor, which is one that returns data continuously, rather than only when the data changes. Device implementations MUST continuously provide periodic data samples for any API indicated by the Android SDK documentation to be a streaming sensor. Note that the device implementations MUST ensure that the sensor stream must not prevent the device CPU from entering a suspend state or waking up from a suspend state.
7.3.1. شتاب سنج
Device implementations SHOULD include a 3-axis accelerometer. If a device implementation does include a 3-axis accelerometer, it:
- SHOULD be able to deliver events at 120 Hz or greater. Note that while the accelerometer frequency above is stated as "SHOULD" for Android 4.4, the Compatibility Definition for a future version is planned to change these to "MUST". That is, these standards are optional in Android but will be required in future versions. Existing and new devices that run Android are very strongly encouraged to meet these requirements in Android so they will be able to upgrade to the future platform releases
- MUST comply with the Android sensor coordinate system as detailed in the Android APIs (see [ Resources, 41 ])
- MUST be capable of measuring from freefall up to twice gravity (2g) or more on any three-dimensional vector
- MUST have 8-bits of accuracy or more
- MUST have a standard deviation no greater than 0.05 m/s^2
7.3.2. مغناطیس سنج
Device implementations SHOULD include a 3-axis magnetometer (ie compass.) If a device does include a 3-axis magnetometer, it:
- MUST be able to deliver events at 10 Hz or greater
- MUST comply with the Android sensor coordinate system as detailed in the Android APIs (see [ Resources, 41 ]).
- MUST be capable of sampling a range of field strengths adequate to cover the geomagnetic field
- MUST have 8-bits of accuracy or more
- MUST have a standard deviation no greater than 0.5 µT
7.3.3. جی پی اس
Device implementations SHOULD include a GPS receiver. If a device implementation does include a GPS receiver, it SHOULD include some form of "assisted GPS" technique to minimize GPS lock-on time.
7.3.4. ژیروسکوپ
Device implementations SHOULD include a gyroscope (ie angular change sensor.) Devices SHOULD NOT include a gyroscope sensor unless a 3-axis accelerometer is also included. If a device implementation includes a gyroscope, it:
- MUST be temperature compensated.
- MUST be capable of measuring orientation changes up to 5.5*Pi radians/second (that is, approximately 1,000 degrees per second).
- SHOULD be able to deliver events at 200 Hz or greater. Note that while the gyroscope frequency above is stated as "SHOULD" for Android 4.4, the Compatibility Definition for a future version is planned to change these to "MUST". That is, these standards are optional in Android but will be required in future versions. Existing and new devices that run Android are very strongly encouraged to meet these requirements so they will be able to upgrade to the future platform releases.
- MUST have 12-bits of accuracy or more
- MUST have a variance no greater than 1e-7 rad^2 / s^2 per Hz (variance per Hz, or rad^2 / s). The variance is allowed to vary with the sampling rate, but must be constrained by this value. In other words, if you measure the variance of the gyro at 1 Hz sampling rate it should be no greater than 1e-7 rad^2/s^2.
- MUST have timestamps as close to when the hardware event happened as possible. The constant latency must be removed.
7.3.5. فشارسنج
Device implementations MAY include a barometer (ie ambient air pressure sensor.) If a device implementation includes a barometer, it:
- MUST be able to deliver events at 5 Hz or greater
- MUST have adequate precision to enable estimating altitude
- MUST be temperature compensated
7.3.6. دماسنج
Device implementations MAY include an ambient thermometer (ie temperature sensor). If present, it MUST be defined as SENSOR_TYPE_AMBIENT_TEMPERATURE
and it MUST measure the ambient (room) temperature in degrees Celsius.
Device implementations MAY but SHOULD NOT include a CPU temperature sensor. If present, it MUST be defined as SENSOR_TYPE_TEMPERATURE
, it MUST measure the temperature of the device CPU, and it MUST NOT measure any other temperature. Note the SENSOR_TYPE_TEMPERATURE
sensor type was deprecated in Android 4.0.
7.3.7. فتومتر
Device implementations MAY include a photometer (ie ambient light sensor.)
7.3.8. سنسور مجاورت
Device implementations MAY include a proximity sensor. If a device implementation does include a proximity sensor, it MUST measure the proximity of an object in the same direction as the screen. That is, the proximity sensor MUST be oriented to detect objects close to the screen, as the primary intent of this sensor type is to detect a phone in use by the user. If a device implementation includes a proximity sensor with any other orientation, it MUST NOT be accessible through this API. If a device implementation has a proximity sensor, it MUST be have 1-bit of accuracy or more.
7.4. اتصال داده
7.4.1. تلفن
"Telephony" as used by the Android APIs and this document refers specifically to hardware related to placing voice calls and sending SMS messages via a GSM or CDMA network. While these voice calls may or may not be packet-switched, they are for the purposes of Android considered independent of any data connectivity that may be implemented using the same network. In other words, the Android "telephony" functionality and APIs refer specifically to voice calls and SMS; for instance, device implementations that cannot place calls or send/receive SMS messages MUST NOT report the "android.hardware.telephony" feature or any sub-features, regardless of whether they use a cellular network for data connectivity.
Android MAY be used on devices that do not include telephony hardware. That is, Android is compatible with devices that are not phones. However, if a device implementation does include GSM or CDMA telephony, it MUST implement full support for the API for that technology. Device implementations that do not include telephony hardware MUST implement the full APIs as no-ops.
7.4.2. IEEE 802.11 (Wi-Fi)
Android device implementations SHOULD include support for one or more forms of 802.11 (b/g/a/n, etc.) If a device implementation does include support for 802.11, it MUST implement the corresponding Android API.
Device implementations MUST implement the multicast API as described in the SDK documentation [ Resources, 62 ]. Device implementations that do include Wi-Fi support MUST support multicast DNS (mDNS). Device implementations MUST NOT filter mDNS packets (224.0.0.251) at any time of operation including when the screen is not in an active state.
7.4.2.1. وای فای دایرکت
Device implementations SHOULD include support for Wi-Fi direct (Wi-Fi peer-to-peer). If a device implementation does include support for Wi-Fi direct, it MUST implement the corresponding Android API as described in the SDK documentation [ Resources, 68 ]. If a device implementation includes support for Wi-Fi direct, then it:
- MUST support regular Wi-Fi operation
- SHOULD support concurrent Wi-Fi and Wi-Fi Direct operation
7.4.2.2. Wi-Fi Tunneled Direct Link Setup
Device implementations SHOULD include support for Wi-Fi Tunneled Direct Link Setup (TDLS) as described in the Android SDK Documentation [ Resources, 85 ]. If a device implementation does include support for TDLS and TDLS is enabled by the WiFiManager API, the device:
- SHOULD use TDLS only when it is possible AND beneficial.
- SHOULD have some heuristic and NOT use TDLS when its performance might be worse than going through the Wi-Fi access point.
7.4.3. بلوتوث
Device implementations SHOULD include a Bluetooth transceiver. Device implementations that do include a Bluetooth transceiver MUST enable the RFCOMM-based Bluetooth API as described in the SDK documentation and declare hardware feature android.hardware.bluetooth [ Resources, 42 ]. Device implementations SHOULD implement relevant Bluetooth profiles, such as A2DP, AVRCP, OBEX, etc. as appropriate for the device.
Device implementations that do include support for Bluetooth GATT (generic attribute profile) to enable communication with Bluetooth Smart or Smart Ready devices MUST enable the GATT-based Bluetooth API as described in the SDK documentation and declare hardware feature android.hardware.bluetooth_le [ Resources, 42 ].
7.4.4. Near-Field Communications
Device implementations SHOULD include a transceiver and related hardware for Near-Field Communications (NFC). If a device implementation does include NFC hardware, then it:
- MUST report the android.hardware.nfc feature from the
android.content.pm.PackageManager.hasSystemFeature()
method. [ Resources, 37 ] - MUST be capable of reading and writing NDEF messages via the following NFC standards:
- MUST be capable of acting as an NFC Forum reader/writer (as defined by the NFC Forum technical specification NFCForum-TS-DigitalProtocol-1.0) via the following NFC standards:
- NfcA (ISO14443-3A)
- NfcB (ISO14443-3B)
- NfcF (JIS 6319-4)
- IsoDep (ISO 14443-4)
- NFC Forum Tag Types 1, 2, 3, 4 (defined by the NFC Forum)
- MUST be capable of acting as an NFC Forum reader/writer (as defined by the NFC Forum technical specification NFCForum-TS-DigitalProtocol-1.0) via the following NFC standards:
- SHOULD be capable of reading and writing NDEF messages via the following NFC standards. Note that while the NFC standards below are stated as "SHOULD", the Compatibility Definition for a future version is planned to change these to "MUST". That is, these standards are optional in this version but will be required in future versions. Existing and new devices that run this version of Android are very strongly encouraged to meet these requirements now so they will be able to upgrade to the future platform releases.
- NfcV (ISO 15693)
- MUST be capable of transmitting and receiving data via the following peer-to-peer standards and protocols:
- ISO 18092
- LLCP 1.0 (defined by the NFC Forum)
- SDP 1.0 (defined by the NFC Forum)
- NDEF Push Protocol [ Resources, 43 ]
- SNEP 1.0 (defined by the NFC Forum)
- MUST include support for Android Beam [ Resources, 65 ]:
- MUST implement the SNEP default server. Valid NDEF messages received by the default SNEP server MUST be dispatched to applications using the android.nfc.ACTION_NDEF_DISCOVERED intent. Disabling Android Beam in settings MUST NOT disable dispatch of incoming NDEF message.
- Device implementations MUST honor the android.settings.NFCSHARING_SETTINGS intent to show NFC sharing settings [ Resources, 67 ].
- MUST implement the NPP server. Messages received by the NPP server MUST be processed the same way as the SNEP default server.
- MUST implement a SNEP client and attempt to send outbound P2P NDEF to the default SNEP server when Android Beam is enabled. If no default SNEP server is found then the client MUST attempt to send to an NPP server.
- MUST allow foreground activities to set the outbound P2P NDEF message using android.nfc.NfcAdapter.setNdefPushMessage, and android.nfc.NfcAdapter.setNdefPushMessageCallback, and android.nfc.NfcAdapter.enableForegroundNdefPush.
- SHOULD use a gesture or on-screen confirmation, such as 'Touch to Beam', before sending outbound P2P NDEF messages.
- SHOULD enable Android Beam by default
- MUST support NFC Connection handover to Bluetooth when the device supports Bluetooth Object Push Profile. Device implementations must support connection handover to Bluetooth when using android.nfc.NfcAdapter.setBeamPushUris, by implementing the "Connection Handover version 1.2" [ Resources, 60 ] and "Bluetooth Secure Simple Pairing Using NFC version 1.0" [ Resources, 61 ] specs from the NFC Forum. Such an implementation MUST implement the handover LLCP service with service name "urn:nfc:sn:handover" for exchanging the handover request/select records over NFC, and it MUST use the Bluetooth Object Push Profile for the actual Bluetooth data transfer. For legacy reasons (to remain compatible with Android 4.1 devices), the implementation SHOULD still accept SNEP GET requests for exchanging the handover request/select records over NFC. However an implementation itself SHOULD NOT send SNEP GET requests for performing connection handover.
- MUST poll for all supported technologies while in NFC discovery mode.
- SHOULD be in NFC discovery mode while the device is awake with the screen active and the lock-screen unlocked.
(Note that publicly available links are not available for the JIS, ISO, and NFC Forum specifications cited above.)
Android 4.4 introduces support for NFC Host Card Emulation (HCE) mode. If a device implementation does include an NFC controller capable of HCE and Application ID (AID) routing, then it:
- MUST report the
android.hardware.nfc.hce
feature constant - MUST support NFC HCE APIs as defined in the Android SDK [ Resources, 90 ]
Additionally, device implementations MAY include reader/writer support for the following MIFARE technologies.
- MIFARE Classic (NXP MF1S503x [ Resources, 44 ], MF1S703x [ Resources, 45 ])
- MIFARE Ultralight (NXP MF0ICU1 [ Resources, 46 ], MF0ICU2 [ Resources, 47 ])
- NDEF on MIFARE Classic (NXP AN130511 [ Resources, 48 ], AN130411 [ Resources, 49 ])
Note that Android includes APIs for these MIFARE types. If a device implementation supports MIFARE in the reader/writer role, it:
- MUST implement the corresponding Android APIs as documented by the Android SDK
- MUST report the feature com.nxp.mifare from the
android.content.pm.PackageManager.hasSystemFeature()
method. [ Resources, 37 ] Note that this is not a standard Android feature, and as such does not appear as a constant on thePackageManager
class. - MUST NOT implement the corresponding Android APIs nor report the com.nxp.mifare feature unless it also implements general NFC support as described in this section
If a device implementation does not include NFC hardware, it MUST NOT declare the android.hardware.nfc feature from the android.content.pm.PackageManager.hasSystemFeature()
method [ Resources, 37 ], and MUST implement the Android NFC API as a no-op.
As the classes android.nfc.NdefMessage
and android.nfc.NdefRecord
represent a protocol-independent data representation format, device implementations MUST implement these APIs even if they do not include support for NFC or declare the android.hardware.nfc feature.
7.4.5. Minimum Network Capability
Device implementations MUST include support for one or more forms of data networking. Specifically, device implementations MUST include support for at least one data standard capable of 200Kbit/sec or greater. Examples of technologies that satisfy this requirement include EDGE, HSPA, EV-DO, 802.11g, Ethernet, etc.
Device implementations where a physical networking standard (such as Ethernet) is the primary data connection SHOULD also include support for at least one common wireless data standard, such as 802.11 (Wi-Fi).
Devices MAY implement more than one form of data connectivity.
7.4.6. تنظیمات همگام سازی
Device implementations MUST have the master auto-sync setting on by default so that the method getMasterSyncAutomatically()
returns "true" [ Resources, 88 ].
7.5. دوربین ها
Device implementations SHOULD include a rear-facing camera, and MAY include a front-facing camera. A rear-facing camera is a camera located on the side of the device opposite the display; that is, it images scenes on the far side of the device, like a traditional camera. A front-facing camera is a camera located on the same side of the device as the display; that is, a camera typically used to image the user, such as for video conferencing and similar applications.
7.5.1. Rear-Facing Camera
Device implementations SHOULD include a rear-facing camera. If a device implementation includes a rear-facing camera, it:
- MUST have a resolution of at least 2 megapixels
- SHOULD have either hardware auto-focus, or software auto-focus implemented in the camera driver (transparent to application software)
- MAY have fixed-focus or EDOF (extended depth of field) hardware
- MAY include a flash. If the Camera includes a flash, the flash lamp MUST NOT be lit while an android.hardware.Camera.PreviewCallback instance has been registered on a Camera preview surface, unless the application has explicitly enabled the flash by enabling the
FLASH_MODE_AUTO
orFLASH_MODE_ON
attributes of aCamera.Parameters
object. Note that this constraint does not apply to the device's built-in system camera application, but only to third-party applications usingCamera.PreviewCallback
.
7.5.2. دوربین جلو
Device implementations MAY include a front-facing camera. If a device implementation includes a front-facing camera, it:
- MUST have a resolution of at least VGA (that is, 640x480 pixels)
- MUST NOT use a front-facing camera as the default for the Camera API. That is, the camera API in Android has specific support for front-facing cameras, and device implementations MUST NOT configure the API to to treat a front-facing camera as the default rear-facing camera, even if it is the only camera on the device.
- MAY include features (such as auto-focus, flash, etc.) available to rear-facing cameras as described in Section 7.5.1.
- MUST horizontally reflect (ie mirror) the stream displayed by an app in a CameraPreview, as follows:
- If the device implementation is capable of being rotated by user (such as automatically via an accelerometer or manually via user input), the camera preview MUST be mirrored horizontally relative to the device's current orientation.
- If the current application has explicitly requested that the Camera display be rotated via a call to the
android.hardware.Camera.setDisplayOrientation()
[ Resources, 50 ] method, the camera preview MUST be mirrored horizontally relative to the orientation specified by the application. - Otherwise, the preview MUST be mirrored along the device's default horizontal axis.
- MUST mirror the image displayed by the postview in the same manner as the camera preview image stream. (If the device implementation does not support postview, this requirement obviously does not apply.)
- MUST NOT mirror the final captured still image or video streams returned to application callbacks or committed to media storage
7.5.3. Camera API Behavior
Device implementations MUST implement the following behaviors for the camera-related APIs, for both front- and rear-facing cameras:
- If an application has never called
android.hardware.Camera.Parameters.setPreviewFormat(int)
, then the device MUST useandroid.hardware.PixelFormat.YCbCr_420_SP
for preview data provided to application callbacks. - If an application registers an
android.hardware.Camera.PreviewCallback
instance and the system calls theonPreviewFrame()
method when the preview format is YCbCr_420_SP, the data in thebyte[]
passed intoonPreviewFrame()
must further be in the NV21 encoding format. That is, NV21 MUST be the default. - Device implementations MUST support the YV12 format (as denoted by the
android.graphics.ImageFormat.YV12
constant) for camera previews for both front- and rear-facing cameras. (The hardware video encoder and camera may use any native pixel format, but the device implementation MUST support conversion to YV12.)
Device implementations MUST implement the full Camera API included in the Android SDK documentation [ Resources, 51 ]), regardless of whether the device includes hardware autofocus or other capabilities. For instance, cameras that lack autofocus MUST still call any registered android.hardware.Camera.AutoFocusCallback
instances (even though this has no relevance to a non-autofocus camera.) Note that this does apply to front-facing cameras; for instance, even though most front-facing cameras do not support autofocus, the API callbacks must still be "faked" as described.
Device implementations MUST recognize and honor each parameter name defined as a constant on the android.hardware.Camera.Parameters
class, if the underlying hardware supports the feature. If the device hardware does not support a feature, the API must behave as documented. Conversely, Device implementations MUST NOT honor or recognize string constants passed to the android.hardware.Camera.setParameters()
method other than those documented as constants on the android.hardware.Camera.Parameters
. That is, device implementations MUST support all standard Camera parameters if the hardware allows, and MUST NOT support custom Camera parameter types. For instance, device implementations that support image capture using high dynamic range (HDR) imaging techniques MUST support camera parameter Camera.SCENE_MODE_HDR
[ Resources, 78 ]).
Device implementations MUST broadcast the Camera.ACTION_NEW_PICTURE
intent whenever a new picture is taken by the camera and the entry of the picture has been added to the media store.
Device implementations MUST broadcast the Camera.ACTION_NEW_VIDEO
intent whenever a new video is recorded by the camera and the entry of the picture has been added to the media store.
7.5.4. جهت گیری دوربین
Both front- and rear-facing cameras, if present, MUST be oriented so that the long dimension of the camera aligns with the screen's long dimension. That is, when the device is held in the landscape orientation, cameras MUST capture images in the landscape orientation. This applies regardless of the device's natural orientation; that is, it applies to landscape-primary devices as well as portrait-primary devices.
7.6. حافظه و ذخیره سازی
7.6.1. Minimum Memory and Storage
Device implementations MUST have at least 340MB of memory available to the kernel and userspace. The 340MB MUST be in addition to any memory dedicated to hardware components such as radio, video, and so on that is not under the kernel's control.
Device implementations with less than 512MB of memory available to the kernel and userspace MUST return the value "true" for ActivityManager.isLowRamDevice()
.
Device implementations MUST have at least 1GB of non-volatile storage available for application private data. That is, the /data
partition MUST be at least 1GB. Device implementations that run Android are very strongly encouraged to have at least 2GB of non-volatile storage for application private data so they will be able to upgrade to the future platform releases.
The Android APIs include a Download Manager that applications may use to download data files [ Resources, 56 ]. The device implementation of the Download Manager MUST be capable of downloading individual files of at least 100MB in size to the default "cache" location.
7.6.2. Shared External Storage
Device implementations MUST offer shared storage for applications. The shared storage provided MUST be at least 1GB in size.
Device implementations MUST be configured with shared storage mounted by default, "out of the box". If the shared storage is not mounted on the Linux path /sdcard
, then the device MUST include a Linux symbolic link from /sdcard
to the actual mount point.
Device implementations MUST enforce as documented the android.permission.WRITE_EXTERNAL_STORAGE
permission on this shared storage. Shared storage MUST otherwise be writable by any application that obtains that permission.
Device implementations MAY have hardware for user-accessible removable storage, such as a Secure Digital card. Alternatively, device implementations MAY allocate internal (non-removable) storage as shared storage for apps. The upstream Android Open Source Project includes an implementation that uses internal device storage for shared external storage APIs; device implementations SHOULD use this configuration and software implementation.
Regardless of the form of shared storage used, device implementations MUST provide some mechanism to access the contents of shared storage from a host computer, such as USB mass storage (UMS) or Media Transfer Protocol (MTP). Device implementations MAY use USB mass storage, but SHOULD use Media Transfer Protocol. If the device implementation supports Media Transfer Protocol:
- The device implementation SHOULD be compatible with the reference Android MTP host, Android File Transfer [ Resources, 57 ].
- The device implementation SHOULD report a USB device class of
0x00
. - The device implementation SHOULD report a USB interface name of 'MTP'.
If the device implementation lacks USB ports, it MUST provide a host computer with access to the contents of shared storage by some other means, such as a network file system.
It is illustrative to consider two common examples. If a device implementation includes an SD card slot to satisfy the shared storage requirement, a FAT-formatted SD card 1GB in size or larger MUST be included with the device as sold to users, and MUST be mounted by default. Alternatively, if a device implementation uses internal fixed storage to satisfy this requirement, that storage MUST be 1GB in size or larger and mounted on /sdcard
(or /sdcard
MUST be a symbolic link to the physical location if it is mounted elsewhere.)
Device implementations that include multiple shared storage paths (such as both an SD card slot and shared internal storage) MUST NOT allow Android applications to write to the secondary external storage, except for their package-specific directories on the secondary external storage, but SHOULD expose content from both storage paths transparently through Android's media scanner service and android.provider.MediaStore.
7.7. USB
Device implementations SHOULD include a USB client port, and SHOULD include a USB host port.
If a device implementation includes a USB client port:
- the port MUST be connectable to a USB host with a standard USB-A port
- the port SHOULD use the micro USB form factor on the device side. Existing and new devices that run Android are very strongly encouraged to meet these requirements in Android so they will be able to upgrade to the future platform releases
- the port SHOULD be centered in the middle of an edge. Device implementations SHOULD either locate the port on the bottom of the device (according to natural orientation) or enable software screen rotation for all apps (including home screen), so that the display draws correctly when the device is oriented with the port at bottom. Existing and new devices that run Androidare very strongly encouraged to meet these requirements in Android so they will be able to upgrade to future platform releases.
- if the device has other ports (such as a non-USB charging port) it SHOULD be on the same edge as the micro-USB port
- it MUST allow a host connected to the device to access the contents of the shared storage volume using either USB mass storage or Media Transfer Protocol
- it MUST implement the Android Open Accessory API and specification as documented in the Android SDK documentation, and MUST declare support for the hardware feature
android.hardware.usb.accessory
[ Resources, 52 ] - it MUST implement the USB audio class as documented in the Android SDK documentation [ Resources, 66 ]
- it SHOULD implement support for USB battery charging specification [ Resources, 64 ] Existing and new devices that run Android are very strongly encouraged to meet these requirements so they will be able to upgrade to the future platform releases
- The value of iSerialNumber in USB standard device descriptor MUST be equal to the value of android.os.Build.SERIAL.
If a device implementation includes a USB host port:
- it MAY use a non-standard port form factor, but if so MUST ship with a cable or cables adapting the port to standard USB-A
- it MUST implement the Android USB host API as documented in the Android SDK, and MUST declare support for the hardware feature
android.hardware.usb.host
[ Resources, 53 ]
Device implementations MUST implement the Android Debug Bridge. If a device implementation omits a USB client port, it MUST implement the Android Debug Bridge via local-area network (such as Ethernet or 802.11)
8. Performance Compatibility
Device implementations MUST meet the key performance metrics of an Android- compatible device defined in the table below:
متریک | Performance Threshold | نظرات |
Application Launch Time | The following applications should launch within the specified time.
| The launch time is measured as the total time to complete loading the default activity for the application, including the time it takes to start the Linux process, load the Android package into the Dalvik VM, and call onCreate. |
Simultaneous Applications | When multiple applications have been launched, re-launching an already-running application after it has been launched must take less than the original launch time. |
9. Security Model Compatibility
Device implementations MUST implement a security model consistent with the Android platform security model as defined in Security and Permissions reference document in the APIs [ Resources, 54 ] in the Android developer documentation. Device implementations MUST support installation of self-signed applications without requiring any additional permissions/certificates from any third parties/authorities. Specifically, compatible devices MUST support the security mechanisms described in the follow sub-sections.
9.1. مجوزها
Device implementations MUST support the Android permissions model as defined in the Android developer documentation [ Resources, 54 ]. Specifically, implementations MUST enforce each permission defined as described in the SDK documentation; no permissions may be omitted, altered, or ignored. Implementations MAY add additional permissions, provided the new permission ID strings are not in the android.* namespace.
9.2. UID and Process Isolation
Device implementations MUST support the Android application sandbox model, in which each application runs as a unique Unix-style UID and in a separate process. Device implementations MUST support running multiple applications as the same Linux user ID, provided that the applications are properly signed and constructed, as defined in the Security and Permissions reference [ Resources, 54 ].
9.3. Filesystem Permissions
Device implementations MUST support the Android file access permissions model as defined in the Security and Permissions reference [ Resources, 54 ].
9.4. Alternate Execution Environments
Device implementations MAY include runtime environments that execute applications using some other software or technology than the Dalvik virtual machine or native code. However, such alternate execution environments MUST NOT compromise the Android security model or the security of installed Android applications, as described in this section.
Alternate runtimes MUST themselves be Android applications, and abide by the standard Android security model, as described elsewhere in Section 9.
Alternate runtimes MUST NOT be granted access to resources protected by permissions not requested in the runtime's AndroidManifest.xml file via the <uses-permission>
mechanism.
Alternate runtimes MUST NOT permit applications to make use of features protected by Android permissions restricted to system applications.
Alternate runtimes MUST abide by the Android sandbox model. به طور مشخص:
- Alternate runtimes SHOULD install apps via the PackageManager into separate Android sandboxes (that is, Linux user IDs, etc.)
- Alternate runtimes MAY provide a single Android sandbox shared by all applications using the alternate runtime
- Alternate runtimes and installed applications using an alternate runtime MUST NOT reuse the sandbox of any other app installed on the device, except through the standard Android mechanisms of shared user ID and signing certificate
- Alternate runtimes MUST NOT launch with, grant, or be granted access to the sandboxes corresponding to other Android applications
Alternate runtimes MUST NOT be launched with, be granted, or grant to other applications any privileges of the superuser (root), or of any other user ID.
The .apk files of alternate runtimes MAY be included in the system image of a device implementation, but MUST be signed with a key distinct from the key used to sign other applications included with the device implementation.
When installing applications, alternate runtimes MUST obtain user consent for the Android permissions used by the application. That is, if an application needs to make use of a device resource for which there is a corresponding Android permission (such as Camera, GPS, etc.), the alternate runtime MUST inform the user that the application will be able to access that resource. If the runtime environment does not record application capabilities in this manner, the runtime environment MUST list all permissions held by the runtime itself when installing any application using that runtime.
9.5. Multi-User Support
Android includes support for multiple users and provides support for full user isolation [ Resources, 70 ].
Device implementations MUST meet these requirements related to multi-user support [ Resources, 71 ]:
- As the behavior of the telephony APIs on devices with multiple users is currently undefined, device implementations that declare android.hardware.telephony MUST NOT enable multi-user support.
- Device implementations MUST, for each user, implement a security model consistent with the Android platform security model as defined in Security and Permissions reference document in the APIs [Resources, 54]
- Android includes support for restricted profiles, a feature that allows device owners to manage additional users and their capabilities on the device. With restricted profiles, device owners can quickly set up separate environments for additional users to work in, with the ability to manage finer-grained restrictions in the apps that are available in those environments. Device implementations that include support for multiple users MUST include support for restricted profiles. The upstream Android Open Source Project includes an implementation that satisfies this requirement.
Each user instance on an Android device MUST have separate and isolated external storage directories. Device implementations MAY store multiple users' data on the same volume or filesystem. However, the device implementation MUST ensure that applications owned by and running on behalf a given user cannot list, read, or write to data owned by any other user. Note that removable media, such as SD card slots, can allow one user to access another's data by means of a host PC. For this reason, device implementations that use removable media for the external storage APIs MUST encrypt the contents of the SD card if multi-user is enabled using a key stored only on non-removable media accessible only to the system. As this will make the media unreadable by a host PC, device implementations will be required to switch to MTP or a similar system to provide host PCs with access to the current user's data. Accordingly, device implementations MAY but SHOULD NOT enable multi-user if they use removable media [ Resources, 72 ] for primary external storage.
9.6. Premium SMS Warning
Android includes support for warning users for any outgoing premium SMS message [ Resources, 73 ] . Premium SMS messages are text messages sent to a service registered with a carrier that may incur a charge to the user. Device implementations that declare support for android.hardware.telephony
MUST warn users before sending a SMS message to numbers identified by regular expressions defined in /data/misc/sms/codes.xml
file in the device. The upstream Android Open Source Project provides an implementation that satisfies this requirement.
9.7. Kernel Security Features
The Android Sandbox includes features that can use the Security-Enhanced Linux (SELinux) mandatory access control (MAC) system and other security features in the Linux kernel. SELinux or any other security features, if implemented below the Android framework:
- MUST maintain compatibility with existing applications
- MUST not have a visible user interface, even when violations are detected
- SHOULD NOT be user or developer configurable
If any API for configuration of policy is exposed to an application that can affect another application (such as a Device Administration API), the API MUST NOT allow configurations that break compatibility.
Devices MUST implement SELinux and meet the following requirements, which are satisfied by the reference implementation in the upstream Android Open Source Project.
- it MUST support a SELinux policy that allows the SELinux mode to be set on a per-domain basis with:
- domains that are in enforcing mode in the upstream Android Open Source implementation (such as installd, netd, and vold) MUST be in enforcing mode
- domain(s) for third-party applications SHOULD remain in permissive mode to ensure continued compatibility
- it SHOULD load policy from
/sepolicy
file on the device - it MUST support dynamic updates of the SELinux policy file without requiring a system image update
- it MUST log any policy violations without breaking applications or affecting system behavior
Device implementations SHOULD retain the default SELinux policy provided in the upstream Android Open Source Project, until they have first audited their additions to the SELinux policy. Device implementations MUST be compatible with the upstream Android Open Source Project.
9.8. حریم خصوصی
If the device implements functionality in the system that captures the contents displayed on the screen and/or records the audio stream played on the device, it MUST continuously notify the user whenever this functionality is enabled and actively capturing/recording.
9.9. رمزگذاری فول دیسک
IF the device has lockscreen, the device MUST support full-disk encryption.
10. Software Compatibility Testing
Device implementations MUST pass all tests described in this section.
However, note that no software test package is fully comprehensive. For this reason, device implementers are very strongly encouraged to make the minimum number of changes as possible to the reference and preferred implementation of Android available from the Android Open Source Project. This will minimize the risk of introducing bugs that create incompatibilities requiring rework and potential device updates.
10.1. Compatibility Test Suite
Device implementations MUST pass the Android Compatibility Test Suite (CTS) [ Resources, 2 ] available from the Android Open Source Project, using the final shipping software on the device. Additionally, device implementers SHOULD use the reference implementation in the Android Open Source tree as much as possible, and MUST ensure compatibility in cases of ambiguity in CTS and for any reimplementations of parts of the reference source code.
The CTS is designed to be run on an actual device. Like any software, the CTS may itself contain bugs. The CTS will be versioned independently of this Compatibility Definition, and multiple revisions of the CTS may be released for Android 4.4. Device implementations MUST pass the latest CTS version available at the time the device software is completed.
10.2. CTS Verifier
Device implementations MUST correctly execute all applicable cases in the CTS Verifier. The CTS Verifier is included with the Compatibility Test Suite, and is intended to be run by a human operator to test functionality that cannot be tested by an automated system, such as correct functioning of a camera and sensors.
The CTS Verifier has tests for many kinds of hardware, including some hardware that is optional. Device implementations MUST pass all tests for hardware which they possess; for instance, if a device possesses an accelerometer, it MUST correctly execute the Accelerometer test case in the CTS Verifier. Test cases for features noted as optional by this Compatibility Definition Document MAY be skipped or omitted.
Every device and every build MUST correctly run the CTS Verifier, as noted above. However, since many builds are very similar, device implementers are not expected to explicitly run the CTS Verifier on builds that differ only in trivial ways. Specifically, device implementations that differ from an implementation that has passed the CTS Verifier only by the set of included locales, branding, etc. MAY omit the CTS Verifier test.
10.3. کاربردهای مرجع
Device implementers MUST test implementation compatibility using the following open source applications:
- The "Apps for Android" applications [ Resources, 55 ]
- Replica Island (available in Google Play Store)
Each app above MUST launch and behave correctly on the implementation, for the implementation to be considered compatible.
11. Updatable Software
Device implementations MUST include a mechanism to replace the entirety of the system software. The mechanism need not perform "live" upgrades - that is, a device restart MAY be required.
Any method can be used, provided that it can replace the entirety of the software preinstalled on the device. For instance, any of the following approaches will satisfy this requirement:
- Over-the-air (OTA) downloads with offline update via reboot
- "Tethered" updates over USB from a host PC
- "Offline" updates via a reboot and update from a file on removable storage
The update mechanism used MUST support updates without wiping user data. That is, the update mechanism MUST preserve application private data and application shared data. Note that the upstream Android software includes an update mechanism that satisfies this requirement.
If an error is found in a device implementation after it has been released but within its reasonable product lifetime that is determined in consultation with the Android Compatibility Team to affect the compatibility of third-party applications, the device implementer MUST correct the error via a software update available that can be applied per the mechanism just described.
12. Document Changelog
The following table contains a summary of the changes to the Compatibility Definition in this release.
Section(s) | خلاصه تغییرات |
---|---|
3.2.2. Build Parameters | Revised descriptions of BRAND, DEVICE, and PRODUCT. SERIAL is now required. |
3.2.3.5. Default App Settings | New section that adds requirement to comply with new default application settings |
3.3.1 Application Binary Interfaces | Clarified allowed values for the android.os.Build.CPU_ABI and android.os.Build.CPU_ABI2 parameters. |
3.4.1. WebView Compatibility | Added Chromium as required WebView implementation. |
3.7. سازگاری با ماشین مجازی | Added requirement for xxhdpi and 400dpi screen densities. |
3.8.6. تم ها | Updated to reflect use of translucent system bars. |
3.8.12. مکان | New section that adds requirement location settings be centralized. |
3.8.13. یونیکد | New section that adds requirement for emoji support. |
3.9. مدیریت دستگاه | Noted preinstalled administrative applications cannot be the default Device Owner application. |
5.1. کدک های رسانه ای | Added VP9 decoder requirement. Added recommended specification for hardware VP8 codecs. |
5.3. رمزگشایی ویدیو | Added VP9. Added recommendation for dynamic resolution switching. |
5.4. ضبط صدا | Added REMOTE_SUBMIX as new required audio source. Made use of android.media.audiofx.NoiseSuppressor API a requirement. |
6.2.1 Experimental | New section that introduces the ART runtime and requires Dalvik as the default runtime. |
7.1.1. Screen Configuration | Replaced 1.85 aspect ratio with 1.86. Added 400dpi screen density. |
7.1.6. Screen Types | Added 640 dpi (4K) resolution configuration. |
7.2.3. کلیدهای ناوبری | Added Recents function as essential; demoted Menu function in priority. |
7.3.6. دماسنج | Added SENSOR_TYPE_AMBIENT_TEMPERATURE as recommended thermometer. |
7.4.2.2. Wi-Fi Tunneled Direct Link Setup | New section that adds support for Wi-Fi Tunneled Direct Link Setup (TDLS). |
7.4.4. Near-Field Communications | Added Host Card Emulation (HCE) as a requirement. Replaced SNEP GET with Logical Link Control Protocol (LLCP) and added the Bluetooth Object Push Profile as a requirement. |
7.4.6. تنظیمات همگام سازی | New section that adds requirement auto-sync data be enabled by default. |
7.6.1. Minimum Memory and Storage | Added ActivityManager.isLowRamDevice() setting requirement for devices with less than 512MB of memory. Increased storage requirements from 512MB and 1GB to 1GB and 2GB, respectively. |
7.6.2. Shared "External" Storage | Editorial fixes such as change of section name, and moved text that fits in this section from section 9.5. Noted applications may write to their package-specific directories on secondary external storage. |
7.7. USB | Added requirement all devices report a USB serial number. |
9.5. Multi-User Support | Moved non multi-user specific text to section 7.6.2. |
9.7. Kernel Security Features | Rewritten to note switch of SELinux to enforcing mode and requirement SELinux output not be rendered in the user interface. |
9.8. حریم خصوصی | New section that adds requirement audio and video recording must trigger continuous notifications to the user. |
9.9. رمزگذاری فول دیسک | New section that adds requirement devices with lockscreen support full-disk encryption. |
12. Document Changelog | New section that summarizes changes in the CDD by section. |
13. تماس با ما
You can contact the document authors at compatibility@android.com for clarifications and to bring up any issues that you think the document does not cover.