我正在尝试更新音乐播放器SeekBar,但没有任何反应.服务在我的活动中启动正常并正确绑定(因为我可以使用我服务中的一些方法和音乐播放正常).这是我的服务代码:
public class MusicPlayerService extends Service {
MediaPlayer myMusicPlayer;
String path;
Intent getMusicId = new Intent();
// Binder given to clients
private final IBinder mBinder = new LocalBinder();
/**
* Class used for the client Binder. Because we know this service always
* runs in the same process as its clients, we don't need to deal with IPC.
*/
public class LocalBinder extends Binder {
MusicPlayerService getService() {
// Return this instance of LocalService so clients can call public methods …Run Code Online (Sandbox Code Playgroud)