WakeLocks are a Power Manager system Service feature that your applica dịch - WakeLocks are a Power Manager system Service feature that your applica Việt làm thế nào để nói

WakeLocks are a Power Manager syste

WakeLocks are a Power Manager system Service feature that your application can use to control the power state of the host device.
Wake Locks can be used to keep the CPU running, prevent the screen from dimming, prevent the screen from turning off, and prevent the keyboard backlight from turning off.
Creating and holding Wake Locks can have a dramatic impact on the host device’s battery life. It’s good practice to use Wake Locks sparingly, creating them only when strictly necessary and holding them for as short a time as possible.
Because of the dramatic impact Wake Locks can have on battery life, your application needs to request a wake_lock permission in order to create them:

To create a Wake Lock, call newWakeLock on the Power Manager, specifying one of the following Wake Lock types.
^ full_wake_lock — Keeps the screen at full brightness, the keyboard backlight illuminated,
and the CPU running.
^ screen_bright_wake_lock — Keeps the screen at full brightness and the CPU running. 
► screen_dim_wake_lock — Keeps the screen on (but lets it dim) and the CPU running.
► partial_wake_lock — Keeps the CPU running.
Screen dim Wake Locks typically are used to prevent the screen from dimming during applications that are likely to involve little user interaction — for example, a video player.
Partial Wake Locks (or CPU Wake Locks) are used to prevent the device from going to sleep until an action has completed. This is most commonly used by Services started within Intent Receivers, which may receive Intents while the device is asleep. It’s worth noting that in this case the system will hold a CPU Wake Lock throughout the onReceive handler of the Broadcast Receiver.
If you start a Service, or broadcast an Intent within the onReceive handler of a Broadcast Receiver, it is possible that the Wake Lock it holds will be released before your Service has started or your Intent received. To ensure the Service exe¬cution is completed, you will need to put in place a separate Wake Lock policy.
After creating a Wake Lock, acquire it by calling acquire.
You can optionally specify a timeout to ensure the maximum duration the Wake Lock will be held for. When the action for which you’re holding the Wake Lock completes, call release to let the system manage the power state.
Listing 18-12 shows the typical use pattern for creating, acquiring, and releasing a Wake Lock.


0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
WakeLocks are a Power Manager system Service feature that your application can use to control the power state of the host device.Wake Locks can be used to keep the CPU running, prevent the screen from dimming, prevent the screen from turning off, and prevent the keyboard backlight from turning off.Creating and holding Wake Locks can have a dramatic impact on the host device’s battery life. It’s good practice to use Wake Locks sparingly, creating them only when strictly necessary and holding them for as short a time as possible.Because of the dramatic impact Wake Locks can have on battery life, your application needs to request a wake_lock permission in order to create them:To create a Wake Lock, call newWakeLock on the Power Manager, specifying one of the following Wake Lock types.^ full_wake_lock — Keeps the screen at full brightness, the keyboard backlight illuminated,and the CPU running.^ screen_bright_wake_lock — Keeps the screen at full brightness and the CPU running. ► screen_dim_wake_lock — Keeps the screen on (but lets it dim) and the CPU running.► partial_wake_lock — Keeps the CPU running.Screen dim Wake Locks typically are used to prevent the screen from dimming during applications that are likely to involve little user interaction — for example, a video player.Partial Wake Locks (or CPU Wake Locks) are used to prevent the device from going to sleep until an action has completed. This is most commonly used by Services started within Intent Receivers, which may receive Intents while the device is asleep. It’s worth noting that in this case the system will hold a CPU Wake Lock throughout the onReceive handler of the Broadcast Receiver.If you start a Service, or broadcast an Intent within the onReceive handler of a Broadcast Receiver, it is possible that the Wake Lock it holds will be released before your Service has started or your Intent received. To ensure the Service exe¬cution is completed, you will need to put in place a separate Wake Lock policy.
After creating a Wake Lock, acquire it by calling acquire.
You can optionally specify a timeout to ensure the maximum duration the Wake Lock will be held for. When the action for which you’re holding the Wake Lock completes, call release to let the system manage the power state.
Listing 18-12 shows the typical use pattern for creating, acquiring, and releasing a Wake Lock.


đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
WakeLocks là một Power Manager tính năng Dịch vụ hệ thống ứng dụng của bạn có thể sử dụng để kiểm soát quyền lực nhà nước của các thiết bị máy chủ.
Wake Khóa có thể được sử dụng để giữ cho CPU chạy, ngăn màn hình mờ, ngăn màn hình tắt, và ngăn chặn sự đèn nền bàn phím tắt.
Tạo và giữ Khóa Wake có thể có một tác động đáng kể về tuổi thọ pin của thiết bị chủ. Đó là thực hành tốt để sử dụng Khóa Wake ít, tạo ra chúng chỉ khi thực sự cần thiết và giữ chúng trong một thời gian ngắn nhất có thể.
Bởi vì các Khóa tác động Wake kịch tính có thể có tuổi thọ pin, ứng dụng của bạn cần phải yêu cầu sự cho phép wake_lock để tạo ra chúng:

Để tạo một Khóa Wake, gọi newWakeLock về quản lý năng lượng, xác định một trong những loại Wake Khóa sau.
^ Full_wake_lock - Giữ màn hình ở độ sáng đầy đủ, đèn nền bàn phím được chiếu sáng,
và CPU chạy.
^ Screen_bright_wake_lock - Giữ màn hình full độ sáng và CPU chạy. 
► screen_dim_wake_lock - Giữ màn hình trên (nhưng cho phép nó mờ) và CPU chạy.
► partial_wake_lock -. Giữ CPU chạy
màn hình mờ Wake Khóa thường được sử dụng để ngăn chặn các màn hình từ mờ trong các ứng dụng có khả năng liên quan đến tương tác người dùng ít -. Ví dụ, một máy nghe nhạc video
Khóa Wake một phần (hoặc CPU Wake Khóa) được sử dụng để ngăn chặn thiết bị đi ngủ cho đến khi một hành động đã hoàn thành. Điều này thường được sử dụng bởi các dịch vụ bắt đầu trong vòng Receivers Ý định, đó có thể nhận được Intents trong khi thiết bị đang ngủ. Nó đáng chú ý rằng trong trường hợp này hệ thống sẽ tổ chức một Khóa CPU Wake suốt handler onReceive của Broadcast Receiver.
Nếu bạn bắt đầu một dịch vụ, hoặc phát sóng một Intent trong xử lý onReceive của một nhận phát sóng, có thể là các Khóa Wake nó nắm giữ sẽ được phát hành trước khi dịch vụ của bạn đã bắt đầu hoặc Ý định của bạn nhận được. Để đảm bảo các dịch vụ exe¬cution hoàn tất, bạn sẽ cần phải đưa ra một chính sách Wake Khóa riêng biệt.
Sau khi tạo một Khóa Wake, có được nó bằng cách gọi có được.
Bạn có thể chỉ định một thời gian chờ để đảm bảo thời gian tối đa Wake Khóa sẽ được tổ chức. Khi các hành động mà bạn đang nắm giữ Wake Khóa hoàn thành, phát hành gọi để cho hệ thống quản lý quyền lực nhà nước.
Liệt 18-12 cho thấy các mô hình điển hình sử dụng để tạo, mua lại, và phát hành một Khóa Wake.


đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2025 I Love Translation. All reserved.

E-mail: