// Create a Pending Intent that will broadcast the // media button pre dịch - // Create a Pending Intent that will broadcast the // media button pre Việt làm thế nào để nói

// Create a Pending Intent that wil

// Create a Pending Intent that will broadcast the // media button press action. Set the target component // to your Broadcast Receiver.
Intent mediaButtonlntent = new Intent(Intent.ACTION_MEDIA_BUTTON); ComponentName component =
new ComponentName(this, MediaControlReceiver.class);
mediaButtonlntent.setComponent(component);
Pendinglntent mediaPendinglntent =
PendingIntent.getBroadcast(getApplicationContext(), 0,
mediaButtonIntent, 0);
// Create a new Remote Control Client using the // Pending Intent and register it with the // Audio Manager myRemoteControlClient =
new RemoteControlClient(mediaPendingIntent);
am.registerRemoteControlClient(myRemoteControlClient);
code snippet PA4AD_Ch15_Media_Player/src/AudioPlayerActivity.java
In this example, the Remote Control Client button presses will be received by the Media Control Receiver, which, in turn, will broadcast them to the Receiver registered within the Activity.
After registering your Remote Control Client, you can use it to modify the metadata displayed on the associated display.
Use the setTransportControlFlags method to define which playback controls your application supports, as shown in Listing 15-16.
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
// Create a Pending Intent that will broadcast the // media button press action. Set the target component // to your Broadcast Receiver.Intent mediaButtonlntent = new Intent(Intent.ACTION_MEDIA_BUTTON); ComponentName component =new ComponentName(this, MediaControlReceiver.class);mediaButtonlntent.setComponent(component);Pendinglntent mediaPendinglntent =PendingIntent.getBroadcast(getApplicationContext(), 0, mediaButtonIntent, 0);// Create a new Remote Control Client using the // Pending Intent and register it with the // Audio Manager myRemoteControlClient =new RemoteControlClient(mediaPendingIntent);am.registerRemoteControlClient(myRemoteControlClient); code snippet PA4AD_Ch15_Media_Player/src/AudioPlayerActivity.javaIn this example, the Remote Control Client button presses will be received by the Media Control Receiver, which, in turn, will broadcast them to the Receiver registered within the Activity.After registering your Remote Control Client, you can use it to modify the metadata displayed on the associated display.Use the setTransportControlFlags method to define which playback controls your application supports, as shown in Listing 15-16.
đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
// Tạo một ý định chờ rằng sẽ phát sóng // phương tiện truyền thông hành động nút bấm. Đặt mục tiêu thành phần // để Broadcast Receiver của bạn.
Ý định mediaButtonlntent = new Intent (Intent.ACTION_MEDIA_BUTTON); ComponentName thành phần =
mới ComponentName (this, MediaControlReceiver.class);
mediaButtonlntent.setComponent (thành phần);
Pendinglntent mediaPendinglntent =
PendingIntent.getBroadcast (getApplicationContext (), 0,
mediaButtonIntent, 0);
// Tạo một khách hàng điều khiển từ xa mới bằng cách sử dụng // Trong khi chờ Ý định và đăng ký với // Audio Manager myRemoteControlClient =
mới RemoteControlClient (mediaPendingIntent);
am.registerRemoteControlClient (myRemoteControlClient);
đoạn mã PA4AD_Ch15_Media_Player / src / AudioPlayerActivity.java
Trong ví dụ này, điều khiển từ xa nút khách hàng ép sẽ được nhận bởi Media Control nhận, trong đó, lần lượt, sẽ phát chúng cho người nhận đã đăng ký trong phạm vi hoạt động.
Sau khi đăng ký kiểm soát khách hàng từ xa, bạn có thể sử dụng nó để chỉnh sửa siêu dữ liệu hiển thị trên màn hình hiển thị có liên quan.
sử dụng các phương pháp setTransportControlFlags để xác định hệ thống điều khiển phát lại ứng dụng của bạn hỗ trợ, như thể hiện trong Liệt kê 15-16.
đ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: