I have a requirement to authenticate with M365, which I can successfully do with a token that was previously issued. A simple DownloadImage job like this works fine with the same url:
B4X:
Sub DownloadImage(Link As String, myButton As Button)
Dim token As String = kvs.Get("Token")
Dim job As HttpJob
job.Initialize("", Me)
job.GetRequest.SetHeader("Authorization", "Bearer " & token)
job.Download(Link)
Wait For JobDone(job As HttpJob)
If job.Success Then
myButton.SetBackgroundImage (job.GetBitmap)
End If
job.Release
End Sub
however, I want to use SimpleMediaManager to do the same thing, via the url parameter - but it seems there is no way to set the Auth Header?
This is a simple to use, cross platform library, that does many complex things under the hood. The developer calls SetMedia with a placeholder panel and a url. The panel will show an image, video or animated gif (more formats will be added). 'Show a remote image / video / animated gif in...