Android Question Download from Gdrive

sigster

Active Member
Licensed User
Longtime User
Hi

I have a shared folder on Google Drive and try to download file
but I only download some html file not the file

Restricted is = Only pepole with access can open with the link


B4X:
    Dim j As HttpJob
    j.Initialize("", Me)
    j.Download("https://drive.google.com/u/1/uc?id=1B3yqlQLal0NJomDoUhfs2bspBHhIcBye&export=download")
    Wait For (j) JobDone(j As HttpJob)
    If j.Success Then
        Dim out As OutputStream = File.OpenOutput(File.DirInternal, "1.txt", False)
        File.Copy2(j.GetInputStream, out)
        out.Close
        Log("success")               
        Dim List1 As List
        List1 = File.ReadList(File.DirInternal,"1.txt")
        For i=0 To List1.Size-1
            Log(List1.Get(i))
        Next
        
    End If
    j.Release
 

GMan

Well-Known Member
Licensed User
Longtime User
I dont see any filename to download ?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
I am try to download with out use API
You can not download via the url, if you share with few people, as Gdrive requires the login credential for it.
Make it public and you can now download it.
Also go through the html downloaded instead. It mentions the problem.
 
Upvote 0
Top