Thank you. I had to change Bytes to Byte to get it to work:
B4X:
Dim out As OutputStream = File.OpenOutput(File.DirLibrary, "History.txt", True)
Dim t() As Byte = url.GetBytes("UTF8")
out.WriteBytes(t, 0, t.Length)
out.Close
Does this code append on a new line each time it is run? I want it to append to a new line.