B4A Library New Net library - Android FTP, SMTP and POP3

Discussion in 'Additional libraries, classes and official updates' started by Erel, Aug 17, 2011.

Thread Status:
Not open for further replies.
  1. fabio borges

    fabio borges Member Licensed User

    FTP Rename

    Hi everybody,

    I'm trying to rename a file with FTP lib but I cant.

    I've used:

    FTP.SendCommand("rename","myfile.tmp myfile.mps")

    It dosent work.

    Could somebody help me?

    Thanks
     
  2. fabio borges

    fabio borges Member Licensed User

    Solved

    Worked that way.....

    FTP.SendCommand("RNFR","myfile.tmp")
    FTP.SendCommand("RNTO","myfile.mps")


     
    Mikonios likes this.
  3. diego

    diego Member Licensed User

    Last edited: Jun 6, 2012
  4. Erel

    Erel Administrator Staff Member Licensed User

    Do you see an "application not responding" message?
     
  5. diego

    diego Member Licensed User

    Yes, I do. After one minute or so.

    If I choose "Wait" it freezes again (if there is still no coverage)
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    When such a freeze happens, Android writes the threads status in /data/anr/trace.txt.
    Can you use ADB tool to pull this file and upload it?
     
  7. diego

    diego Member Licensed User

    sorry, the command for that is

    ???
     
  8. diego

    diego Member Licensed User

    I've tried this:

     
  9. diego

    diego Member Licensed User

    Finally I could copy traces.txt to sdcard with "cat traces.txt > /sdcard/traces.txt"

    see attached
     

    Attached Files:

  10. diego

    diego Member Licensed User

    :sign0148: Please forget last posts, I had a bad loop and that was the cause.

    :signOops:

    at least I learned how to get traces.txt...
     
  11. Evadman

    Evadman Member Licensed User

    Posting this here because this is the NET/FTP thread, so this may help someone else with this problem.

    I recommend that stuff like this (doesn't work on emulator) be posted in the first post in a thread or somewhere easy to find in the documentation. Maybe I missed it and it's there, but the only place I saw it was buried in a thread. I spent the last week trying to figure out what was wrong with my program, company firewall, external firewall, or network to not allow posting a file to an FTP server when I tested from an emulator, because all I have is an emulator.

    I got this cryptic message in the log:
    which occurs about 20 seconds after trying to run the attempt, so it was difficult to tie back to the ftp attempt and not some other application on the phone. The FTP.UploadFile failed completely silently. The UploadProgress and UploadCompleted events never fire, so I couldn't figure out what was happening by pulling LastException.Message on those events. Sometimes I would get a 0k file on the FTP, other times, a connection attempt wouldn't be seen on the FTP server.

    I stopped reading the thread above because a few posts before that quote, there is a comment stating that there is a new library (NET replacing FTP). It took me a week to accidentally stumble upon the 'does not work in emulator' note on the 2nd page.

    By the way, I am still not positive that the issue is actually caused by the emulator. It is possible I have an issue somewhere that I can't find due to not having an android device. I guess I won't know until my program goes to production on Friday.

    By the way, besides this one documentation thing, I am very happy with B4A overall. This isn't the thread of praise probably, but I'm posting it here anyway. B4A is great and the documentation is quite good.
     
  12. Tedsacoma

    Tedsacoma Member

    hi, I can not download the ftp library and the example shown in this post ...
     
  13. Erel

    Erel Administrator Staff Member Licensed User

    This file is only available to users who bought Basic4android. If you have already bought it then please contact support@basic4ppc.com.
     
  14. fisray

    fisray Member Licensed User

    TLS protocol

    Hello everybody,

    I have installed the library and created the SMTP function to send e-mails.
    I tried with my own devide and it works like a charm.
    This is really a beautiful piece of code, many thanks.

    However, when I sent the application to the end user, the e-mail doesn't work.
    He told me that he is using TLS.
    I found that SSL is supported for Google but I cannot find anything concerning TLS.
    My knowledge in this area is so big that I even don't know what is TLS.

    My question is: is there a way to get TLS working? And how?

    Many thanks in advance,
    Raymond
     
  15. Erel

    Erel Administrator Staff Member Licensed User

    Have you tried setting UseSSL to True?
     
  16. fisray

    fisray Member Licensed User

    Hello Erel,

    In fact after I posted my message, I made some researches and found some info.
    I came to the same idea of setting UseSSL to true but also to select a different port.
    I am currently changing the application and I will send the new version for test.
    I wil keep you posted on the results.

    Thanks again,
    Raymond
     
  17. fisray

    fisray Member Licensed User

    Hello Erel,

    We tried with UseSSL = true and with the ports 465 and 587.
    Unfortunately it doesn't work.

    But don't spend to much time on this because they can use Gmail and this works very well.

    Thank you again for this nice library.
    Raymond
     
  18. ukimiku

    ukimiku Active Member Licensed User

    What licensing conditions is the Net library subjected to? I read that someone speculated that the SMTP portion of the Net library was taken/adapted "from the Apache Commons Net project, with the Apache 2.0 license" in its wake. Is that correct?

    Thank you.

    Regards,
     
  19. Erel

    Erel Administrator Staff Member Licensed User

    The license is included in the zip file. See Notice.txt. It is the standard Apache license.
     
  20. ukimiku

    ukimiku Active Member Licensed User

    Thanks.
     
Thread Status:
Not open for further replies.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice