Pages: [1]
  Print  
Author Topic: [Solved] Delay with accessibility of downloaded file?  (Read 5410 times)
0 Members and 1 Guest are viewing this topic.
netsoul
Jr. Member
**
Posts: 57



WWW
« on: 05 February , 2008, 06:03:30 »

Hi all,
I've faced with a some problem during downloading files. Really, a downloaded file isn't accessible for reading at the moment when KL returns klError=0&klEnd=1. Symbian returns 'Unable to find file c:/...'. But it can be read in a few moments later.

This's not a blocker but this adds a headache to OOP developers. Can you please specify the following: klEnd returns on the moment of download complete or on the moment of saving complete?

Thanks,
Alex
« Last Edit: 23 February , 2008, 08:44:16 by jusahama » Logged
KL Admin
Moderator
Sr. Member
*****
Posts: 313


« Reply #1 on: 05 February , 2008, 07:47:06 »

Hi,

actually klStatus is intended to be used to catch "download complete" event.
klCommand=status, then poll for variable klProgress eq 100,
http://wiki.kunerilite.net/index.php?title=Download_plugin

cheers,
Jukka

(Wiki updated)
« Last Edit: 05 February , 2008, 07:51:27 by jusahama » Logged
netsoul
Jr. Member
**
Posts: 57



WWW
« Reply #2 on: 05 February , 2008, 08:21:50 »

ok, I'll try it but what does it mean:
"klEnd value indicates that conversation is finalized and all data is received"?

I guess, the status is useful to show the download progress but not to handle an event of ending? The reasonable question: is klEnd the same of klProgress==100? And how much time requires to write the received data after the event klProgress==100?

Thanks,
Alex
Logged
C00L
Administrator
Full Member
*****
Posts: 172



WWW
« Reply #3 on: 05 February , 2008, 08:29:48 »

Quote
"klEnd value indicates that conversation is finalized and all data is received"?

Actually this refers to the message incoming from KuneriLite server. For instance if you have 3 variables in KL response, klEnd indicates all 3 values are received by FL. klEnd is definitely different than other arguments. It's only ensuring FL got whole response from KL server, not related to any plugin specifically.

I remember facing such problem with download complete event. We will study this and try to correct the issue. Right behavior should be receiving klStatus=complete only when file is ready to be read, and developers should be able to trust on that.

That's how I detect completed download in KISS60;

Code:
if(/:klStatus eq "complete") { // Is download complete?
    gotoAndPlay("PROCESS_COMPLETE");
} else {
    XXXX
}

Thanks for raising the issue Alex!

Ugur.-
« Last Edit: 05 February , 2008, 08:33:34 by C00L » Logged

Kuneri Support Team
KL Admin
Moderator
Sr. Member
*****
Posts: 313


« Reply #4 on: 05 February , 2008, 08:34:57 »

Yes, thanks Alex,
wiki wasn't up-to-date, now it is corrected.

We'll investigate this problem:
The data is being written into file during download, but file seem to be remain unlocked sometimes even klStatus=complete.

cheers,
jukka
Logged
netsoul
Jr. Member
**
Posts: 57



WWW
« Reply #5 on: 05 February , 2008, 08:47:43 »

Thanks you too. The situation is clearer to me now.
-Alex
Logged
netsoul
Jr. Member
**
Posts: 57



WWW
« Reply #6 on: 10 February , 2008, 08:36:59 »

Hi again,

The process of downloading works more stably in 0.95. One more point is to improve. If download is unsuccessful, a zero-length file stays in the phone. It look like a successful download of empty file for the following command Exist or the following application session.

-Alex
Logged
C00L
Administrator
Full Member
*****
Posts: 172



WWW
« Reply #7 on: 10 February , 2008, 11:43:09 »

Hi Alex, I am sure Jukka will check this out. I personally delete file(s) manually from Flash Lite side, if a download is not successful. This especially is a good idea, if you are downloading more than one file consequently.

Nice to hear that Download is working better now.

BTW, we forgot to document one more thing, I think it will make downloading much better for you. It's loadVariables command for Ul/Dl plugin.

Code:
loadVariables("http://127.0.0.1:1001/Basic/uldl?klCommand=loadVariables&klUrl=XXXX, "", "POST");

This will eliminate 2 times AP, if you have to connect to internet before downloading.

Am sure Jukka will update this soon.
Logged

Kuneri Support Team
Pages: [1]
  Print  
 
Jump to: