Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

Network operations on UI Thread #96

Open
mamert opened this issue Oct 3, 2018 · 1 comment
Open

Network operations on UI Thread #96

mamert opened this issue Oct 3, 2018 · 1 comment
Assignees

Comments

@mamert
Copy link

mamert commented Oct 3, 2018

Expected Behavior

I/O Operations do not block the UI Thread

Actual Behavior

Writing to file blocks UI

Steps to Reproduce the Problem

  1. Run app
  2. Click "Create a file"
  3. Notice nothing, as this is only visible with larger files.
    But add a Thread.sleep(10000) near the OutputStream code and you will get a "Not Responding"

I'm not reporting a bug, just offering to contribute.
Guidelines require that I submit an issue first.

Use samples benefit from brevity, but it would be good not to teach bad habits.

I have a patch ready for submission, if you approve.

It just copies CreateFileActivity with small changes, showing 2 ways to address this.

@erickoledadevrel
Copy link
Contributor

@asrivas - Can you please take a look?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants