Android Question [SOLVED] Problem with downloading big file

Discussion in 'Android Questions' started by parijs, Apr 12, 2019.

  1. parijs

    parijs Active Member Licensed User

    I have to download a big file for my app (193MB)
    With ftp it takes too long and my log says ' Ignoring event (too many queued events: ftp_downloadprogress).

    Download by website is faster and works for me, but not for customers.
    They get this error
    sub: httpjob_getinputstream (java line: 143)
    java.oi.FileNotFoundException: /data/user/0/com.hr.ketels/cache/2 (no such file or directory)

    The code that I use is

     
  2. DonManfred

    DonManfred Expert Licensed User

    1. You should use CODE Tags when posting CODE. Not Quote Tags
    2. Use file Export as zip and upload the project.
     
  3. AnandGupta

    AnandGupta Active Member Licensed User

    The "FileNotFoundException" may mean that the file right permission is missing for the customers.

    Regards,

    Anand
     
  4. parijs

    parijs Active Member Licensed User

    Hi Anand,

    They have right permission.

    Code:
    rp.CheckAndRequest(rp.PERMISSION_CALL_PHONE)
        
    Wait For Activity_PermissionResult (Permission As String, result As Boolean)
        
        rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
        
    Wait For Activity_PermissionResult (Permission As String, result As Boolean)
        
        
    If result Then
            
    File.MakeDir(File.DirRootExternal,"HrKetels")
            
    File.Copy(File.DirAssets,"storing.db"File.DirRootExternal, "HrKetels/storing.db")
            
    If File.Exists(File.DirRootExternal, "HrKetels/vitidens111.zip") = False Then
                
    StartActivity(dl)
            
    End If

            
    If File.Exists(File.DirRootExternal, "HrKetels/favo.db") = False Then
                
    File.Copy(File.DirAssets,"favo.db"File.DirRootExternal, "HrKetels/favo.db")
            
    End If
            
    If File.Exists(File.DirRootExternal, "HrKetels/bedrijf.db") = False Then
                
    File.Copy(File.DirAssets,"bedrijf.db"File.DirRootExternal, "HrKetels/bedrijf.db")
            
    End If
            
        
    End If
    The DB files are in the directory

    Regards,
    Zeger
     
  5. AnandGupta

    AnandGupta Active Member Licensed User

    I mean, "/data/user/0/com.hr.ketels/cache/2 (no such file or directory)" means access right restriction on web file

    Regards,

    Anand
     
  6. parijs

    parijs Active Member Licensed User

    okay it's a normal website http
    http://visitparijs.nl/appdl/ketels.zip
    The properties of the file are 644
    What I don't fully understand is why is my phone different from theirs?

    Regards,
    Zeger
     
  7. parijs

    parijs Active Member Licensed User

    Removed from google play
     
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