Thank's Peter.
so my Code is:
Sub Activity_Create(FirstTime As Boolean)
Log(GetDeviceId)
If FirstTime Then
GPS1.Initialize("GPS")
FTP.Initialize("FTP","ftp.xxsoftware.de",21,"user","password")
End If
Activity.LoadLayout("1")
End Sub
Sub btnFTP_Click
Dim sf As Object = FTP.UploadFile(File.DirRootExternal, "/gunni/gps/TabA6.txt", True, "/Android/GPS/TabA6.txt")
Wait For (sf) FTP_UploadCompleted (ServerPath As String, Success As Boolean)
If Success Then
ToastMessageShow ("file was uploaded successfully",False)
Log("file was uploaded successfully")
Else
ToastMessageShow (LastException.Message,False)
File.WriteString(File.DirRootExternal,"/gunni/gps/Fehler.txt",LastException.Message)
Log("Error uploading file")
End If
End Sub
Sub FTP_DownloadProgress (ServerPath As String, TotalDownloaded As Long, Total As Long)
Dim s As String
s = "Downloaded " & Round(TotalDownloaded / 1000) & "KB"
If Total > 0 Then s = s & " out of " & Round(Total / 1000) & "KB"
Log(s)
End Sub
Sub FTP_DownloadCompleted (ServerPath As String, Success As Boolean)
Log(ServerPath & ", Success=" & Success)
If Success = False Then Log(LastException.Message)
End Sub
Sub FTP_UploadProgress (ServerPath As String, TotalUploaded As Long, Total As Long)
Dim s As String
s = "Uploaded " & Round(TotalUploaded / 1000) & "KB"
If Total > 0 Then s = s & " out of " & Round(Total / 1000) & "KB"
Log(s)
End Sub
Sub FTP_UploadCompleted (ServerPath As String, Success As Boolean)
Log(ServerPath & ", Success=" & Success)
If Success = False Then Log(LastException.Message)
End Sub
----------------
The "LastException.Message" =java.lang.RuntimeException: Error uploading file. 502 'PORT': command not implemented
can you help me, Peter?