Closed kwent closed 10 years ago
Hm. Looks like that check was added to the framework in 3.0. Normally I don't run downsamples in another thread since they were (originally) supposed to be a quick/easy decode (small file, on disk).
The short answer, and short-term fix, is to disable Strict mode. Failing that, you can hack SampleManager.update to use a new Thread (or an AsyncTask).
When I get a chance, I'll try to pull that out into a separate thread myself for the core, but need to consider any possible ripples, and it's likely not something that will happen right away (if you need it immediately). If you're not sure where to start, and I can probably provide some starter code.
LMK.
@kwent - did you get this figured out, or should i leave the issue open?
You was right. Decoding a downsample image by HTTPDecoder is useless cause the aim is to be fast ( And the downsample file to be in local ). So i guess my question was irrelevant. I close.
Regards,
Why i cannot put a Bitmap Http Decoder
(BitmapDecoderHttp)
on the DownSample Decoder ? viathis.setDownsampleDecoder(new BitmapDecoderHttp());
I get the following exception :
android.os.NetworkOnMainThreadException
cause it's not rendering inside a AsynTask as the Tile Rendering.Regards,