서비스와 통신을 위해 AIDL 을 사용하였습니다 .


 호출은 이렇게 하였으나 


private final ServiceConnection playControlConnection = new ServiceConnection() {

        

        @Override

        public void onServiceDisconnected(ComponentName name) {

   

        }

        

        @Override

        public void onServiceConnected(ComponentName name, IBinder service) {

            PlayerControler = musicservicecontrol.Stub.asInterface(service);

            playerControl.trace("i", "onServiceConnected");

        }

    };



  protected void onCreate(Bundle savedInstanceState) {

Intent sv = new Intent(playerControl.ServiceID);

getApplicationContext().startService(sv);

getApplicationContext().bindService(new Intent(getApplicationContext() , PlayerService.class), playControlConnection, Context.BIND_AUTO_CREATE);

        super.onCreate(savedInstanceState);

        playerControl.trace("i", "onCreate");

    }

로그를 찍어보니 


01-29 10:45:45.533: I/playerControl(2067): onCreate

01-29 10:45:45.533: I/playerControl(2067): onStart

01-29 10:45:55.533: I/playerControl(2067): onResume

01-29 10:45:55.633: I/playerControl(2067): serice_onBind

01-29 10:45:55.783: I/playerControl(2067): onServiceConnected


이렇게 되는군요 .

전 onCreate 할때 playControlConnection 에서 값을 받아오고 싶은데 바로 연결이 안되서 고생하고 있습니다 .
이게 본래 이렇게 늦게 시작하는 건가요 아니면 정확하게 onResume 다음에 호출되는건가요 ?
정확한 호출 타이밍을 알고 싶습니다 .
아니면 onCreate() 에서 호출하는방법이라도 ...