Service doesn't start

Put your problem here if it does not fit any of the other categories.

Service doesn't start

Postby Kirodema » Wed Nov 10, 2010 10:31 am

Hi,

I am going through an tutorial for an Android Musicplayer (MusicDroid - Audio Player Part II | Hello Android, its german).

This tutorial is a little bit old (written in 2007) and so some methodcalls are a little bit different. My Service class looks pretty much the same as the class in the tutorial except things regarding the Notification class, but that should interfere with the startingprocess of the Service?

My mainclass looks like this (only outputs regarding the service):
My mConnction:
Code: Select all
private ServiceConnection mConnection = new ServiceConnection() {
      
   @Override
   public void onServiceDisconnected(ComponentName arg0) {
      mpInterface = null;
   }
   
   @Override
   public void onServiceConnected(ComponentName arg0, IBinder service) {
      //Toast.makeText(BackEnd.this, "Service is binding", Toast.LENGTH_SHORT).show();
      mpInterface = IBEInterface.Stub.asInterface((IBinder) service);
      try {
         mpInterface.clearPlaylist();
      } catch (RemoteException e) {}
         
      updateSongList(new File(MEDIA_PATH));
   }
};


Here the mConnect is used to bind the Service in onCreate(Bundle savedInstanceState)
Code: Select all
this.bindService(new Intent(this, IBEService.class), mConnection, Context.BIND_AUTO_CREATE);


Also my entry in the manifest file under application:
Code: Select all
<service class=".IBEService" android:process=":remote" android:name="IBEService"></service>


You have any idea, why it isn't working?
Kirodema
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Nov 10, 2010 10:15 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 17 guests