Skip to content

android.os.NetworkOnMainThreadException  #57

Open

Description

@kakashysen

When I use channel.push android throws this exception android.os.NetworkOnMainThreadException

channel.push("new_msg", "Hi")
                    .receive("ok", { _ ->
                       // message sent
                    })

I think that this library use another thread to call each method like push or connect

Activity

  1. flavius-mester commented on Aug 9, 2017

    @flavius-mester

    The library uses the same thread you initialise/call.
    Which I presume it's the main thread on android. You will need to handle the threding yourself.
    Crate a new thread and use the library within it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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