本文整理汇总了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();