Bonjour,
J'ai le code suivant mais il bloque et ne passe même pas par la méthode onServiceConnected().
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 @Override public void onServiceConnected(ComponentName className, IBinder service) { sgsBinder = (SGS.SGSBinder) service; Log.e("binding", "binding ok"); synchronized (bindingLock) { bindingLock.notify(); } isSGSBound = true; }Quelqu'un saurait-il m'indiquer d'où peut venir le problème ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 @Override public void onStart() { super.onStart(); bindService(sgsIntent, sgsConnection, Context.BIND_AUTO_CREATE); synchronized (bindingLock) { Log.e("binding", "starting to wait"); try { bindingLock.wait(); } catch (InterruptedException e) { System.out.println("InterruptedException caught"); } } }
Merci d'avance pour votre aide
Partager