B4A Library Automated FTP Library

sultan87

Active Member
Licensed User
Longtime User
Ok I just downloaded version 1.06
it's good
I continue testing
Hello Margret
thank you for all the information
everything looks good to me
I expect your change to the date of the file on ftp
Best regards
 

luke2012

Well-Known Member
Licensed User
Longtime User
My compliments @margret !
I'm planning a feature that let users to send a file from device to device.

This library implements ftp client.
There is a ftp server 4 Android that let to customize (programmatically) the destination directory and the file replace feature?

The target is to allow a user to send a file to another device in a default directory and automatically replace the file with the same name in the target device.
 

luke2012

Well-Known Member
Licensed User
Longtime User
@margret I'm trying your sample code.
I got a connection refused error.
The server support Anonymous login. To initialize an anonymous connection I must put user : Anonymous and password : ""?
 

gspanu

Member
Licensed User
Longtime User
Version 1.06 and FTP_AutoSample:

If the FTP server is not reachable, upload files (set or single) do not return any error and remain on hold.

By setting for example: FTP.SetText( "RICEZIONE","INVIO","Totale trasferimento", "Trasferito", "ANNULLA","Chiudi") ,
the label FileProgressText becomes: "Trasferito: Downloaded" (and file size)
 

gspanu

Member
Licensed User
Longtime User
Version 1.06 and FTP_AutoSample:

If during the "Upload file set" or "Download file set" pressed "Cancel" subsequent "Upload or Download file set" to stop working after the first file
 

Flosch

Member
Licensed User
Longtime User
Hi I want to upload three files:

That is my code:

Dim Upload(3) as String
Upload(0) = "/storage/extSdCard/Content/CFG/test.cfg"
Upload(1) = "/storage/extSdCard/Content/GFX/test.gfx"
Upload(2) = "/storage/extSdCard/Content//INI/test.ini"
FTP.UploadFileSet("Upload", Upload, False)

I will get the follwoing error:
Error occurred on line: 1859 (main)
java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
at ftp.auto.lib.ftp_auto._vv1(ftp_auto.java:256)
at ftp.auto.lib.ftp_auto._vvvvvvv1(ftp_auto.java:1617)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:680)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:308)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:163)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:159)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:66)
at android.view.View.performClick(View.java:4640)
at android.view.View$PerformClick.run(View.java:19421)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5579)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method)

If I split the string in Dir and Name and use this command:
FTP.UploadFile(Dir(0), "Upload", Name(0))
The file will be uploaded without any problems.

What's wrong?
 

Massimo Linossi

Member
Licensed User
Longtime User
Hello Margret.
First of all many compliments for your library, works perfectly.
I want to ask if there is some place where I can translate the strings in the little popup message that
is shown below the main FTP dialog. Strings like "All names retrieved...", "Getting names from server..."
Thanks a lot.
Massimo.
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
Hello Margret.

I see that there is a Stealth mode. But is there a way to just download/upload without ANY dialogs?

Thanks
 

wildfandango

Member
Licensed User
Longtime User
I iam trying to include FTP_AUTO on my project but i recive This message: Cannot acess activity object from sub Process_Globals... why? :,(

Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.

Dim dbug As Boolean : dbug = False
Dim AppName As String : AppName = "DISVEN 0.1"
Dim AppDB As String : AppDB = "disven.db"

Dim FTPA As FTP_Auto
FTPA.Initialize(Activity,Me,inet.ftpsrv,inet.ftpusr,inet.ftppas,inet.ftpprt,True,False)
End Sub

thanks in advance
 

SJQ

Member
Licensed User
Longtime User
Hi Margret.

Great Library...

If I request DownloadFileSet and there are no files to download I get a message that pops up stating 'No Files Found' would it be possible to get this as a call back event rather than a pop up message?

Regards
Steve
 

luciano deri

Active Member
Licensed User
Longtime User
Hello,
Have you an example of use?
how to test the connection to the ftp server before Dowload, Upload ....
Best Regards
Hello Margret, is ready now this function ?
In the DownloadFileSet is possible set the text of automatic toast message?
thanks.
 

catyinwong

Active Member
Licensed User
Longtime User
java.lang.RuntimeException:Error uploading file.
500 I wont's open a connection to 192.168.0.102 (only to 14.199.234.149)

I have set the FTP to Makedir and then upload a file. The folders are created on the FTP but then the above error message popped and the uploading cannot be done.
Anyone can help?
 

Vinay Chaddha

New Member
Licensed User
Longtime User
Hi, can you please tell me how to handle event of "Cancel Button" in progress dialog while uploading..
 

Attachments

  • question.png
    16 KB · Views: 260

tango

Active Member
Licensed User
Longtime User
can we use this library in SERVICE MODULE?

Initialize (Activity AsActivity, CalledFrom As Object, FTP_Site AsString, UserName AsString, PassWord AsString, PortNumber AsInt, ShowMessages AsBoolean, UsePassiveMode AsBoolean) As String

i want to use in service modules. so acctivity as activity?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…