Android Question Alternative to FTP?

Discussion in 'Android Questions' started by MurphmanL, Feb 6, 2015.

  1. MurphmanL

    MurphmanL Member Licensed User

    Hi All,

    I have recently finished and deployed a mobile app to the play store for field use by a small business.

    However, the entire app is structure around file transfer via ftp. This is working perfectly, except it has come to light that it seems some mobile networks are blocking FTP from working :(

    This is a major blow to me as it seems O2 could be one of these networks and when my app tries to use ftp it just sits and sits and sits, the traffic goes OUT but no reply ever comes back IN to my app.

    Does anyone have any other ideas for methods I could use to transfer zipped files to an organisation?

    Does B4A have any support for webDAV or can anyone else suggest an alternative method for transferring the data?
     
  2. sorex

    sorex Expert Licensed User

    plain web transfer?
    just place the ftp root in inside the web structure.
     
  3. MurphmanL

    MurphmanL Member Licensed User

    Hi Sorex,

    Thanks for your reply, apologies for my ignorance but I'm not sure quite what you mean?

    My app is designed around the whole premise of the ftp server, so to find some mobile operators are blocking it apparently is a major blow.

    The user accounts on the ftp are tied to the app, and by communicating with the purpose-implemented server the app functions well.

    However I was wondering if there was any way I could transfer the files in any other way, even if it means I have to re-write parts of the app.
     
  4. sorex

    sorex Expert Licensed User

    yes, that what I meant.

    you can place your files on your website and if you want some kind of security you can use a fixed url with parameters that does a server-side redirect to your file. Nothing else of the files will be visible.

    url could be comething like www.mysite.com/sharing/getfile.php?id=X5y8GgrE5ziI53

    and by that parameter you know which file to redirect to and even if that file is accessible for your customer.

    It requires a bit of server-side coding tho.
     
  5. MurphmanL

    MurphmanL Member Licensed User

    It is quite a simple app premise - the user logs in and downloads one central csv file everytime telling them what work they have to complete.

    If the allocated work falls within the date and time restriciton on the devices current date and time, the work can be started and undertaken.

    At the end of the task, the data is collated (pictures and csv comma delimited data), and zipped.

    The send screen then connects to the ftp and uploads the file.

    I am not sure how I could replicate such simplicity with the method you are describing above.

    I just need to find a solution that is open for all mobile operators :(
     
    Last edited: Feb 6, 2015
  6. sorex

    sorex Expert Licensed User

    only port 80 for the web is something you know about that is open.

    downloading or uploading to a website ain't much different than ftp tho.
     
  7. KMatle

    KMatle Expert Licensed User

    What about using php on the webserver and httputils on b4a? Easy and for sure not blocked.
     
  8. derez

    derez Expert Licensed User

  9. MurphmanL

    MurphmanL Member Licensed User

    I will have a butchers into this duck dns approach, although after implementing an ftp / sftp / ssh / webdav server solution I don't think anyone will be too keen to invest more ££.

    So disappointed, but then again even during testing we wern't going to sit down with a line of sim cards from all operators and check every single one!

    May just have to change the app so that the data is stored and they sync later over wi-fi or something.

    I imagine the block by o2 etc will be by protocol so ftp, rather than port 21? May try changing the listen port to 80 and see if that does anything.

    Thanks to everyone who has helped me so far I'm well impressed with the apps I've built with B4a, this technicality is just an unfortunate side effect created by the mobile operators!
     
  10. sorex

    sorex Expert Licensed User

    they don't need to invest, if you have ftp you probably have web service aswell so you costs will be the same as before.

    you can ftp over port 80 indeed but if they have webservices enable on that server it won't work either since that is already using port 80 unless you can change the port or ask them to do it.

    I guess most people would've gone for a web based solution from the start as lines are so fast these days the ftp protocal is not used as much anymore as it was before. The only benefit I see is download resuming (and the server needs to support it)
     
  11. MurphmanL

    MurphmanL Member Licensed User

    Well after spending the day reading it may be a daft omission but I haven't instructed my app to use passive mode...

    Wonder if it is using active mode and therefore being blocked by certain mobile networks and if in Passive mode it would work... no harm in trying i guess!
     
  12. sorex

    sorex Expert Licensed User

    indeed, you could give that a try.

    let us know how it went.
     
  13. SJQ

    SJQ Member Licensed User

    Hi Murphmanl.

    Did you get this sorted?
    I had the same issue, especially with o2. I discovered that if you remove the proxy values in the APN Settings of the phone, FTP worked fine.
    it was just a pain having to modify APN Settings.

    Regards
    Steve
     
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