@Rafael, @Eduardo
É Otto mesmo. Esqueci de mencionar.
Sim. Tenho um Service que faz o bind e roda em background (tipo este em "Using Messenger") e o Otto funciona bem (mas somente se tiver habilitado o código da questão que passei do StackOverFlow).
O erro está ocorrendo somente com o IntentService. Assegurar o Thread.ANY também não funcionou.
De qualquer forma, troquei para o EventBus da GreenRobot e funcionou bem mais tranquilo.
Aqui tem boas explicações.
Em 5 de março de 2015 09:01, Eduardo Baião <eduardobaiao@gmail.com> escreveu:
Já tentou fazer bind com outra classe e fazer esta classe receber a mensagem do Bus?2015-03-05 7:56 GMT-03:00 Rafael de Araújo <orafaaraujo@gmail.com>:Não utilizo o EventBus, mas creio que ele não está recebendo o evento em uma thread principal, UI no caso.[]'sAtt,Rafael de Araújo2015-03-05 2:30 GMT-03:00 Gink Labrev <gink.labrev@gmail.com>:Pessoal,--Mesmo usando o código descrito nesta solução http://stackoverflow.com/a/15433353, estou recebendo o erro abaixo quando executo bus.post() em um IntentService:java.lang.IllegalStateException: Event bus [Bus "default"] accessed from non-main thread LooperAlguém sabe do que se trata ?
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
0 comentários:
Postar um comentário