Hi!
How can I check if an object is empty (Uri)?? I am not able to do it. I tried it with this code but the if query doesn´t work and the "Cursor.Position = 0" returns an error for the cases that I pressed the return button and the Uri variable is empty.
How can I check if an object is empty (Uri)?? I am not able to do it. I tried it with this code but the if query doesn´t work and the "Cursor.Position = 0" returns an error for the cases that I pressed the return button and the Uri variable is empty.
B4X:
Dim Uri As Object
Uri = r.RunStaticMethod("android.net.Uri", "parse", _
Array As Object(UriString), _
Array As String("java.lang.String"))
If Uri <> Null Then '<< THIS DOESN´T WORK
Cursor.Position = 0
Dim res As String
res = Cursor.GetString("_data")
Cursor.Close
Return res
End If