Android Question FTP _UploadCompleted event is not fired in B4A 6.50

jlperez

Member
Licensed User
Longtime User
Dear All,

we were working on a old App working perfect on B4A 5.x and we've decide to introduce some improvements but when testing we've noticed that FTP _UploadCompleted event is not fired in B4A 6.50.

The App has the INTERNET permission to use FTP object. I've isolated the problem and done a small FTP client but we are experiencing the same problem. User and Password of FTP is right and we've tested previously with Filezilla.

Is anything new to consider when compiling a B4A v5.xx App code in the new environment?

No file is uploaded and no exception is thrown.

Thank you for your help.

Best regards and best wishes for 2017 year.

Jose Luis
 

Attachments

  • FTP_Client.txt
    1.8 KB · Views: 216

jlperez

Member
Licensed User
Longtime User
It's better to "export to zip" instead of just copying the code as a text (then we can just run the project an try).

How big is the file?
Did you take a look at the unfiltered logs?

The file is not big enough, arround 400 kB. The same code work perfect in B4A v5.xx. Is there any differences to take into accound about permissions for example?
 
Upvote 0

jlperez

Member
Licensed User
Longtime User
No.

Don't close the FTP object before the event. I recommend you to initialize the FTP object once when FirstTime is true and never close it.
I've done this and i don't get any changes, I'm not getting any error in unfiltered logs.

I really don't understand what I'm doing wrong. Would you mind give a look to my code?

Thank you very much.

Jose Luis.
 

Attachments

  • testFTP.zip
    8.2 KB · Views: 191
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
i tried your code. i do not have the file you mentioned in code (file to upload).
I just used one existing pic on my device.

and i changed the log a bit...

B4X:
Sub miFTP_UploadCompleted (ServerPath As String, Success As Boolean)
    Log($"miFTP_UploadCompleted (${ServerPath}, ${Success})"$)
    'Log(ServerPath & ", Success=" & Success)
    If Success = False Then Log(LastException.Message)
End Sub

** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
path:/web/docs
ListCompleted event
/web/docs
.
..
DonManfred.png, 27538, 12/28/2016
miFTP_UploadCompleted (/web/docs/DonManfred.png, true)
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
 
Upvote 0

JordiCP

Expert
Licensed User
Longtime User
It also works correctly for me, using B4A 6

Are you connected through an USB cable? What do the logs say?
 
Upvote 0

jlperez

Member
Licensed User
Longtime User
It also works correctly for me, using B4A 6

Are you connected through an USB cable? What do the logs say?
I'm connected through Bridge and WiFi but now after a stroll on my city I've seen the light clearly what's my mistake obviously related to my smartphone :p

Several months ago I've tried an App called Protect which is basically a firewall inside the smartphone. This service was stopping FTP outgoing connections.

Sorry guys but thank you all for your time.

Best wishes for this year.
 
Upvote 0
Top