Loader in Android: too much time to get a response

I’m using Stencyl Engine, not sure about openFL/Lime versione but you can find the fork here (openfl 3.6.1 lime 2.9.1). I’m working for a lot of time in order to have my game Flash version. Now I’m facing Android version.

As a result of my tests I’ve found an issue, a deep issue, not experimented in flash.
Using this code:

public function loadSomething(urlRequest:URLRequest) {
        var loader = new Loader();
        loader.contentLoaderInfo.addEventListener(Event.COMPLETE, processResult);

private function processResult(event:Event) {

i’ve experiment a delay of 2-3 seconds from load to processResult. I’ve try in a local (192) network and loading something from web with almost same delay.

Have you never experiment something like that? Have you a path can I follow to work around?
Thanks a lot, David.

I’ve take a look to project properties and find I’m using openfl-legacy.
Can this be part of the problem?


Is it an HTTPS URL, or does it occur with HTTP resources, too?

Hi Joshua thanks for replying. I test only http resources.
To work around this issue I’m working to produce an extension using JNI to call directly using Android APIs. What do you think about? Any advice?

Thanks, David.

You should try out this library

It works much faster than standard loader on legacy.

Issue seem regards only Android, in flash standard loader is very good for our needs. About this lib, use the standard Loader Class? Because delay on response seems involve stardard loader.

Thanks a lot for suggestion!

Seem akifox-asynchttp has many issues with my code: only put references in code like import without code, cause a black screen on android app start.

If someone have any other suggestion please let me know, I’m desperate :slight_smile: