public final class AVBrowserResult extends Object
AVBrowserService, which
contains AVElement instances to sent.
You need to call sendAVElement(ohos.media.common.sessioncore.AVElement) or sendAVElementList(java.util.List<ohos.media.common.sessioncore.AVElement>) to send the information to your application. If
you need to delay sending the information, call detachForRetrieveAsync() before the information is returned to
detach it from the media browser service. After the process of the information is complete, call sendAVElement(ohos.media.common.sessioncore.AVElement) or sendAVElementList(java.util.List<ohos.media.common.sessioncore.AVElement>) to send the information.
SystemCapability.Multimedia#MEDIA| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
detachForRetrieveAsync() |
Detaches the current media item information from the media browser service to delay sending the information.
|
void |
sendAVElement(AVElement element) |
Sends the
AVElement instance to the application. |
void |
sendAVElementList(List<AVElement> avElementList) |
Sends a list of
AVBrowserResult instances to the application. |
public void sendAVElement(AVElement element)
AVElement instance to the application.element - Indicates the media item information to sent.IllegalStateException - Throws this exception if this method is called repeatedly.public void sendAVElementList(List<AVElement> avElementList)
AVBrowserResult instances to the application.avElementList - Indicates the media item information to sent.IllegalStateException - Throws this exception if this method is called repeatedly.public void detachForRetrieveAsync()
IllegalStateException - Throws this exception if this method is called repeatedly, or called after
sendAVElement(ohos.media.common.sessioncore.AVElement) or sendAVElementList(java.util.List<ohos.media.common.sessioncore.AVElement>).