কপিরাইট © 2010, Google Inc. সর্বস্বত্ব সংরক্ষিত৷
compatibility@android.com
সুচিপত্র
2. সম্পদ
3. সফটওয়্যার
3.2। সফট এপিআই সামঞ্জস্য
3.3। নেটিভ API সামঞ্জস্য
3.4। ওয়েব সামঞ্জস্যতা
3.5। API আচরণগত সামঞ্জস্য
3.6। API নামস্থান
3.7। ভার্চুয়াল মেশিন সামঞ্জস্য
3.8। ইউজার ইন্টারফেস সামঞ্জস্য
5. অ্যাপ্লিকেশন প্যাকেজিং সামঞ্জস্য
6. মাল্টিমিডিয়া সামঞ্জস্যতা
7. বিকাশকারী টুল সামঞ্জস্য
8. হার্ডওয়্যার সামঞ্জস্য
8.2। কীবোর্ড
8.3। নন-টাচ নেভিগেশন
৮.৪। স্ক্রিন ওরিয়েন্টেশন
8.5। টাচস্ক্রিন ইনপুট
8.6। ইউএসবি
৮.৭। নেভিগেশন কী
৮.৮। ওয়্যারলেস ডেটা নেটওয়ার্কিং
৮.৯। ক্যামেরা
8.10। অ্যাক্সিলোমিটার
8.11। কম্পাস
8.12। জিপিএস
৮.১৩। টেলিফোনি
8.14। মেমরি এবং স্টোরেজ
৮.১৫। অ্যাপ্লিকেশন শেয়ার্ড স্টোরেজ
8.16। ব্লুটুথ
10. নিরাপত্তা মডেল সামঞ্জস্য
10.2। ইউআইডি এবং প্রক্রিয়া বিচ্ছিন্নতা
10.3। ফাইল সিস্টেম অনুমতি
10.4। বিকল্প মৃত্যুদন্ড পরিবেশন
12. আপডেটযোগ্য সফটওয়্যার
13. আমাদের সাথে যোগাযোগ করুন
পরিশিষ্ট A - ব্লুটুথ পরীক্ষা পদ্ধতি
1। পরিচিতি
এই দস্তাবেজটি মোবাইল ফোনগুলিকে Android 2.2 এর সাথে সামঞ্জস্যপূর্ণ হওয়ার জন্য প্রয়োজনীয় প্রয়োজনীয়তাগুলিকে গণনা করে৷
"অবশ্যই", "অবশ্যই নয়", "প্রয়োজনীয়", "হবে", "হবে না", "উচিত", "উচিত নয়", "প্রস্তাবিত", "মে" এবং "ঐচ্ছিক" ব্যবহার IETF মান অনুযায়ী RFC2119 [ সম্পদ, 1 ] এ সংজ্ঞায়িত।
এই নথিতে যেমন ব্যবহার করা হয়েছে, একজন "ডিভাইস ইমপ্লিমেন্টার" বা "বাস্তবায়নকারী" হল একজন ব্যক্তি বা সংস্থা যা Android 2.2 চালিত একটি হার্ডওয়্যার/সফ্টওয়্যার সমাধান তৈরি করে। একটি "ডিভাইস বাস্তবায়ন" বা "বাস্তবায়ন" হল হার্ডওয়্যার/সফ্টওয়্যার সমাধান তাই উন্নত।
Android 2.2 এর সাথে সামঞ্জস্যপূর্ণ বলে বিবেচিত হতে, ডিভাইস বাস্তবায়ন:
- এই সামঞ্জস্যের সংজ্ঞায় উপস্থাপিত প্রয়োজনীয়তা অবশ্যই পূরণ করতে হবে, রেফারেন্সের মাধ্যমে অন্তর্ভুক্ত করা যেকোনো নথি সহ।
- ডিভাইস বাস্তবায়নের সফ্টওয়্যারটি সম্পূর্ণ হওয়ার সময় উপলব্ধ Android সামঞ্জস্য পরীক্ষা স্যুট (CTS) এর সাম্প্রতিকতম সংস্করণটি পাস করতে হবে৷ (সিটিএস অ্যান্ড্রয়েড ওপেন সোর্স প্রজেক্টের অংশ হিসাবে উপলব্ধ [ সম্পদ, 2 ]।) CTS এই নথিতে বর্ণিত উপাদানগুলির অনেকগুলি পরীক্ষা করে, কিন্তু সমস্ত নয়।
যেখানে এই সংজ্ঞা বা CTS নীরব, অস্পষ্ট বা অসম্পূর্ণ, সেখানে বিদ্যমান বাস্তবায়নের সাথে সামঞ্জস্য নিশ্চিত করা ডিভাইস বাস্তবায়নকারীর দায়িত্ব। এই কারণে, অ্যান্ড্রয়েড ওপেন সোর্স প্রজেক্ট [ সম্পদ, 3 ] হল অ্যান্ড্রয়েডের রেফারেন্স এবং পছন্দের বাস্তবায়ন। ডিভাইস ইমপ্লিমেন্টারদের জোরালোভাবে উৎসাহিত করা হচ্ছে তাদের বাস্তবায়নকে Android ওপেন সোর্স প্রজেক্ট থেকে পাওয়া "আপস্ট্রিম" সোর্স কোডের উপর ভিত্তি করে। যদিও কিছু উপাদান অনুমানমূলকভাবে বিকল্প বাস্তবায়নের সাথে প্রতিস্থাপিত হতে পারে এই অনুশীলনটি দৃঢ়ভাবে নিরুৎসাহিত করা হয়, কারণ CTS পরীক্ষায় উত্তীর্ণ হওয়া যথেষ্ট কঠিন হয়ে উঠবে। সামঞ্জস্য পরীক্ষা স্যুট সহ এবং এর বাইরেও আদর্শ Android বাস্তবায়নের সাথে সম্পূর্ণ আচরণগত সামঞ্জস্য নিশ্চিত করা বাস্তবায়নকারীর দায়িত্ব। পরিশেষে, মনে রাখবেন যে কিছু উপাদান প্রতিস্থাপন এবং পরিবর্তনগুলি এই নথি দ্বারা স্পষ্টভাবে নিষিদ্ধ।
2. সম্পদ
- IETF RFC2119 প্রয়োজনীয়তার স্তর: http://www.ietf.org/rfc/rfc2119.txt
- অ্যান্ড্রয়েড সামঞ্জস্যতা প্রোগ্রাম ওভারভিউ: http://source.android.com/compatibility/index.html
- অ্যান্ড্রয়েড ওপেন সোর্স প্রজেক্ট: http://source.android.com/
- API সংজ্ঞা এবং ডকুমেন্টেশন: http://developer.android.com/reference/packages.html
- অ্যান্ড্রয়েড অনুমতির রেফারেন্স: http://developer.android.com/reference/android/Manifest.permission.html
- android.os.Build রেফারেন্স: http://developer.android.com/reference/android/os/Build.html
- Android 2.2 অনুমোদিত সংস্করণ স্ট্রিং: http://source.android.com/compatibility/2.2/versions.html
- android.webkit.WebView ক্লাস: http://developer.android.com/reference/android/webkit/WebView.html
- HTML5: http://www.whatwg.org/specs/web-apps/current-work/multipage/
- ডালভিক ভার্চুয়াল মেশিন স্পেসিফিকেশন: অ্যান্ড্রয়েড সোর্স কোডে, ডালভিক/ডক্সে উপলব্ধ
- 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_guideline /icon_design.html#statusbarstructure
- অনুসন্ধান ম্যানেজার: http://developer.android.com/reference/android/app/SearchManager.html
- টোস্ট: http://developer.android.com/reference/android/widget/Toast.html
- লাইভ ওয়ালপেপার: https://android-developers.googleblog.com/2010/02/live-wallpapers.html
- অ্যান্ড্রয়েডের জন্য অ্যাপস: http://code.google.com/p/apps-for-android
- রেফারেন্স টুল ডকুমেন্টেশন (adb, aapt, ddms এর জন্য): http://developer.android.com/guide/developing/tools/index.html
- Android 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
- অ্যান্ড্রয়েড হার্ডওয়্যার বৈশিষ্ট্যের তালিকা: http://developer.android.com/reference/android/content/pm/PackageManager.html
- একাধিক স্ক্রীন সমর্থন করে: http://developer.android.com/guide/practices/screens_support.html
- android.content.res.Configuration: http://developer.android.com/reference/android/content/res/Configuration.html
- android.util.DisplayMetrics: http://developer.android.com/reference/android/util/DisplayMetrics.html
- android.hardware.Camera: http://developer.android.com/reference/android/hardware/Camera.html
- সেন্সর স্থানাঙ্ক: http://developer.android.com/reference/android/hardware/SensorEvent.html
- অ্যান্ড্রয়েড নিরাপত্তা এবং অনুমতির রেফারেন্স: http://developer.android.com/guide/topics/security/security.html
- ব্লুটুথ API: http://developer.android.com/reference/android/bluetooth/package-summary.html
এই সম্পদগুলির অনেকগুলি প্রত্যক্ষ বা পরোক্ষভাবে Android 2.2 SDK থেকে প্রাপ্ত, এবং সেই SDK-এর ডকুমেন্টেশনের তথ্যের সাথে কার্যকরীভাবে অভিন্ন হবে৷ যে কোনো ক্ষেত্রে যেখানে এই সামঞ্জস্যতা সংজ্ঞা বা সামঞ্জস্য পরীক্ষা স্যুট SDK ডকুমেন্টেশনের সাথে একমত নয়, SDK ডকুমেন্টেশনকে প্রামাণিক বলে মনে করা হয়। উপরে অন্তর্ভুক্ত রেফারেন্সে প্রদত্ত যেকোন প্রযুক্তিগত বিশদ এই সামঞ্জস্যতার সংজ্ঞার অংশ হিসাবে অন্তর্ভুক্তির দ্বারা বিবেচনা করা হয়।
3. সফটওয়্যার
অ্যান্ড্রয়েড প্ল্যাটফর্মে পরিচালিত API-এর একটি সেট, নেটিভ API-এর একটি সেট এবং তথাকথিত "সফ্ট" APIগুলির একটি বডি যেমন ইন্টেন্ট সিস্টেম এবং ওয়েব-অ্যাপ্লিকেশন API অন্তর্ভুক্ত রয়েছে। এই বিভাগটি হার্ড এবং নরম APIগুলির বিবরণ দেয় যা সামঞ্জস্যের অবিচ্ছেদ্য, সেইসাথে কিছু অন্যান্য প্রাসঙ্গিক প্রযুক্তিগত এবং ব্যবহারকারী ইন্টারফেস আচরণ। ডিভাইস বাস্তবায়ন এই বিভাগে সমস্ত প্রয়োজনীয়তা মেনে চলতে হবে।
3.1। পরিচালিত API সামঞ্জস্য
পরিচালিত (ডালভিক-ভিত্তিক) এক্সিকিউশন এনভায়রনমেন্ট হল অ্যান্ড্রয়েড অ্যাপ্লিকেশনের প্রাথমিক বাহন। অ্যান্ড্রয়েড অ্যাপ্লিকেশান প্রোগ্রামিং ইন্টারফেস (API) হল অ্যান্ড্রয়েড প্ল্যাটফর্ম ইন্টারফেসগুলির একটি সেট যা পরিচালিত VM পরিবেশে চলমান অ্যাপ্লিকেশনগুলির সংস্পর্শে আসে৷ ডিভাইস বাস্তবায়ন অবশ্যই Android 2.2 SDK দ্বারা প্রকাশিত যেকোন নথিভুক্ত API এর সমস্ত নথিভুক্ত আচরণ সহ সম্পূর্ণ বাস্তবায়ন প্রদান করতে হবে [ সম্পদ, 4 ]৷
এই সামঞ্জস্যতা সংজ্ঞা দ্বারা বিশেষভাবে অনুমোদিত স্থান ব্যতীত ডিভাইস বাস্তবায়নে কোনো পরিচালিত API বাদ দেওয়া, API ইন্টারফেস বা স্বাক্ষর পরিবর্তন করা, নথিভুক্ত আচরণ থেকে বিচ্যুত হওয়া, বা নো-অপস অন্তর্ভুক্ত করা উচিত নয়।
3.2। সফট এপিআই সামঞ্জস্য
বিভাগ 3.1 থেকে পরিচালিত API গুলি ছাড়াও, Android-এ একটি উল্লেখযোগ্য রানটাইম-শুধুমাত্র "সফ্ট" API অন্তর্ভুক্ত রয়েছে, যেমন উদ্দেশ্য, অনুমতি এবং Android অ্যাপ্লিকেশনগুলির অনুরূপ দিকগুলির আকারে যা অ্যাপ্লিকেশন কম্পাইলের সময় প্রয়োগ করা যায় না। এই বিভাগে অ্যান্ড্রয়েড 2.2 এর সাথে সামঞ্জস্যের জন্য প্রয়োজনীয় "নরম" API এবং সিস্টেম আচরণের বিবরণ রয়েছে। ডিভাইস বাস্তবায়ন এই বিভাগে উপস্থাপিত সমস্ত প্রয়োজনীয়তা পূরণ করতে হবে।
3.2.1। অনুমতি
ডিভাইস ইমপ্লিমেন্টারদের অবশ্যই অনুমতির রেফারেন্স পৃষ্ঠা [ সম্পদ, 5 ] দ্বারা নথিভুক্ত সমস্ত অনুমতি ধ্রুবক সমর্থন এবং প্রয়োগ করতে হবে। মনে রাখবেন যে বিভাগ 10 এ অ্যান্ড্রয়েড সুরক্ষা মডেল সম্পর্কিত অতিরিক্ত প্রয়োজনীয়তাগুলি তালিকাভুক্ত করে৷
3.2.2। প্যারামিটার তৈরি করুন
অ্যান্ড্রয়েড এপিআই-এ android.os.Build
ক্লাস [ রিসোর্স, 6 ]-এ বেশ কয়েকটি ধ্রুবক অন্তর্ভুক্ত রয়েছে যা বর্তমান ডিভাইস বর্ণনা করার উদ্দেশ্যে। ডিভাইস বাস্তবায়ন জুড়ে সামঞ্জস্যপূর্ণ, অর্থপূর্ণ মান প্রদান করার জন্য, নীচের সারণীতে এই মানগুলির ফর্ম্যাটগুলির উপর অতিরিক্ত বিধিনিষেধ অন্তর্ভুক্ত করা হয়েছে যা ডিভাইস বাস্তবায়নকে অবশ্যই মেনে চলতে হবে।
প্যারামিটার | মন্তব্য |
android.os.Build.VERSION.RELEASE | মানব-পাঠযোগ্য বিন্যাসে বর্তমানে কার্যকর করা Android সিস্টেমের সংস্করণ। এই ক্ষেত্রে অবশ্যই [ সম্পদ, 7 ]-এ সংজ্ঞায়িত স্ট্রিং মানগুলির একটি থাকতে হবে। |
android.os.Build.VERSION.SDK | বর্তমানে কার্যকর করা Android সিস্টেমের সংস্করণ, তৃতীয় পক্ষের অ্যাপ্লিকেশন কোডে অ্যাক্সেসযোগ্য একটি বিন্যাসে। অ্যান্ড্রয়েড 2.2-এর জন্য, এই ক্ষেত্রে অবশ্যই পূর্ণসংখ্যার মান 8 থাকতে হবে। |
android.os.Build.VERSION.INCREMENTAL | মানব-পঠনযোগ্য বিন্যাসে বর্তমানে কার্যকর করা Android সিস্টেমের নির্দিষ্ট বিল্ডকে মনোনীত করে ডিভাইস বাস্তবায়নকারী দ্বারা নির্বাচিত একটি মান। শেষ ব্যবহারকারীদের জন্য উপলব্ধ করা বিভিন্ন বিল্ডের জন্য এই মানটি পুনরায় ব্যবহার করা উচিত নয়। এই ক্ষেত্রের একটি সাধারণ ব্যবহার হল বিল্ড তৈরি করতে কোন বিল্ড নম্বর বা উৎস-নিয়ন্ত্রণ পরিবর্তন শনাক্তকারী ব্যবহার করা হয়েছে তা নির্দেশ করা। এই ক্ষেত্রের নির্দিষ্ট বিন্যাসে কোন প্রয়োজনীয়তা নেই, এটি শূন্য বা খালি স্ট্রিং ("") হওয়া উচিত নয়। |
android.os.Build.BOARD | মানব-পাঠযোগ্য বিন্যাসে ডিভাইস দ্বারা ব্যবহৃত নির্দিষ্ট অভ্যন্তরীণ হার্ডওয়্যার সনাক্ত করে ডিভাইস বাস্তবায়নকারী দ্বারা নির্বাচিত একটি মান। এই ক্ষেত্রের একটি সম্ভাব্য ব্যবহার হল ডিভাইসটিকে পাওয়ারিং বোর্ডের নির্দিষ্ট সংশোধন নির্দেশ করা। এই ক্ষেত্রের নির্দিষ্ট বিন্যাসে কোন প্রয়োজনীয়তা নেই, এটি শূন্য বা খালি স্ট্রিং ("") হওয়া উচিত নয়। |
android.os.Build.BRAND | ডিভাইস বাস্তবায়নকারীর দ্বারা নির্বাচিত একটি মান যা মানব-পাঠযোগ্য বিন্যাসে ডিভাইসটি উৎপাদনকারী কোম্পানি, সংস্থা, ব্যক্তি, ইত্যাদির নাম সনাক্ত করে। এই ক্ষেত্রের একটি সম্ভাব্য ব্যবহার হল OEM এবং/অথবা বাহককে নির্দেশ করা যে ডিভাইসটি বিক্রি করেছে। এই ক্ষেত্রের নির্দিষ্ট বিন্যাসে কোন প্রয়োজনীয়তা নেই, এটি শূন্য বা খালি স্ট্রিং ("") হওয়া উচিত নয়। |
android.os.Build.DEVICE | ডিভাইস বাস্তবায়নকারীর দ্বারা নির্বাচিত একটি মান যা ডিভাইসের নির্দিষ্ট কনফিগারেশন বা বডির সংশোধন (কখনও কখনও "ইন্ডাস্ট্রিয়াল ডিজাইন" বলা হয়) সনাক্ত করে। এই ক্ষেত্রের নির্দিষ্ট বিন্যাসে কোন প্রয়োজনীয়তা নেই, এটি শূন্য বা খালি স্ট্রিং ("") হওয়া উচিত নয়। |
android.os.Build.FINGERPRINT | একটি স্ট্রিং যা এই বিল্ডটিকে অনন্যভাবে সনাক্ত করে। এটা যুক্তিসঙ্গতভাবে মানুষের পঠনযোগ্য হওয়া উচিত. এটি অবশ্যই এই টেমপ্লেটটি অনুসরণ করবে:$(BRAND)/$(PRODUCT)/$(DEVICE)/$(BOARD):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/$(TAGS) উদাহরণ স্বরূপ: acme/mydevice/generic/generic:2.2/ERC77/3359:userdebug/test-keys ফিঙ্গারপ্রিন্টে হোয়াইটস্পেস অক্ষর অন্তর্ভুক্ত করা উচিত নয়। উপরের টেমপ্লেটে অন্তর্ভুক্ত অন্যান্য ক্ষেত্রে যদি সাদা স্থানের অক্ষর থাকে, তবে সেগুলিকে অবশ্যই বিল্ড ফিঙ্গারপ্রিন্টে অন্য অক্ষর দিয়ে প্রতিস্থাপিত করতে হবে, যেমন আন্ডারস্কোর ("_") অক্ষর৷ |
android.os.Build.HOST | একটি স্ট্রিং যা মানব পাঠযোগ্য বিন্যাসে নির্মিত হোস্টটিকে অনন্যভাবে সনাক্ত করে। এই ক্ষেত্রের নির্দিষ্ট বিন্যাসে কোন প্রয়োজনীয়তা নেই, এটি শূন্য বা খালি স্ট্রিং ("") হওয়া উচিত নয়। |
android.os.Build.ID | মানব পাঠযোগ্য বিন্যাসে একটি নির্দিষ্ট রিলিজ উল্লেখ করার জন্য ডিভাইস বাস্তবায়নকারী দ্বারা নির্বাচিত একটি শনাক্তকারী। এই ক্ষেত্রটি android.os.Build.VERSION.INCREMENTAL এর মতোই হতে পারে, তবে সফ্টওয়্যার বিল্ডগুলির মধ্যে পার্থক্য করতে শেষ ব্যবহারকারীদের জন্য যথেষ্ট অর্থবহ একটি মান হওয়া উচিত৷ এই ক্ষেত্রের নির্দিষ্ট বিন্যাসে কোন প্রয়োজনীয়তা নেই, এটি শূন্য বা খালি স্ট্রিং ("") হওয়া উচিত নয়। |
android.os.Build.MODEL | ডিভাইস বাস্তবায়নকারীর দ্বারা নির্বাচিত একটি মান যাতে ডিভাইসের নাম থাকে যা শেষ ব্যবহারকারীর কাছে পরিচিত। এটি একই নামে হওয়া উচিত যার অধীনে ডিভাইসটি বাজারজাত করা হয় এবং শেষ ব্যবহারকারীদের কাছে বিক্রি করা হয়। এই ক্ষেত্রের নির্দিষ্ট বিন্যাসে কোন প্রয়োজনীয়তা নেই, এটি শূন্য বা খালি স্ট্রিং ("") হওয়া উচিত নয়। |
android.os.Build.PRODUCT | ডিভাইস বাস্তবায়নকারীর দ্বারা নির্বাচিত একটি মান যাতে ডিভাইসের ডেভেলপমেন্ট নাম বা কোড নাম থাকে। মানুষের পঠনযোগ্য হতে হবে, কিন্তু শেষ ব্যবহারকারীদের দেখার জন্য অগত্যা নয়। এই ক্ষেত্রের নির্দিষ্ট বিন্যাসে কোন প্রয়োজনীয়তা নেই, এটি শূন্য বা খালি স্ট্রিং ("") হওয়া উচিত নয়। |
android.os.Build.TAGS | ডিভাইস বাস্তবায়নকারী দ্বারা নির্বাচিত ট্যাগগুলির একটি কমা দ্বারা পৃথক করা তালিকা যা বিল্ডটিকে আরও আলাদা করে। উদাহরণস্বরূপ, "আনসাইন করা, ডিবাগ"। এই ক্ষেত্রটি নাল বা খালি স্ট্রিং ("") হওয়া উচিত নয়, তবে একটি একক ট্যাগ (যেমন "রিলিজ") ঠিক আছে৷ |
android.os.Build.TIME | বিল্ড কখন হয়েছিল তার টাইমস্ট্যাম্পের প্রতিনিধিত্বকারী একটি মান। |
android.os.Build.TYPE | বিল্ডের রানটাইম কনফিগারেশন নির্দিষ্ট করে ডিভাইস বাস্তবায়নকারীর দ্বারা নির্বাচিত একটি মান। এই ক্ষেত্রটিতে তিনটি সাধারণ অ্যান্ড্রয়েড রানটাইম কনফিগারেশনের সাথে সম্পর্কিত মানগুলির মধ্যে একটি থাকা উচিত: "ব্যবহারকারী", "ইউজারডেবগ", বা "এনজি"। |
android.os.Build.USER | ব্যবহারকারীর (বা স্বয়ংক্রিয় ব্যবহারকারী) একটি নাম বা ব্যবহারকারী আইডি যা বিল্ড তৈরি করেছে। এই ক্ষেত্রের নির্দিষ্ট বিন্যাসে কোন প্রয়োজনীয়তা নেই, এটি শূন্য বা খালি স্ট্রিং ("") হওয়া উচিত নয়। |
3.2.3। অভিপ্রায় সামঞ্জস্য
অ্যান্ড্রয়েড অ্যাপ্লিকেশানগুলির মধ্যে ঢিলেঢালাভাবে সংযুক্ত একীকরণ অর্জন করতে ইন্টেন্ট ব্যবহার করে। এই বিভাগটি ইন্টেন্ট প্যাটার্নের সাথে সম্পর্কিত প্রয়োজনীয়তাগুলি বর্ণনা করে যা ডিভাইস বাস্তবায়নের দ্বারা সম্মানিত হওয়া আবশ্যক৷ "সম্মানিত" দ্বারা বোঝানো হয়েছে যে ডিভাইস বাস্তবায়নকারীকে অবশ্যই একটি Android কার্যকলাপ বা পরিষেবা প্রদান করতে হবে যা একটি ম্যাচিং ইন্টেন্ট ফিল্টার নির্দিষ্ট করে এবং প্রতিটি নির্দিষ্ট ইন্টেন্ট প্যাটার্নের জন্য সঠিক আচরণের সাথে আবদ্ধ এবং প্রয়োগ করে৷
3.2.3.1। মূল আবেদন উদ্দেশ্য
অ্যান্ড্রয়েড আপস্ট্রিম প্রকল্পটি অনেকগুলি মূল অ্যাপ্লিকেশনকে সংজ্ঞায়িত করে, যেমন একটি ফোন ডায়ালার, ক্যালেন্ডার, পরিচিতি বই, মিউজিক প্লেয়ার এবং আরও অনেক কিছু। ডিভাইস বাস্তবায়নকারীরা বিকল্প সংস্করণ দিয়ে এই অ্যাপ্লিকেশনগুলি প্রতিস্থাপন করতে পারে৷
যাইহোক, এই ধরনের যেকোনো বিকল্প সংস্করণকে অবশ্যই আপস্ট্রিম প্রজেক্টের দ্বারা প্রদত্ত একই অভিপ্রায়ের ধরণগুলিকে সম্মান করতে হবে। উদাহরণস্বরূপ, যদি একটি ডিভাইসে একটি বিকল্প মিউজিক প্লেয়ার থাকে, তবে এটি এখনও একটি গান বাছাই করার জন্য তৃতীয় পক্ষের অ্যাপ্লিকেশনগুলির দ্বারা জারি করা ইন্টেন্ট প্যাটার্নকে সম্মান করতে হবে।
নিম্নলিখিত অ্যাপ্লিকেশনগুলিকে মূল অ্যান্ড্রয়েড সিস্টেম অ্যাপ্লিকেশন হিসাবে বিবেচনা করা হয়:
- ডেস্ক ঘড়ি
- ব্রাউজার
- ক্যালেন্ডার
- ক্যালকুলেটর
- ক্যামেরা
- পরিচিতি
- ইমেইল
- গ্যালারি
- গ্লোবাল সার্চ
- লঞ্চার
- লাইভপিকার (অর্থাৎ, লাইভ ওয়ালপেপার পিকার অ্যাপ্লিকেশন; বিভাগ 3.8.5 অনুযায়ী ডিভাইসটি লাইভ ওয়ালপেপার সমর্থন না করলে বাদ দেওয়া যেতে পারে।)
- মেসেজিং (একেএ "Mms")
- সঙ্গীত
- ফোন
- সেটিংস
- শব্দ লিপিবদ্ধ কারী
মূল অ্যান্ড্রয়েড সিস্টেম অ্যাপ্লিকেশনগুলির মধ্যে রয়েছে বিভিন্ন কার্যকলাপ, বা পরিষেবা উপাদান যা "পাবলিক" হিসাবে বিবেচিত হয়। অর্থাৎ, অ্যাট্রিবিউট "android:exported" অনুপস্থিত হতে পারে, অথবা "true" মান থাকতে পারে।
মূল Android সিস্টেম অ্যাপগুলির মধ্যে একটিতে সংজ্ঞায়িত প্রতিটি অ্যাক্টিভিটি বা পরিষেবার জন্য যা একটি android:এক্সপোর্টেড অ্যাট্রিবিউটের মাধ্যমে "false" মান সহ অ-পাবলিক হিসাবে চিহ্নিত করা হয়নি, ডিভাইস বাস্তবায়নে একই ধরনের একটি উপাদান অন্তর্ভুক্ত করা আবশ্যক যাতে একই ইন্টেন্ট ফিল্টার প্রয়োগ করা হয় মূল অ্যান্ড্রয়েড সিস্টেম অ্যাপ হিসাবে নিদর্শন।
অন্য কথায়, একটি ডিভাইস বাস্তবায়ন মূল অ্যান্ড্রয়েড সিস্টেম অ্যাপগুলিকে প্রতিস্থাপন করতে পারে; যাইহোক, যদি এটি হয়ে থাকে, ডিভাইস বাস্তবায়ন অবশ্যই প্রতিটি মূল অ্যান্ড্রয়েড সিস্টেম অ্যাপ দ্বারা সংজ্ঞায়িত সমস্ত ইন্টেন্ট প্যাটার্নকে সমর্থন করবে।
3.2.3.2। অভিপ্রায় ওভাররাইড করে
যেহেতু অ্যান্ড্রয়েড একটি এক্সটেনসিবল প্ল্যাটফর্ম, তাই ডিভাইস বাস্তবায়নকারীকে অবশ্যই 3.2.3.1 ধারায় উল্লেখ করা প্রতিটি ইন্টেন্ট প্যাটার্নকে তৃতীয় পক্ষের অ্যাপ্লিকেশনগুলিকে ওভাররাইড করার অনুমতি দিতে হবে। আপস্ট্রিম অ্যান্ড্রয়েড ওপেন সোর্স প্রজেক্ট ডিফল্টরূপে এটির অনুমতি দেয়; ডিভাইস ইমপ্লিমেন্টারদের অবশ্যই সিস্টেম অ্যাপ্লিকেশনগুলির এই ইন্টেন্ট প্যাটার্নগুলির ব্যবহারে বিশেষ সুবিধা সংযুক্ত করা উচিত নয়, বা তৃতীয় পক্ষের অ্যাপ্লিকেশনগুলিকে এই প্যাটার্নগুলির সাথে আবদ্ধ হওয়া এবং নিয়ন্ত্রণ করা থেকে বিরত রাখা উচিত নয়৷ এই নিষেধাজ্ঞার মধ্যে বিশেষভাবে অন্তর্ভুক্ত রয়েছে কিন্তু "নির্বাচক" ব্যবহারকারী ইন্টারফেস নিষ্ক্রিয় করার মধ্যেই সীমাবদ্ধ নয় যা ব্যবহারকারীকে একাধিক অ্যাপ্লিকেশনের মধ্যে নির্বাচন করতে দেয় যা সকলেই একই অভিপ্রায় প্যাটার্ন পরিচালনা করে।
3.2.3.3। অভিপ্রায় নামস্থান
ডিভাইস ইমপ্লিমেন্টারদের এমন কোনো অ্যান্ড্রয়েড কম্পোনেন্ট অন্তর্ভুক্ত করা উচিত নয় যা অ্যান্ড্রয়েড।* নেমস্পেস-এ অ্যাকশন, ক্যাটাগরি, বা অন্যান্য কী স্ট্রিং ব্যবহার করে কোনও নতুন ইন্টেন্ট বা ব্রডকাস্ট ইন্টেন্ট প্যাটার্নকে সম্মান করে। ডিভাইস ইমপ্লিমেন্টারদের এমন কোনও Android উপাদান অন্তর্ভুক্ত করা উচিত নয় যা অন্য সংস্থার অন্তর্গত প্যাকেজ স্পেসে ACTION, CATEGORY, বা অন্যান্য কী স্ট্রিং ব্যবহার করে কোনও নতুন অভিপ্রায় বা সম্প্রচার অভিপ্রায় প্যাটার্নকে সম্মান করে৷ ডিভাইস বাস্তবায়নকারীরা অবশ্যই বিভাগ 3.2.3.1-এ তালিকাভুক্ত মূল অ্যাপগুলির দ্বারা ব্যবহৃত কোনো ইন্টেন্ট প্যাটার্ন পরিবর্তন বা প্রসারিত করবেন না।
এই নিষেধাজ্ঞাটি বিভাগ 3.6-এ জাভা ভাষার ক্লাসের জন্য নির্দিষ্ট করা অনুরূপ।
3.2.3.4। সম্প্রচার অভিপ্রায়
থার্ড-পার্টি অ্যাপ্লিকেশনগুলি হার্ডওয়্যার বা সফ্টওয়্যার পরিবেশের পরিবর্তন সম্পর্কে তাদের অবহিত করার জন্য নির্দিষ্ট ইন্টেন্টগুলি সম্প্রচার করতে প্ল্যাটফর্মের উপর নির্ভর করে। অ্যান্ড্রয়েড-সামঞ্জস্যপূর্ণ ডিভাইসগুলিকে অবশ্যই উপযুক্ত সিস্টেম ইভেন্টগুলির প্রতিক্রিয়া হিসাবে সর্বজনীন সম্প্রচারের অভিপ্রায়গুলি সম্প্রচার করতে হবে৷ সম্প্রচারের অভিপ্রায় SDK ডকুমেন্টেশনে বর্ণনা করা হয়েছে।
3.3। নেটিভ API সামঞ্জস্য
ডালভিকে চলমান পরিচালিত কোডটি অ্যাপ্লিকেশন .apk ফাইলে প্রদত্ত নেটিভ কোডে কল করতে পারে একটি ELF হিসাবে . তাই উপযুক্ত ডিভাইস হার্ডওয়্যার আর্কিটেকচারের জন্য সংকলিত ফাইল৷ ডিভাইস ইমপ্লিমেন্টেশনে অবশ্যই স্ট্যান্ডার্ড জাভা নেটিভ ইন্টারফেস (JNI) শব্দার্থবিদ্যা ব্যবহার করে নেটিভ কোডে কল করার জন্য পরিচালিত পরিবেশে চলমান কোডের সমর্থন অন্তর্ভুক্ত করতে হবে। নিম্নলিখিত APIগুলি অবশ্যই নেটিভ কোডে উপলব্ধ হতে হবে:
- libc (সি লাইব্রেরি)
- libm (গণিত গ্রন্থাগার)
- JNI ইন্টারফেস
- libz (Zlib কম্প্রেশন)
- liblog (Android লগিং)
- C++ এর জন্য ন্যূনতম সমর্থন
- OpenGL-এর জন্য সমর্থন, নীচে বর্ণিত হিসাবে
ডিভাইস বাস্তবায়ন অবশ্যই OpenGL ES 1.0 সমর্থন করবে। যে ডিভাইসগুলিতে হার্ডওয়্যার ত্বরণের অভাব রয়েছে সেগুলিকে অবশ্যই একটি সফ্টওয়্যার রেন্ডারার ব্যবহার করে OpenGL ES 1.0 প্রয়োগ করতে হবে। ডিভাইস বাস্তবায়নে OpenGL ES 1.1 যতটা ডিভাইস হার্ডওয়্যার সমর্থন করে ততটা বাস্তবায়ন করা উচিত। ডিভাইস বাস্তবায়নে OpenGL ES 2.0 এর জন্য একটি বাস্তবায়ন প্রদান করা উচিত, যদি হার্ডওয়্যারটি সেই APIগুলিতে যুক্তিসঙ্গত কার্য সম্পাদন করতে সক্ষম হয়।
এই লাইব্রেরিগুলি অবশ্যই সোর্স-সামঞ্জস্যপূর্ণ (যেমন হেডার সামঞ্জস্যপূর্ণ) এবং বাইনারি-সামঞ্জস্যপূর্ণ (একটি প্রসেসর আর্কিটেকচারের জন্য) Android ওপেন সোর্স প্রকল্প দ্বারা বায়োনিক-এ দেওয়া সংস্করণগুলির সাথে হতে হবে৷ যেহেতু বায়োনিক বাস্তবায়নগুলি GNU C লাইব্রেরির মতো অন্যান্য বাস্তবায়নের সাথে সম্পূর্ণরূপে সামঞ্জস্যপূর্ণ নয়, তাই ডিভাইস বাস্তবায়নকারীদের Android বাস্তবায়ন ব্যবহার করা উচিত। যদি ডিভাইস বাস্তবায়নকারীরা এই লাইব্রেরিগুলির একটি ভিন্ন বাস্তবায়ন ব্যবহার করে, তাদের অবশ্যই শিরোনাম, বাইনারি এবং আচরণগত সামঞ্জস্য নিশ্চিত করতে হবে।
ডিভাইস বাস্তবায়নকে অবশ্যই android.os.Build.CPU_ABI
API এর মাধ্যমে ডিভাইস দ্বারা সমর্থিত নেটিভ অ্যাপ্লিকেশন বাইনারি ইন্টারফেস (ABI) সঠিকভাবে রিপোর্ট করতে হবে। ABI অবশ্যই docs/CPU-ARCH-ABIS.txt
ফাইলে Android NDK-এর সর্বশেষ সংস্করণে নথিভুক্ত এন্ট্রিগুলির মধ্যে একটি হতে হবে। মনে রাখবেন যে Android NDK-এর অতিরিক্ত রিলিজ অতিরিক্ত ABI-এর জন্য সমর্থন প্রবর্তন করতে পারে।
নেটিভ কোড সামঞ্জস্য চ্যালেঞ্জিং. এই কারণে, এটি পুনরাবৃত্তি করা উচিত যে ডিভাইস বাস্তবায়নকারীরা সামঞ্জস্য নিশ্চিত করতে সাহায্য করার জন্য উপরে তালিকাভুক্ত লাইব্রেরিগুলির আপস্ট্রিম বাস্তবায়ন ব্যবহার করার জন্য অত্যন্ত জোরালোভাবে উত্সাহিত করা হয়।
3.4। ওয়েব সামঞ্জস্যতা
অনেক ডেভেলপার এবং অ্যাপ্লিকেশন তাদের ইউজার ইন্টারফেসের জন্য android.webkit.WebView
ক্লাস [ রিসোর্স, 8 ] এর আচরণের উপর নির্ভর করে, তাই ওয়েবভিউ বাস্তবায়ন অবশ্যই Android বাস্তবায়ন জুড়ে সামঞ্জস্যপূর্ণ হতে হবে। একইভাবে, একটি সম্পূর্ণ ওয়েব অভিজ্ঞতা অ্যান্ড্রয়েড ব্যবহারকারীর অভিজ্ঞতার কেন্দ্রবিন্দু। ডিভাইস বাস্তবায়নে অবশ্যই android.webkit.WebView
এর একটি সংস্করণ অন্তর্ভুক্ত থাকতে হবে যা আপস্ট্রিম অ্যান্ড্রয়েড সফ্টওয়্যারের সাথে সামঞ্জস্যপূর্ণ, এবং একটি আধুনিক HTML5-সক্ষম ব্রাউজার অন্তর্ভুক্ত করা আবশ্যক, যেমন নীচে বর্ণনা করা হয়েছে।
3.4.1। WebView সামঞ্জস্যতা
Android ওপেন সোর্স বাস্তবায়ন android.webkit.WebView
বাস্তবায়নের জন্য WebKit রেন্ডারিং ইঞ্জিন ব্যবহার করে। যেহেতু একটি ওয়েব রেন্ডারিং সিস্টেমের জন্য একটি বিস্তৃত পরীক্ষা স্যুট তৈরি করা সম্ভব নয়, তাই ডিভাইস বাস্তবায়নকারীদের অবশ্যই WebView বাস্তবায়নে WebKit-এর নির্দিষ্ট আপস্ট্রিম বিল্ড ব্যবহার করতে হবে। বিশেষভাবে:
- ডিভাইস বাস্তবায়নের
android.webkit.WebView
বাস্তবায়ন অবশ্যই Android 2.2 এর জন্য আপস্ট্রিম অ্যান্ড্রয়েড ওপেন সোর্স ট্রি থেকে 533.1 ওয়েবকিট বিল্ডের উপর ভিত্তি করে হওয়া উচিত। এই বিল্ডটিতে WebView-এর জন্য কার্যকারিতা এবং নিরাপত্তা ফিক্সের একটি নির্দিষ্ট সেট অন্তর্ভুক্ত রয়েছে। ডিভাইস বাস্তবায়নকারীরা WebKit বাস্তবায়নে কাস্টমাইজেশন অন্তর্ভুক্ত করতে পারে; যাইহোক, এই ধরনের কোনো কাস্টমাইজেশন অবশ্যই রেন্ডারিং আচরণ সহ WebView-এর আচরণকে পরিবর্তন করবে না। - WebView দ্বারা রিপোর্ট করা ব্যবহারকারী এজেন্ট স্ট্রিং এই বিন্যাসে হওয়া আবশ্যক:
Mozilla/5.0 (Linux; U; Android $(VERSION); $(LOCALE); $(MODEL) Build/$(BUILD)) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
- $(VERSION) স্ট্রিংটির মান অবশ্যই
android.os.Build.VERSION.RELEASE
এর মানের সমান হতে হবে - $(LOCALE) স্ট্রিংয়ের মানটি দেশের কোড এবং ভাষার জন্য ISO নিয়মগুলি অনুসরণ করা উচিত এবং ডিভাইসের বর্তমান কনফিগার করা লোকেলকে উল্লেখ করা উচিত
- $(MODEL) স্ট্রিংয়ের মান অবশ্যই
android.os.Build.MODEL
এর মানের সমান হতে হবে - $(BUILD) স্ট্রিংটির মান অবশ্যই
android.os.Build.ID
এর মানের সমান হতে হবে
- $(VERSION) স্ট্রিংটির মান অবশ্যই
ওয়েবভিউ কনফিগারেশনে অবশ্যই HTML5 ডাটাবেস, অ্যাপ্লিকেশন ক্যাশে এবং জিওলোকেশন API [ সম্পদ, 9 ] এর জন্য সমর্থন অন্তর্ভুক্ত থাকতে হবে। WebView-এ HTML5 <video>
ট্যাগের সমর্থন অন্তর্ভুক্ত করা আবশ্যক। HTML5 APIs, সমস্ত JavaScript API-এর মতো, একটি WebView-এ ডিফল্টরূপে অক্ষম করা আবশ্যক, যদি না বিকাশকারী স্বাভাবিক Android API-এর মাধ্যমে তাদের স্পষ্টভাবে সক্ষম করে।
3.4.2। ব্রাউজার সামঞ্জস্য
ডিভাইস বাস্তবায়নে সাধারণ ব্যবহারকারীর ওয়েব ব্রাউজিংয়ের জন্য একটি স্বতন্ত্র ব্রাউজার অ্যাপ্লিকেশন অন্তর্ভুক্ত করা আবশ্যক। স্বতন্ত্র ব্রাউজারটি WebKit ছাড়া অন্য কোন ব্রাউজার প্রযুক্তির উপর ভিত্তি করে হতে পারে। যাইহোক, একটি বিকল্প ব্রাউজার অ্যাপ্লিকেশন পাঠানো হলেও, তৃতীয় পক্ষের অ্যাপ্লিকেশনগুলিতে প্রদত্ত android.webkit.WebView
উপাদানটি অবশ্যই WebKit-এর উপর ভিত্তি করে হতে হবে, যেমনটি 3.4.1 ধারায় বর্ণিত হয়েছে।
বাস্তবায়ন স্বতন্ত্র ব্রাউজার অ্যাপ্লিকেশনে একটি কাস্টম ব্যবহারকারী এজেন্ট স্ট্রিং পাঠাতে পারে।
স্বতন্ত্র ব্রাউজার অ্যাপ্লিকেশন (আপস্ট্রিম ওয়েবকিট ব্রাউজার অ্যাপ্লিকেশন বা তৃতীয় পক্ষের প্রতিস্থাপনের উপর ভিত্তি করে) যতটা সম্ভব HTML5 [ সম্পদ, 9 ] এর জন্য সমর্থন অন্তর্ভুক্ত করা উচিত। সর্বনিম্নভাবে, ডিভাইস বাস্তবায়ন অবশ্যই HTML5 ভূ-অবস্থান, অ্যাপ্লিকেশন ক্যাশে এবং ডাটাবেস API এবং <video> ট্যাগকে স্বতন্ত্রভাবে ব্রাউজার অ্যাপ্লিকেশন সমর্থন করতে হবে।
3.5। API আচরণগত সামঞ্জস্য
প্রতিটি API প্রকারের আচরণ (পরিচালিত, নরম, নেটিভ এবং ওয়েব) অবশ্যই আপস্ট্রিম অ্যান্ড্রয়েড ওপেন-সোর্স প্রকল্পের পছন্দের বাস্তবায়নের সাথে সামঞ্জস্যপূর্ণ হতে হবে [ সম্পদ, 3 ]। সামঞ্জস্যের কিছু নির্দিষ্ট ক্ষেত্র হল:
- ডিভাইসগুলি অবশ্যই একটি আদর্শ অভিপ্রায়ের আচরণ বা অর্থ পরিবর্তন করবে না৷
- ডিভাইসগুলি অবশ্যই একটি নির্দিষ্ট ধরণের সিস্টেম উপাদানের জীবনচক্র বা জীবনচক্রের শব্দার্থ পরিবর্তন করবে না (যেমন পরিষেবা, কার্যকলাপ, সামগ্রী সরবরাহকারী, ইত্যাদি)
- ডিভাইসগুলির একটি নির্দিষ্ট অনুমতির শব্দার্থ পরিবর্তন করা উচিত নয়৷
উপরের তালিকাটি ব্যাপক নয়, এবং আচরণগত সামঞ্জস্য নিশ্চিত করার দায়িত্ব ডিভাইস বাস্তবায়নকারীদের উপর। এই কারণে, ডিভাইস বাস্তবায়নকারীদের সিস্টেমের উল্লেখযোগ্য অংশগুলিকে পুনরায় প্রয়োগ করার পরিবর্তে যেখানে সম্ভব Android ওপেন সোর্স প্রকল্পের মাধ্যমে উপলব্ধ সোর্স কোড ব্যবহার করা উচিত।
কম্প্যাটিবিলিটি টেস্ট স্যুট (সিটিএস) আচরণগত সামঞ্জস্যের জন্য প্ল্যাটফর্মের উল্লেখযোগ্য অংশ পরীক্ষা করে, কিন্তু সবগুলো নয়। Android ওপেন সোর্স প্রকল্পের সাথে আচরণগত সামঞ্জস্য নিশ্চিত করা বাস্তবায়নকারীর দায়িত্ব।
3.6। API নামস্থান
অ্যান্ড্রয়েড জাভা প্রোগ্রামিং ভাষা দ্বারা সংজ্ঞায়িত প্যাকেজ এবং ক্লাস নেমস্পেস কনভেনশন অনুসরণ করে। তৃতীয় পক্ষের অ্যাপ্লিকেশনগুলির সাথে সামঞ্জস্য নিশ্চিত করতে, ডিভাইস বাস্তবায়নকারীরা এই প্যাকেজ নেমস্পেসগুলিতে কোনও নিষিদ্ধ পরিবর্তন (নীচে দেখুন) করবেন না:
- java.*
- javax.*
- সূর্য।*
- অ্যান্ড্রয়েড।*
- com.android.*
নিষিদ্ধ পরিবর্তন অন্তর্ভুক্ত:
- ডিভাইস বাস্তবায়নের জন্য অ্যান্ড্রয়েড প্ল্যাটফর্মে সর্বজনীনভাবে প্রকাশ করা APIগুলিকে কোনও পদ্ধতি বা শ্রেণি স্বাক্ষর পরিবর্তন করে, বা ক্লাস বা শ্রেণি ক্ষেত্রগুলি সরিয়ে দিয়ে সংশোধন করা উচিত নয়।
- ডিভাইস বাস্তবায়নকারীরা এপিআই-এর অন্তর্নিহিত বাস্তবায়ন সংশোধন করতে পারে, কিন্তু এই ধরনের পরিবর্তনগুলি প্রকাশ্যে প্রকাশ করা কোনও API-এর বিবৃত আচরণ এবং জাভা-ভাষা স্বাক্ষরকে প্রভাবিত করবে না।
- ডিভাইস ইমপ্লিমেন্টারদের অবশ্যই উপরের API-এ কোনো প্রকাশ্য উপাদান (যেমন ক্লাস বা ইন্টারফেস, বা বিদ্যমান ক্লাস বা ইন্টারফেসে ক্ষেত্র বা পদ্ধতি) যোগ করা উচিত নয়।
একটি "পাবলিকলি এক্সপোজড এলিমেন্ট" হল যেকোন কনস্ট্রাক্ট যা আপস্ট্রিম অ্যান্ড্রয়েড সোর্স কোডে "@hide" মার্কার দিয়ে সাজানো হয় না। অন্য কথায়, ডিভাইস বাস্তবায়নকারীরা অবশ্যই নতুন APIs প্রকাশ করবেন না বা উপরে উল্লিখিত নেমস্পেসগুলিতে বিদ্যমান APIগুলিকে পরিবর্তন করবেন না। ডিভাইস বাস্তবায়নকারীরা শুধুমাত্র অভ্যন্তরীণ পরিবর্তনগুলি করতে পারে, তবে সেই পরিবর্তনগুলিকে বিজ্ঞাপন দেওয়া বা অন্যথায় বিকাশকারীদের কাছে প্রকাশ করা উচিত নয়৷
ডিভাইস বাস্তবায়নকারীরা কাস্টম এপিআই যোগ করতে পারে, কিন্তু এই ধরনের কোনো এপিআই অবশ্যই অন্য প্রতিষ্ঠানের মালিকানাধীন নামস্থানে থাকা উচিত নয়। উদাহরণস্বরূপ, ডিভাইস বাস্তবায়নকারীরা অবশ্যই com.google.* বা অনুরূপ নামস্থানে API যোগ করবেন না; শুধুমাত্র Google তা করতে পারে। একইভাবে, Google অন্য কোম্পানির নামস্থানে API যোগ করবে না।
যদি কোনও ডিভাইস বাস্তবায়নকারী উপরের প্যাকেজ নেমস্পেসগুলির মধ্যে একটিকে উন্নত করার প্রস্তাব দেয় (যেমন একটি বিদ্যমান API-তে দরকারী নতুন কার্যকারিতা যোগ করে, বা একটি নতুন API যোগ করে), বাস্তবায়নকারীকে source.android.com-এ যেতে হবে এবং পরিবর্তনগুলি অবদান রাখার জন্য প্রক্রিয়া শুরু করতে হবে এবং কোড, সেই সাইটের তথ্য অনুযায়ী।
উল্লেখ্য যে উপরের বিধিনিষেধগুলি জাভা প্রোগ্রামিং ভাষায় API-এর নামকরণের জন্য আদর্শ নিয়মের সাথে মিলে যায়; এই বিভাগটি কেবল সেই নিয়মগুলিকে শক্তিশালী করা এবং এই সামঞ্জস্যতার সংজ্ঞায় অন্তর্ভুক্তির মাধ্যমে তাদের বাধ্যতামূলক করে তোলার লক্ষ্য রাখে।
3.7। ভার্চুয়াল মেশিন সামঞ্জস্য
ডিভাইস বাস্তবায়ন অবশ্যই সম্পূর্ণ ডালভিক এক্সিকিউটেবল (ডিইএক্স) বাইটকোড স্পেসিফিকেশন এবং ডালভিক ভার্চুয়াল মেশিন শব্দার্থবিদ্যা [ সম্পদ, 10 ] সমর্থন করে।
মাঝারি- বা নিম্ন-ঘনত্ব হিসাবে শ্রেণীবদ্ধ স্ক্রিনগুলির সাথে ডিভাইস বাস্তবায়নের জন্য প্রতিটি অ্যাপ্লিকেশনে কমপক্ষে 16MB মেমরি বরাদ্দ করতে Dalvik কনফিগার করতে হবে। উচ্চ-ঘনত্ব হিসাবে শ্রেণীবদ্ধ স্ক্রিনগুলির সাথে ডিভাইস বাস্তবায়নগুলি অবশ্যই প্রতিটি অ্যাপ্লিকেশনে কমপক্ষে 24MB মেমরি বরাদ্দ করার জন্য ডালভিককে কনফিগার করতে হবে। মনে রাখবেন যে ডিভাইস বাস্তবায়ন এই পরিসংখ্যানের চেয়ে বেশি মেমরি বরাদ্দ করতে পারে।
3.8। ইউজার ইন্টারফেস সামঞ্জস্য
অ্যান্ড্রয়েড প্ল্যাটফর্মে কিছু বিকাশকারী API অন্তর্ভুক্ত রয়েছে যা বিকাশকারীদের সিস্টেম ইউজার ইন্টারফেসে হুক করার অনুমতি দেয়। ডিভাইস ইমপ্লিমেন্টেশনগুলিকে অবশ্যই এই স্ট্যান্ডার্ড UI APIগুলিকে তাদের বিকাশ করা কাস্টম ইউজার ইন্টারফেসে অন্তর্ভুক্ত করতে হবে, যেমনটি নীচে ব্যাখ্যা করা হয়েছে।
3.8.1। উইজেট
অ্যান্ড্রয়েড একটি উপাদানের প্রকার এবং সংশ্লিষ্ট API এবং জীবনচক্র সংজ্ঞায়িত করে যা অ্যাপ্লিকেশনগুলিকে শেষ ব্যবহারকারীর কাছে একটি "AppWidget" প্রকাশ করতে দেয় [ সম্পদ, 11 ]৷ অ্যান্ড্রয়েড ওপেন সোর্স রেফারেন্স রিলিজে একটি লঞ্চার অ্যাপ্লিকেশন রয়েছে যাতে ব্যবহারকারীর ইন্টারফেস উপাদানগুলি অন্তর্ভুক্ত থাকে যা ব্যবহারকারীকে হোম স্ক্রীন থেকে অ্যাপউইজেট যোগ করতে, দেখতে এবং সরাতে দেয়।
ডিভাইস বাস্তবায়নকারীরা রেফারেন্স লঞ্চার (যেমন হোম স্ক্রীন) এর বিকল্প হতে পারে। বিকল্প লঞ্চারগুলিতে অ্যাপউইজেটগুলির জন্য অন্তর্নির্মিত সমর্থন অন্তর্ভুক্ত করা উচিত এবং সরাসরি লঞ্চারের মধ্যে অ্যাপউইজেটগুলি যুক্ত করতে, কনফিগার করতে, দেখতে এবং সরানোর জন্য ব্যবহারকারীর ইন্টারফেস উপাদানগুলিকে প্রকাশ করতে হবে৷ বিকল্প লঞ্চার এই ব্যবহারকারী ইন্টারফেস উপাদানগুলি বাদ দিতে পারে; যাইহোক, যদি সেগুলি বাদ দেওয়া হয়, ডিভাইস বাস্তবায়নকারীকে অবশ্যই লঞ্চার থেকে অ্যাক্সেসযোগ্য একটি পৃথক অ্যাপ্লিকেশন সরবরাহ করতে হবে যা ব্যবহারকারীদের অ্যাপউইজেটগুলি যোগ করতে, কনফিগার করতে, দেখতে এবং সরাতে দেয়৷
3.8.2। বিজ্ঞপ্তি
অ্যান্ড্রয়েডের মধ্যে API গুলি রয়েছে যা ডেভেলপারদের উল্লেখযোগ্য ইভেন্টগুলির ব্যবহারকারীদেরকে অবহিত করার অনুমতি দেয় [ সম্পদ, 12 ]। ডিভাইস ইমপ্লিমেন্টারদের অবশ্যই সংজ্ঞায়িত প্রতিটি শ্রেণীর বিজ্ঞপ্তির জন্য সমর্থন প্রদান করতে হবে; বিশেষভাবে: শব্দ, কম্পন, আলো এবং স্ট্যাটাস বার।
উপরন্তু, এপিআই [ সম্পদ, 13 ], অথবা স্ট্যাটাস বার আইকন স্টাইল নির্দেশিকা [ সম্পদ, 14 ]-এর জন্য প্রদত্ত সমস্ত সংস্থান (আইকন, সাউন্ড ফাইল, ইত্যাদি) বাস্তবায়নের জন্য সঠিকভাবে রেন্ডার করতে হবে। ডিভাইস বাস্তবায়নকারীরা রেফারেন্স অ্যান্ড্রয়েড ওপেন সোর্স বাস্তবায়নের মাধ্যমে প্রদত্ত বিজ্ঞপ্তির জন্য বিকল্প ব্যবহারকারীর অভিজ্ঞতা প্রদান করতে পারে; যাইহোক, এই ধরনের বিকল্প নোটিফিকেশন সিস্টেমগুলি অবশ্যই বিদ্যমান বিজ্ঞপ্তি সংস্থানগুলিকে সমর্থন করে, যেমন উপরে।
3.8.3। অনুসন্ধান করুন
অ্যান্ড্রয়েডে রয়েছে APIs [ সম্পদ, 15 ] যা বিকাশকারীদের তাদের অ্যাপ্লিকেশনগুলিতে অনুসন্ধান অন্তর্ভুক্ত করতে এবং তাদের অ্যাপ্লিকেশনের ডেটা বিশ্বব্যাপী সিস্টেম অনুসন্ধানে প্রকাশ করতে দেয়। সাধারণভাবে বলতে গেলে, এই কার্যকারিতা একটি একক, সিস্টেম-ওয়াইড ইউজার ইন্টারফেস নিয়ে গঠিত যা ব্যবহারকারীদের ক্যোয়ারী প্রবেশ করতে দেয়, ব্যবহারকারীদের টাইপ হিসাবে সাজেশন প্রদর্শন করে এবং ফলাফল প্রদর্শন করে। অ্যান্ড্রয়েড এপিআই ডেভেলপারদের তাদের নিজস্ব অ্যাপের মধ্যে অনুসন্ধান প্রদান করতে এই ইন্টারফেসটি পুনরায় ব্যবহার করার অনুমতি দেয় এবং বিকাশকারীদের সাধারণ বিশ্বব্যাপী অনুসন্ধান ব্যবহারকারী ইন্টারফেসে ফলাফল সরবরাহ করার অনুমতি দেয়।
ডিভাইস বাস্তবায়নে অবশ্যই একটি একক, ভাগ করা, সিস্টেম-ব্যাপী অনুসন্ধান ব্যবহারকারী ইন্টারফেস অন্তর্ভুক্ত থাকতে হবে যা ব্যবহারকারীর ইনপুটের প্রতিক্রিয়াতে রিয়েল-টাইম পরামর্শ দিতে সক্ষম। ডিভাইস ইমপ্লিমেন্টেশনগুলি অবশ্যই APIs প্রয়োগ করতে হবে যা ডেভেলপারদের তাদের নিজস্ব অ্যাপ্লিকেশনের মধ্যে অনুসন্ধান প্রদান করতে এই ব্যবহারকারী ইন্টারফেসটি পুনরায় ব্যবহার করতে দেয়। ডিভাইস ইমপ্লিমেন্টেশনগুলিকে অবশ্যই APIগুলি প্রয়োগ করতে হবে যা তৃতীয় পক্ষের অ্যাপ্লিকেশনগুলিকে সার্চ বক্সে পরামর্শ যোগ করার অনুমতি দেয় যখন এটি গ্লোবাল সার্চ মোডে চালানো হয়। যদি এই কার্যকারিতা ব্যবহার করে এমন কোনো তৃতীয় পক্ষের অ্যাপ্লিকেশন ইনস্টল করা না থাকে, তবে ডিফল্ট আচরণটি ওয়েব সার্চ ইঞ্জিন ফলাফল এবং পরামর্শ প্রদর্শন করা উচিত।
ডিভাইস বাস্তবায়ন বিকল্প সার্চ ইউজার ইন্টারফেস পাঠাতে পারে, কিন্তু একটি হার্ড বা নরম ডেডিকেটেড সার্চ বোতাম অন্তর্ভুক্ত করা উচিত, যেটি API ডকুমেন্টেশনে দেওয়া আচরণের সাথে সার্চ ফ্রেমওয়ার্ক চালু করার জন্য যেকোনো অ্যাপের মধ্যে ব্যবহার করা যেতে পারে।
3.8.4। টোস্ট
অ্যাপ্লিকেশনগুলি শেষ ব্যবহারকারীর কাছে সংক্ষিপ্ত নন-মোডাল স্ট্রিংগুলি প্রদর্শন করতে "টোস্ট" API ([ সম্পদ, 16 ] এ সংজ্ঞায়িত) ব্যবহার করতে পারে, যা অল্প সময়ের পরে অদৃশ্য হয়ে যায়। ডিভাইস বাস্তবায়ন কিছু উচ্চ-দৃশ্যমান পদ্ধতিতে শেষ ব্যবহারকারীদের জন্য অ্যাপ্লিকেশন থেকে টোস্ট প্রদর্শন করা আবশ্যক।
3.8.5। লাইভ ওয়ালপেপার
অ্যান্ড্রয়েড একটি উপাদানের প্রকার এবং সংশ্লিষ্ট API এবং জীবনচক্র সংজ্ঞায়িত করে যা অ্যাপ্লিকেশনগুলিকে শেষ ব্যবহারকারীর কাছে এক বা একাধিক "লাইভ ওয়ালপেপার" প্রকাশ করতে দেয় [ সম্পদ, 17 ]৷ লাইভ ওয়ালপেপার হল অ্যানিমেশন, প্যাটার্ন বা সীমিত ইনপুট ক্ষমতা সহ অনুরূপ ছবি যা অন্যান্য অ্যাপ্লিকেশনের পিছনে ওয়ালপেপার হিসাবে প্রদর্শিত হয়।
হার্ডওয়্যার নির্ভরযোগ্যভাবে লাইভ ওয়ালপেপার চালাতে সক্ষম বলে মনে করা হয় যদি এটি সমস্ত লাইভ ওয়ালপেপার চালাতে পারে, কার্যকারিতার কোনও সীমাবদ্ধতা ছাড়াই, যুক্তিসঙ্গত ফ্রেমরেটে অন্য অ্যাপ্লিকেশনগুলিতে কোনও প্রতিকূল প্রভাব না ফেলে৷ যদি হার্ডওয়্যারের সীমাবদ্ধতার কারণে ওয়ালপেপার এবং/অথবা অ্যাপ্লিকেশনগুলি ক্র্যাশ, ত্রুটিপূর্ণ, অত্যধিক CPU বা ব্যাটারি শক্তি খরচ করে, বা অগ্রহণযোগ্যভাবে কম ফ্রেম রেট চালায়, তাহলে হার্ডওয়্যারটি লাইভ ওয়ালপেপার চালানোর জন্য অক্ষম বলে বিবেচিত হয়। উদাহরণ হিসেবে, কিছু লাইভ ওয়ালপেপার তাদের বিষয়বস্তু রেন্ডার করতে একটি Open GL 1.0 বা 2.0 প্রসঙ্গ ব্যবহার করতে পারে। লাইভ ওয়ালপেপার এমন হার্ডওয়্যারে নির্ভরযোগ্যভাবে চলবে না যা একাধিক OpenGL প্রসঙ্গ সমর্থন করে না কারণ একটি OpenGL প্রসঙ্গের লাইভ ওয়ালপেপার ব্যবহার অন্য অ্যাপ্লিকেশনগুলির সাথে বিরোধ করতে পারে যেগুলি একটি OpenGL প্রসঙ্গ ব্যবহার করে।
উপরে বর্ণিত হিসাবে নির্ভরযোগ্যভাবে লাইভ ওয়ালপেপার চালাতে সক্ষম ডিভাইস বাস্তবায়ন লাইভ ওয়ালপেপার প্রয়োগ করা উচিত। উপরে বর্ণিত লাইভ ওয়ালপেপারগুলি নির্ভরযোগ্যভাবে না চালানোর জন্য নির্ধারিত ডিভাইস বাস্তবায়নগুলি লাইভ ওয়ালপেপার প্রয়োগ করা উচিত নয়৷
4. রেফারেন্স সফ্টওয়্যার সামঞ্জস্য
Device implementers MUST test implementation compatibility using the following open-source applications:
- Calculator (included in SDK)
- Lunar Lander (included in SDK)
- The "Apps for Android" applications [ Resources, 18 ].
- Replica Island (available in Android Market; only required for device implementations that support with OpenGL ES 2.0)
Each app above MUST launch and behave correctly on the implementation, for the implementation to be considered compatible.
Additionally, device implementations MUST test each menu item (including all sub-menus) of each of these smoke-test applications:
- ApiDemos (included in SDK)
- ManualSmokeTests (included in CTS)
Each test case in the applications above MUST run correctly on the device implementation.
5. Application Packaging Compatibility
Device implementations MUST install and run Android ".apk" files as generated by the "aapt" tool included in the official Android SDK [ Resources, 19 ].
Devices implementations MUST NOT extend either the .apk [ Resources, 20 ], Android Manifest [ Resources, 21 ], or Dalvik bytecode [ Resources, 10 ] formats in such a way that would prevent those files from installing and running correctly on other compatible devices. Device implementers SHOULD use the reference upstream implementation of Dalvik, and the reference implementation's package management system.
6. Multimedia Compatibility
Device implementations MUST fully implement all multimedia APIs. Device implementations MUST include support for all multimedia codecs described below, and SHOULD meet the sound processing guidelines described below.
6.1. Media Codecs
Device implementations MUST support the following multimedia codecs. All of these codecs are provided as software implementations in the preferred Android implementation from the Android Open Source Project.
Please note that neither Google nor the Open Handset Alliance make any representation that these codecs are unencumbered by third-party patents. Those intending to use this source code in hardware or software products are advised that implementations of this code, including in open source software or shareware, may require patent licenses from the relevant patent holders.
Audio | ||||
Name | Encoder | Decoder | Details | File/Container Format |
AAC LC/LTP | X | Mono/Stereo content in any combination of standard bit rates up to 160 kbps and sampling rates between 8 to 48kHz | 3GPP (.3gp) and MPEG-4 (.mp4, .m4a). No support for raw AAC (.aac) | |
HE-AACv1 (AAC+) | X | |||
HE-AACv2 (enhanced AAC+) | X | |||
AMR-NB | X | X | 4.75 to 12.2 kbps sampled @ 8kHz | 3GPP (.3gp) |
AMR-WB | X | 9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16kHz | 3GPP (.3gp) | |
MP3 | X | Mono/Stereo 8-320Kbps constant (CBR) or variable bit-rate (VBR) | MP3 (.mp3) | |
MIDI | X | MIDI Type 0 and 1. DLS Version 1 and 2. XMF and Mobile XMF. Support for ringtone formats RTTTL/RTX, OTA, and iMelody | Type 0 and 1 (.mid, .xmf, .mxmf). Also RTTTL/RTX (.rtttl, .rtx), OTA (.ota), and iMelody (.imy) | |
Ogg Vorbis | X | Ogg (.ogg) | ||
PCM | X | 8- and 16-bit linear PCM (rates up to limit of hardware) | WAVE (.wav) | |
Image | ||||
JPEG | X | X | base+progressive | |
GIF | X | |||
PNG | X | X | ||
BMP | X | |||
Video | ||||
H.263 | X | X | 3GPP (.3gp) files | |
H.264 | X | 3GPP (.3gp) and MPEG-4 (.mp4) files | ||
MPEG4 Simple Profile | X | 3GPP (.3gp) file |
Note that the table above does not list specific bitrate requirements for most video codecs. The reason for this is that in practice, current device hardware does not necessarily support bitrates that map exactly to the required bitrates specified by the relevant standards. Instead, device implementations SHOULD support the highest bitrate practical on the hardware, up to the limits defined by the specifications.
6.2. Audio Recording
When an application has used the android.media.AudioRecord
API to start recording an audio stream, device implementations SHOULD sample and record audio with each of these behaviors:
- Noise reduction processing, if present, SHOULD be disabled.
- Automatic gain control, if present, SHOULD be disabled.
- The device SHOULD exhibit approximately flat amplitude versus frequency characteristics; specifically, ±3 dB, from 100 Hz to 4000 Hz
- Audio input sensitivity SHOULD be set such that a 90 dB sound power level (SPL) source at 1000 Hz yields RMS of 5000 for 16-bit samples.
- PCM amplitude levels SHOULD linearly track input SPL changes over at least a 30 dB range from -18 dB to +12 dB re 90 dB SPL at the microphone.
- Total harmonic distortion SHOULD be less than 1% from 100 Hz to 4000 Hz at 90 dB SPL input level.
Note: while the requirements outlined above are stated as "SHOULD" for Android 2.2, the Compatibility Definition for a future version is planned to change these to "MUST". That is, these requirements are optional in Android 2.2 but will be required by a future version. Existing and new devices that run Android 2.2 Android are very strongly encouraged to meet these requirements in Android 2.2 , or they will not be able to attain Android compatibility when upgraded to the future version.
6.3. Audio Latency
Audio latency is broadly defined as the interval between when an application requests an audio playback or record operation, and when the device implementation actually begins the operation. Many classes of applications rely on short latencies, to achieve real-time effects such sound effects or VOIP communication. Device implementations SHOULD meet all audio latency requirements outlined in this section.
For the purposes of this section:
- "cold output latency" is defined to be the interval between when an application requests audio playback and when sound begins playing, when the audio system has been idle and powered down prior to the request
- "warm output latency" is defined to be the interval between when an application requests audio playback and when sound begins playing, when the audio system has been recently used but is currently idle (that is, silent)
- "continuous output latency" is defined to be the interval between when an application issues a sample to be played and when the speaker physically plays the corresponding sound, while the device is currently playing back audio
- "cold input latency" is defined to be the interval between when an application requests audio recording and when the first sample is delivered to the application via its callback, when the audio system and microphone has been idle and powered down prior to the request
- "continuous input latency" is defined to be when an ambient sound occurs and when the sample corresponding to that sound is delivered to a recording application via its callback, while the device is in recording mode
Using the above definitions, device implementations SHOULD exhibit each of these properties:
- cold output latency of 100 milliseconds or less
- warm output latency of 10 milliseconds or less
- continuous output latency of 45 milliseconds or less
- cold input latency of 100 milliseconds or less
- continuous input latency of 50 milliseconds or less
Note: while the requirements outlined above are stated as "SHOULD" for Android 2.2, the Compatibility Definition for a future version is planned to change these to "MUST". That is, these requirements are optional in Android 2.2 but will be required by a future version. Existing and new devices that run Android 2.2 Android are very strongly encouraged to meet these requirements in Android 2.2 , or they will not be able to attain Android compatibility when upgraded to the future version.
7. Developer Tool Compatibility
Device implementations MUST support the Android Developer Tools provided in the Android SDK. Specifically, Android-compatible devices MUST be compatible with:
- Android Debug Bridge (known as adb) [ Resources, 19 ]
Device implementations MUST support alladb
functions as documented in the Android SDK. The device-sideadb
daemon SHOULD be inactive by default, but there MUST be a user-accessible mechanism to turn on the Android Debug Bridge. - Dalvik Debug Monitor Service (known as ddms) [ Resources, 19 ]
Device implementations MUST support allddms
features as documented in the Android SDK. Asddms
usesadb
, support forddms
SHOULD be inactive by default, but MUST be supported whenever the user has activated the Android Debug Bridge, as above. - Monkey [ Resources, 22 ]
Device implementations MUST include the Monkey framework, and make it available for applications to use.
8. Hardware Compatibility
Android is intended to support device implementers creating innovative form factors and configurations. At the same time Android developers expect certain hardware, sensors and APIs across all Android device. This section lists the hardware features that all Android 2.2 compatible devices must support.
If a device includes a particular hardware component that has a corresponding API for third-party developers, the device implementation MUST implement that API as defined in the Android SDK documentation. If an API in the SDK interacts with a hardware component that is stated to be optional and the device implementation does not possess that component:
- class definitions for the component's APIs MUST be present
- the API's behaviors MUST be implemented as no-ops in some reasonable fashion
- API methods MUST return null values where permitted by the SDK documentation
- API methods MUST return no-op implementations of classes where null values are not permitted by the SDK documentation
A typical example of a scenario where these requirements apply is the telephony API: even on non-phone devices, these APIs must be implemented as reasonable no-ops.
Device implementations MUST accurately report accurate hardware configuration information via the getSystemAvailableFeatures()
and hasSystemFeature(String)
methods on the android.content.pm.PackageManager
class. [ Resources, 23 ]
8.1. Display
Android 2.2 includes facilities that perform certain automatic scaling and transformation operations under some circumstances, to ensure that third-party applications run reasonably well on a variety of hardware configurations [ Resources, 24 ]. Devices MUST properly implement these behaviors, as detailed in this section.
For Android 2.2, these are the most common display configurations:
Screen Type | Width (Pixels) | Height (Pixels) | Diagonal Length Range (inches) | Screen Size Group | Screen Density Group |
QVGA | 240 | 320 | 2.6 - 3.0 | Small | Low |
WQVGA | 240 | 400 | 3.2 - 3.5 | Normal | Low |
FWQVGA | 240 | 432 | 3.5 - 3.8 | Normal | Low |
HVGA | 320 | 480 | 3.0 - 3.5 | Normal | Medium |
WVGA | 480 | 800 | 3.3 - 4.0 | Normal | High |
FWVGA | 480 | 854 | 3.5 - 4.0 | Normal | High |
WVGA | 480 | 800 | 4.8 - 5.5 | Large | Medium |
FWVGA | 480 | 854 | 5.0 - 5.8 | Large | Medium |
Device implementations corresponding to one of the standard configurations above MUST be configured to report the indicated screen size to applications via the android.content.res.Configuration
[ Resources, 24 ] class.
Some .apk packages have manifests that do not identify them as supporting a specific density range. When running such applications, the following constraints apply:
- Device implementations MUST interpret resources in a .apk that lack a density qualifier as defaulting to "medium" (known as "mdpi" in the SDK documentation.)
- When operating on a "low" density screen, device implementations MUST scale down medium/mdpi assets by a factor of 0.75.
- When operating on a "high" density screen, device implementations MUST scale up medium/mdpi assets by a factor of 1.5.
- Device implementations MUST NOT scale assets within a density range, and MUST scale assets by exactly these factors between density ranges.
8.1.2. Non-Standard Display Configurations
Display configurations that do not match one of the standard configurations listed in Section 8.1.1 require additional consideration and work to be compatible. Device implementers MUST contact Android Compatibility Team as described in Section 13 to obtain classifications for screen-size bucket, density, and scaling factor. When provided with this information, device implementations MUST implement them as specified.
Note that some display configurations (such as very large or very small screens, and some aspect ratios) are fundamentally incompatible with Android 2.2; therefore device implementers are encouraged to contact Android Compatibility Team as early as possible in the development process.
8.1.3. Display Metrics
Device implementations MUST report correct valuesfor all display metrics defined in android.util.DisplayMetrics
[ Resources, 26 ].
8.1.4. Declared Screen Support
Applications may 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, medium, and large screens, as described in the Android SDK documentation.
8.2. Keyboard
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 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, 25 ] (that is, QWERTY, or 12-key)
8.3. Non-touch Navigation
Device implementations:
- MAY omit a non-touch navigation options (that is, may omit a trackball, d-pad, or wheel)
- MUST report the correct value for
android.content.res.Configuration.navigation
[ Resources, 25 ]
8.4. Screen Orientation
Compatible 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.
8.5. Touchscreen input
Device implementations:
- MUST have a touchscreen
- MAY have either capacative or resistive touchscreen
- MUST report the value of
android.content.res.Configuration
[ Resources, 25 ] reflecting corresponding to the type of the specific touchscreen on the device - SHOULD support fully independently tracked pointers, if the touchscreen supports multiple pointers
8.6. USB
Device implementations:
- MUST implement a USB client, connectable to a USB host with a standard USB-A port
- MUST implement the Android Debug Bridge over USB (as described in Section 7)
- MUST implement the USB mass storage specification, to allow a host connected to the device to access the contents of the /sdcard volume
- SHOULD use the micro USB form factor on the device side
- MAY include a non-standard port on the device side, but if so MUST ship with a cable capable of connecting the custom pinout to standard USB-A port
- SHOULD implement support for the USB Mass Storage specification (so that either removable or fixed storage on the device can be accessed from a host PC)
8.7. Navigation keys
The Home, Menu and Back functions are essential to the Android navigation paradigm. Device implementations MUST make these functions available to the user at all times, regardless of application state. These functions SHOULD be implemented via dedicated buttons. They MAY be implemented using software, gestures, touch panel, etc., but if so they MUST be always accessible and not obscure or interfere with the available application display area.
Device implementers SHOULD also provide a dedicated search key. Device implementers MAY also provide send and end keys for phone calls.
8.8. Wireless Data Networking
Device implementations MUST include support for wireless high-speed data networking. Specifically, device implementations MUST include support for at least one wireless data standard capable of 200Kbit/sec or greater. Examples of technologies that satisfy this requirement include EDGE, HSPA, EV-DO, 802.11g, etc.
If a device implementation includes a particular modality for which the Android SDK includes an API (that is, WiFi, GSM, or CDMA), the implementation MUST support the API.
Devices MAY implement more than one form of wireless data connectivity. Devices MAY implement wired data connectivity (such as Ethernet), but MUST nonetheless include at least one form of wireless connectivity, as above.
8.9. Camera
Device implementations MUST include a rear-facing camera. The included rear-facing camera:
- 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
.
Device implementations MUST implement the following behaviors for the camera-related APIs:
- If an application has never called android.hardware.Camera.Parameters.setPreviewFormat(int), then the device MUST use android.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 the onPreviewFrame() method when the preview format is YCbCr_420_SP, the data in the byte[] passed into onPreviewFrame() must further be in the NV21 encoding format. (This is the format used natively by the 7k hardware family.) That is, NV21 MUST be the default.
Device implementations MUST implement the full Camera API included in the Android 2.2 SDK documentation [ Resources, 27 ]), 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.)
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.
Device implementations MAY include a front-facing camera. However, if a device implementation includes a front-facing camera, the camera API as implemented on the device MUST NOT use the front-facing camera by default. That is, the camera API in Android 2.2 is for rear-facing cameras only, and device implementations MUST NOT reuse or overload the API to act on a front-facing camera, if one is present. Note that any custom APIs added by device implementers to support front-facing cameras MUST abide by sections 3.5 and 3.6; for instance, if a custom android.hardware.Camera
or Camera.Parameters
subclass is provided to support front-facing cameras, it MUST NOT be located in an existing namespace, as described by sections 3.5 and 3.6. Note that the inclusion of a front-facing camera does not meet the requirement that devices include a rear-facing camera.
8.10. Accelerometer
Device implementations MUST include a 3-axis accelerometer and MUST be able to deliver events at 50 Hz or greater. The coordinate system used by the accelerometer MUST comply with the Android sensor coordinate system as detailed in the Android APIs (see [ Resources, 28 ]).
8.11. Compass
Device implementations MUST include a 3-axis compass and MUST be able to deliver events 10 Hz or greater. The coordinate system used by the compass MUST comply with the Android sensor coordinate system as defined in the Android API (see [ Resources, 28 ]).
8.12. GPS
Device implementations MUST include a GPS receiver, and SHOULD include some form of "assisted GPS" technique to minimize GPS lock-on time.
8.13. Telephony
Android 2.2 MAY be used on devices that do not include telephony hardware. That is, Android 2.2 is compatible with devices that are not phones. However, if a device implementation does include GSM or CDMA telephony, it MUST implement the full support for the API for that technology. Device implementations that do not include telephony hardware MUST implement the full APIs as no-ops.
See also Section 8.8, Wireless Data Networking.
8.14. Memory and Storage
Device implementations MUST have at least 92MB of memory available to the kernel and userspace. The 92MB MUST be in addition to any memory dedicated to hardware components such as radio, memory, and so on that is not under the kernel's control.
Device implementations MUST have at least 150MB of non-volatile storage available for user data. That is, the /data
partition MUST be at least 150MB.
Beyond the requirements above, device implementations SHOULD have at least 128MB of memory available to kernel and userspace, in addition to any memory dedicated to hardware components that is not under the kernel's control. Device implementations SHOULD have at least 1GB of non-volatile storage available for user data. Note that these higher requirements are planned to become hard minimums in a future version of Android. Device implementations are strongly encouraged to meet these requirements now, or else they may not be eligible for compatibility for a future version of Android.
8.15. Application Shared Storage
Device implementations MUST offer shared storage for applications. The shared storage provided MUST be at least 2GB 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.
Regardless of the form of shared storage used, the shared storage MUST implement USB mass storage, as described in Section 8.6. As shipped out of the box, the shared storage MUST be mounted with the FAT filesystem.
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 2GB 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 2GB in size or larger, formatted as FAT, 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) SHOULD modify the core applications such as the media scanner and ContentProvider to transparently support files placed in both locations.
8.16. Bluetooth
Device implementations MUST include a Bluetooth transceiver. Device implementations MUST enable the RFCOMM-based Bluetooth API as described in the SDK documentation [ Resources, 30 ]. Device implementations SHOULD implement relevant Bluetooth profiles, such as A2DP, AVRCP, OBEX, etc. as appropriate for the device.
The Compatibility Test Suite includes cases that cover basic operation of the Android RFCOMM Bluetooth API. However, since Bluetooth is a communications protocol between devices, it cannot be fully tested by unit tests running on a single device. Consequently, device implementations MUST also pass the human-driven Bluetooth test procedure described in Appendix A.
9. Performance Compatibility
One of the goals of the Android Compatibility Program is to enable consistent application experience to consumers. Compatible implementations must ensure not only that applications simply run correctly on the device, but that they do so with reasonable performance and overall good user experience. Device implementations MUST meet the key performance metrics of an Android 2.2 compatible device defined in the table below:
Metric | Performance Threshold | Comments |
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. |
10. 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, 29 ] 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.
10.1. Permissions
Device implementations MUST support the Android permissions model as defined in the Android developer documentation [ Resources, 29 ]. 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.
10.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, 29 ].
10.3. Filesystem Permissions
Device implementations MUST support the Android file access permissions model as defined in as defined in the Security and Permissions reference [ Resources, 29 ].
10.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 10.
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. Specifically:
- 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.
11. 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 2.2. Device implementations MUST pass the latest CTS version available at the time the device software is completed.
12. 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. 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 thid-party applications, the device implementer MUST correct the error via a software update available that can be applied per the mechanism just described.
13. Contact Us
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.
Appendix A - Bluetooth Test Procedure
The Compatibility Test Suite includes cases that cover basic operation of the Android RFCOMM Bluetooth API. However, since Bluetooth is a communications protocol between devices, it cannot be fully tested by unit tests running on a single device. Consequently, device implementations MUST also pass the human-driven Bluetooth test procedure described below.
The test procedure is based on the BluetoothChat sample app included in the Android open-source project tree. The procedure requires two devices:
- a candidate device implementation running the software build to be tested
- a separate device implementation already known to be compatible, and of a model from the device implementation being tested -- that is, a "known good" device implementation
The test procedure below refers to these devices as the "candidate" and "known good" devices, respectively.
Setup and Installation
- Build BluetoothChat.apk via 'make samples' from an Android source code tree.
- Install BluetoothChat.apk on the known-good device.
- Install BluetoothChat.apk on the candidate device.
Test Bluetooth Control by Apps
- Launch BluetoothChat on the candidate device, while Bluetooth is disabled.
- Verify that the candidate device either turns on Bluetooth, or prompts the user with a dialog to turn on Bluetooth.
Test Pairing and Communication
- Launch the Bluetooth Chat app on both devices.
- Make the known-good device discoverable from within BluetoothChat (using the Menu).
- On the candidate device, scan for Bluetooth devices from within BluetoothChat (using the Menu) and pair with the known-good device.
- Send 10 or more messages from each device, and verify that the other device receives them correctly.
- Close the BluetoothChat app on both devices by pressing Home .
- Unpair each device from the other, using the device Settings app.
Test Pairing and Communication in the Reverse Direction
- Launch the Bluetooth Chat app on both devices.
- Make the candidate device discoverable from within BluetoothChat (using the Menu).
- On the known-good device, scan for Bluetooth devices from within BluetoothChat (using the Menu) and pair with the candidate device.
- Send 10 or messages from each device, and verify that the other device receives them correctly.
- Close the Bluetooth Chat app on both devices by pressing Back repeatedly to get to the Launcher.
Test Re-Launches
- Re-launch the Bluetooth Chat app on both devices.
- Send 10 or messages from each device, and verify that the other device receives them correctly.
Note: the above tests have some cases which end a test section by using Home, and some using Back. These tests are not redundant and are not optional: the objective is to verify that the Bluetooth API and stack works correctly both when Activities are explicitly terminated (via the user pressing Back, which calls finish()), and implicitly sent to background (via the user pressing Home.) Each test sequence MUST be performed as described.