发送广播
时间:2014-04-30 02:49:15
收藏:0
阅读:414
public void sendPlayStateBrocast()
{
if (mContext !=
null)
{
Intent intent = new
Intent(BROCAST_NAME);
intent.putExtra(MusicPlayState.PLAY_STATE_NAME,
mPlayState);
intent.putExtra(MusicPlayState.PLAY_MUSIC_INDEX,
mCurPlayIndex);
if (mPlayState !=
MusicPlayState.MPS_NOFILE)
{
Bundle
bundle = new Bundle();
MusicData data =
mMusicFileList.get(mCurPlayIndex);
bundle.putParcelable(MusicData.KEY_MUSIC_DATA,
data);
intent.putExtra(MusicData.KEY_MUSIC_DATA,
bundle);
}
mContext.sendBroadcast(intent);
}
}
评论(0)