architecture-components-samples icon indicating copy to clipboard operation
architecture-components-samples copied to clipboard

[Question] How to cancel data loading?

Open wafer-li opened this issue 8 years ago • 3 comments

There is always the case: the user could not torrent the slow data loading process, and want to cancel it.

But in the sample project, I cannot find there is any method to meet that demand.

So, is there any way to achieve that goal?

The cancel data loading means: When the user perform the cancel action, such as onBackPressed, the NetworkBoundResource need to cancel the ongoing db loading transaction and the network request

wafer-li avatar May 19 '17 18:05 wafer-li

wafer-li: could you please open another bug for the crash and keep this issue about your question?

JoseAlcerreca avatar May 24 '17 12:05 JoseAlcerreca

@JoseAlcerreca I just thought the reason of that bug might relate to the limitation(cannot cancel data-loading).

I will do it right away

wafer-li avatar May 24 '17 14:05 wafer-li

I made a sample app that includes canceling (also my 1st github project). Check it out: github and blog. It's similar to github browser sample but doesn't use NetworkBoundResource and LiveDataCallAdapterFactory.

codeparams avatar Oct 14 '18 17:10 codeparams