joshdholtz / Sentry-Android

[Deprecated] Use official "raven-java" library
https://github.com/getsentry/sentry-java
MIT License
180 stars 48 forks source link

Capture in background #9

Closed joshdholtz closed 10 years ago

joshdholtz commented 10 years ago

@stoodder @pradyumnakumar @suda

Fixes #4 and Fixes #8

suda commented 10 years ago

Great! Thanks :)

joshdholtz commented 10 years ago

@pradyumnakumar That problem is occurring with the dependency on Protocol. Protocol sends off requests in an AsyncTask which has to run on thread where Looper is prepared. I should probably remove that dependency anyway since its really not needed at all.

pradyumnakumar commented 10 years ago

If you remove the AsyncTask, won't it block the thread till the request is finished? (assuming that you won't be calling "doCaptureEventPost" from a new thread)

stoodder commented 10 years ago

Back to you

joshdholtz commented 10 years ago

@pradyumnakumar This should do it for you now. I removed the dependency on Protocol but kept using an AsyncTask. I also used your suggestion for the HandlerThread.

Code is a but messy right now but I will do some cleanup on it later :)

Also fixed all the indentation cause it was pretty messed up.

Gregadeaux commented 10 years ago

:+1:

pradyumnakumar commented 10 years ago

Thanks :+1: