27 মার্চ, 2025 থেকে, আমরা AOSP তৈরি করতে এবং অবদান রাখতে aosp-main
এর পরিবর্তে android-latest-release
ব্যবহার করার পরামর্শ দিচ্ছি। আরও তথ্যের জন্য, AOSP-তে পরিবর্তনগুলি দেখুন।
বাহ্যিক সময় সনাক্তকরণ
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
অ্যান্ড্রয়েড 12 থেকে, অ্যান্ড্রয়েড ঐচ্ছিকভাবে time_detector
পরিষেবাতে ইউনিক্স যুগের সময়গুলি সুপারিশ করতে সময়ের একটি বাহ্যিক উত্স ব্যবহার করতে পারে। এটি AOSP-এ ডিফল্টরূপে সক্ষম নয়।
বাহ্যিক সময়ের উৎপত্তি ডিভাইস নির্মাতাদের Android এ সম্পূর্ণ কাস্টম সময়ের পরামর্শ প্রদান করতে দেয়। বাহ্যিক সময়ের উৎপত্তি থেকে পরামর্শ পাওয়ার পর, time_detector
পরিষেবা নির্ধারণ করে যে কনফিগার করা অগ্রাধিকার নিয়মগুলি ব্যবহার করে সিস্টেম ঘড়ি আপডেট করা হবে কিনা।
বাস্তবায়ন
বাহ্যিক সময় সনাক্তকরণ সমর্থন করার জন্য, ডিভাইস নির্মাতাদের অবশ্যই একটি উপাদান প্রয়োগ করতে হবে যা একটি সিস্টেম API কলের মাধ্যমে time_detector
পরিষেবাতে বাহ্যিক সময়ের পরামর্শ জমা দেয়।
বাহ্যিক উত্স কনফিগার করতে, core/res/res/values/config.xml
সিস্টেম সার্ভার কনফিগারেশন ফাইলটি ব্যবহার করুন। config_autoTimeSourcesPriority
এ external
মান যোগ করুন।
নিম্নলিখিত উদাহরণটি Android কে সিস্টেম ঘড়ি সেট করার সময় বাহ্যিক সময়ের পরামর্শগুলিকে সর্বোচ্চ অগ্রাধিকার দিতে বলে৷ যদি কোন বৈধ বাহ্যিক সময়ের পরামর্শ উপলব্ধ না থাকে তাহলে পরবর্তী মূল, এই ক্ষেত্রে gnss
, ব্যবহার করা হয়।
<string-array name="config_autoTimeSourcesPriority">
<item>external</item>
<item>gnss</item>
</string-array>
সিস্টেমটিকে একটি বাহ্যিক সময়ের পরামর্শ প্রদান করতে, TimeManager
এ suggestExternalTime()
পদ্ধতি ব্যবহার করুন। যদি কনফিগারেশন ফাইলে config_autoTimeSourcesPriority
ব্যবহার করে এক্সটার্নাল অরিজিন কনফিগার করা হয় এবং কোন উচ্চতর অগ্রাধিকার সময়ের পরামর্শ পাওয়া না যায়, তাহলে Android বর্তমান ইউনিক্স যুগের সময় সেট করতে এই পদ্ধতিতে পাস করা টাইমস্ট্যাম্প ব্যবহার করে।
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-27 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-08-27 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["From Android 12, Android can optionally use an external\nsource of time to suggest Unix epoch times to the [`time_detector`](/docs/core/connect/time#time_detector-service) service.\nThis isn't enabled by default in AOSP.\n\nThe *external* time origin allows device manufacturers to provide completely\ncustom time suggestions to Android. After receiving suggestions from the\nexternal time origin, the `time_detector` service determines whether to update\nthe system clock using the configured [prioritization rules](/docs/core/connect/time#automatic-time).\n\nImplementation\n\nTo support external time detection, device manufacturers must implement a\ncomponent that submits external time suggestions to the `time_detector` service\nthrough a system API call.\n\nTo configure the external origin, use the `core/res/res/values/config.xml`\nsystem server configuration file. Add the value `external` to\n`config_autoTimeSourcesPriority`.\n\nThe following example tells Android to give external time suggestions the\nhighest priority when setting the system clock. If there is no valid external\ntime suggestion available then the next origin, `gnss` in this case, is used. \n\n \u003cstring-array name=\"config_autoTimeSourcesPriority\"\u003e\n \u003citem\u003eexternal\u003c/item\u003e\n \u003citem\u003egnss\u003c/item\u003e\n \u003c/string-array\u003e\n\nTo provide the system with an external time suggestion, use the\n[`suggestExternalTime()`](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/core/java/android/app/time/TimeManager.java?q=%22void%20suggestExternalTime%22) method in `TimeManager`. If the external origin is\nconfigured using `config_autoTimeSourcesPriority` in the configuration file and\nno higher priority time suggestions are available, Android uses the timestamp\npassed to this method to set the current Unix epoch time."]]