本文整理匯總了Java中android.widget.MediaController.MediaPlayerControl類的典型用法代碼示例。如果您正苦於以下問題:Java MediaPlayerControl類的具體用法?Java MediaPlayerControl怎麽用?Java MediaPlayerControl使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MediaPlayerControl類屬於android.widget.MediaController包,在下文中一共展示了MediaPlayerControl類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onReceive
import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
@Override
public void onReceive(Context context, Intent intent) {
MediaPlayerControl mediaPlayerControl = Player.getMediaPlayerControl();
if (mediaPlayerControl == null) {
return;
}
TelephonyManager tm = (TelephonyManager) context
.getSystemService(Service.TELEPHONY_SERVICE);
switch (tm.getCallState()) {
case TelephonyManager.CALL_STATE_RINGING:
mediaPlayerControl.pause();
break;
case TelephonyManager.CALL_STATE_IDLE:
if (!mediaPlayerControl.isPlaying()) {
mediaPlayerControl.start();
}
break;
}
}
示例2: setMediaPlayer
import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
public void setMediaPlayer(MediaPlayerControl player) {
this.mPlayer = player;
updatePausePlay();
}
示例3: setMediaPlayer
import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
public void setMediaPlayer(MediaPlayerControl player) {
mPlayer = player;
updatePausePlay();
}
示例4: setMediaPlayer
import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
public void setMediaPlayer(MediaPlayerControl player) {
mPlayer = player;
mHandler.sendEmptyMessage(SHOW_PROGRESS);
updatePausePlay();
}
示例5: setMediaPlayer
import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
public void setMediaPlayer(MediaPlayerControl player) {
mPlayer = player;
updatePausePlay();
}
示例6: getMediaPlayerControl
import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
@Override
public MediaPlayerControl getMediaPlayerControl()
{
return this;
}
示例7: getMediaPlayerControl
import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
static MediaPlayerControl getMediaPlayerControl() {
return mediaPlayerControl;
}
示例8: setMediaPlayer
import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
void setMediaPlayer(MediaPlayerControl mediaPlayerControl);
示例9: getMediaPlayerControl
import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
MediaPlayerControl getMediaPlayerControl();