Android Question Download File from Onedrive (Graph)

testw

Member
Licensed User
Longtime User
How can I download a file from Onedrive (@microsoft.graph.downloadUrl) ?
Here's the example-link:

https://public.am.files.1drv.com/y4...AOXMO8vjdJaYWbmMM-CTsaK-vhq2Isib4hWgRJodoyBuX...


B4X:
Dim HTMLContents As OutputStream
    HTMLContents.InitializeToBytesArray(0)
    Response.GetAsynchronously("Contents", HTMLContents, True, TaskId)
    DoEvents
    Dim ausgabe As String = BytesToString(HTMLContents.ToBytesArray, 0, HTMLContents.ToBytesArray.Length, "UTF-8")
  
    Dim JSON As JSONParser
    Dim Map1 As Map
    Map1.Initialize
    JSON.Initialize(ausgabe)
    Map1 = JSON.NextObject
    Dim downurl As String= Map1.Get("@microsoft.graph.downloadUrl")
    Log( downurl)
        Dim job2 As HttpJob
    job2.Initialize("download", Me)
    job2.Download(downurl)

Does not work...
 

Similar Threads

Top