當前位置: 首頁>>代碼示例>>Java>>正文


Java PlaybackState.ACTION_PLAY_FROM_SEARCH屬性代碼示例

本文整理匯總了Java中android.media.session.PlaybackState.ACTION_PLAY_FROM_SEARCH屬性的典型用法代碼示例。如果您正苦於以下問題:Java PlaybackState.ACTION_PLAY_FROM_SEARCH屬性的具體用法?Java PlaybackState.ACTION_PLAY_FROM_SEARCH怎麽用?Java PlaybackState.ACTION_PLAY_FROM_SEARCH使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在android.media.session.PlaybackState的用法示例。


在下文中一共展示了PlaybackState.ACTION_PLAY_FROM_SEARCH屬性的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getAvailableActions

private long getAvailableActions(int nextState) {
    long actions = PlaybackState.ACTION_PLAY |
            PlaybackState.ACTION_PLAY_FROM_MEDIA_ID |
            PlaybackState.ACTION_PLAY_FROM_SEARCH |
            PlaybackState.ACTION_SKIP_TO_NEXT |
            PlaybackState.ACTION_SKIP_TO_PREVIOUS |
            PlaybackState.ACTION_FAST_FORWARD |
            PlaybackState.ACTION_REWIND |
            PlaybackState.ACTION_PAUSE;

    if (nextState == PlaybackState.STATE_PLAYING) {
        actions |= PlaybackState.ACTION_PAUSE;
    }

    return actions;
}
 
開發者ID:nejtv,項目名稱:androidtv-sample,代碼行數:16,代碼來源:PlaybackOverlayFragment.java

示例2: getAvailableActions

private long getAvailableActions() {
    long actions = PlaybackState.ACTION_PLAY | PlaybackState.ACTION_PLAY_FROM_MEDIA_ID |
            PlaybackState.ACTION_PLAY_FROM_SEARCH;
    if (mPlayingQueue == null || mPlayingQueue.isEmpty()) {
        return actions;
    }
    if (mPlayback.isPlaying()) {
        actions |= PlaybackState.ACTION_PAUSE;
    }
    if (mCurrentIndexOnQueue > 0) {
        actions |= PlaybackState.ACTION_SKIP_TO_PREVIOUS;
    }
    if (mCurrentIndexOnQueue < mPlayingQueue.size() - 1) {
        actions |= PlaybackState.ACTION_SKIP_TO_NEXT;
    }
    return actions;
}
 
開發者ID:mrinalgit-dev,項目名稱:MrinalMusicPlayer,代碼行數:17,代碼來源:MusicService.java

示例3: getAvailableActions

private long getAvailableActions() {
    long actions = PlaybackState.ACTION_PLAY |
            PlaybackState.ACTION_PLAY_FROM_MEDIA_ID |
            PlaybackState.ACTION_PLAY_FROM_SEARCH;

    if (mPlaybackState == LeanbackPlaybackState.PLAYING) {
        actions |= PlaybackState.ACTION_PAUSE;
    }

    return actions;
}
 
開發者ID:bassaer,項目名稱:HelloTV,代碼行數:11,代碼來源:PlaybackOverlayActivity.java

示例4: getAvailableActions

private long getAvailableActions() {
    long actions = PlaybackState.ACTION_PLAY | PlaybackState.ACTION_PLAY_FROM_MEDIA_ID | PlaybackState.ACTION_PLAY_FROM_SEARCH;
    MessageObject playingMessageObject = MediaController.getInstance().getPlayingMessageObject();
    if (playingMessageObject != null) {
        if (!MediaController.getInstance().isAudioPaused()) {
            actions |= PlaybackState.ACTION_PAUSE;
        }
        actions |= PlaybackState.ACTION_SKIP_TO_PREVIOUS;
        actions |= PlaybackState.ACTION_SKIP_TO_NEXT;
    }
    return actions;
}
 
開發者ID:MLNO,項目名稱:airgram,代碼行數:12,代碼來源:MusicBrowserService.java

示例5: getAvailableActions

private long getAvailableActions() {
    long actions = PlaybackState.ACTION_PLAY |
            PlaybackState.ACTION_PLAY_FROM_MEDIA_ID |
            PlaybackState.ACTION_PLAY_FROM_SEARCH |
            PlaybackState.ACTION_SKIP_TO_NEXT |
            PlaybackState.ACTION_SKIP_TO_PREVIOUS |
            PlaybackState.ACTION_FAST_FORWARD |
            PlaybackState.ACTION_REWIND;

    if (mPlaybackState == LeanbackPlaybackState.PLAYING) actions |= PlaybackState.ACTION_PAUSE;
    return actions;
}
 
開發者ID:hitherejoe,項目名稱:PictureInPicturePlayground,代碼行數:12,代碼來源:PlaybackActivity.java

示例6: availableActions

private long availableActions() {
    Log.d ( TAG, "availableActions()...") ;
    long actions = PlaybackState.ACTION_PLAY | PlaybackState.ACTION_PLAY_FROM_MEDIA_ID |
            PlaybackState.ACTION_SKIP_TO_NEXT  | PlaybackState.ACTION_SKIP_TO_PREVIOUS
            | PlaybackState.ACTION_SKIP_TO_NEXT |PlaybackState.ACTION_PLAY_FROM_SEARCH
            | PlaybackState.ACTION_PLAY_FROM_URI ;
    if (isPlaying()) {
        actions |= PlaybackState.ACTION_PAUSE;
    }
    return actions;
}
 
開發者ID:smitzey,項目名稱:AndroidAutoTourGuide,代碼行數:11,代碼來源:AudioPlaybackHelper.java

示例7: getAvailableActions

private long getAvailableActions() {
    long actions = PlaybackState.ACTION_PLAY | PlaybackState.ACTION_PLAY_FROM_MEDIA_ID |
            PlaybackState.ACTION_PLAY_FROM_SEARCH |
            PlaybackState.ACTION_SKIP_TO_NEXT  | PlaybackState.ACTION_SKIP_TO_PREVIOUS;
    if (isPlaying()) {
        actions |= PlaybackState.ACTION_PAUSE;
    }
    return actions;
}
 
開發者ID:googlecodelabs,項目名稱:android-music-player,代碼行數:9,代碼來源:PlaybackManager.java


注:本文中的android.media.session.PlaybackState.ACTION_PLAY_FROM_SEARCH屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。