1

startService を呼び出さずに bindService を呼び出すことはできますか? もしそうなら、それは私のサービスで私の onCreate メソッドも呼び出しますか?

  public static void bindMusicService(Context c){
        /*mediaPlayerServiceIntent binds our connection to the MediaPlayerService. */
        mediaPlayerServiceIntent = new Intent(c, MediaPlayerService.class);
        c.bindService(mediaPlayerServiceIntent, serviceConnection, Context.BIND_AUTO_CREATE);
        mServiceIsBound = true;
        Log.i("Main","Service is bound!");
    }
4

0 に答える 0