Skip to content

Looper.prepare #4

@elidor86

Description

@elidor86

when starting a connection from android service i got this error :

04-10 13:28:47.954: E/AndroidRuntime(25438): FATAL EXCEPTION: Timer-0
04-10 13:28:47.954: E/AndroidRuntime(25438): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
04-10 13:28:47.954: E/AndroidRuntime(25438): at android.os.Handler.(Handler.java:121)
04-10 13:28:47.954: E/AndroidRuntime(25438): at de.tavendo.autobahn.WebSocketConnection$ThreadHandler.(WebSocketConnection.java:526)
04-10 13:28:47.954: E/AndroidRuntime(25438): at de.tavendo.autobahn.WebSocketConnection.(WebSocketConnection.java:65)
04-10 13:28:47.954: E/AndroidRuntime(25438): at com.taxi.driver.DdpClient.connect(DdpClient.java:151)
04-10 13:28:47.954: E/AndroidRuntime(25438): at com.taxi.driver.DriverService.logMeIn(DriverService.java:728)
04-10 13:28:47.954: E/AndroidRuntime(25438): at com.taxi.driver.DriverService.connectMe(DriverService.java:790)
04-10 13:28:47.954: E/AndroidRuntime(25438): at com.taxi.driver.DriverService$BackgroundTimer.run(DriverService.java:200)
04-10 13:28:47.954: E/AndroidRuntime(25438): at java.util.Timer$TimerImpl.run(Timer.java:284)

if started from the main UI thread ,working great

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions