As you can see there is a ".tag" inside the output...
tostring is a method i wrapped... the lib behind will send a json result with it.
For now i use this and take a jsonparser to get the result of the .tag... It is working but i think it should be better to do this step inside the wrapper.
How can i access this tag?
Here i can distinguish files from folders in theresultlist... The .tag is "file" or "folder"
Note that there shouldn't be instance variables in ObjectWrapper classes.
They will be removed if the class instance will be converted to Object and back:
B4X:
Dim m As Metadata
List1.Add(m)
Dim m2 As Metadata = List1.Get(0)
'm2.ba and m2.eventName are null now.
Dropbox s using different Metadata-Implementations. Metatadate, Filemetadata and Foldermetadata.
The last two extends the first one.
The List i retrieved is adding all as Metadata.
But if it is a Folder than Dropbox will add a Foldermetadata as Metadata to the list.
Same for files. Dropbox uses a FileMetadata.
i now do check in b4a
B4X:
If Value Is FileMetadata Then
Dim fle As FileMetadata = Value
else if Value Is FolderMetadata Then
Dim fld As FolderMetadata = Value
And surely i did wrapper for all Three. Metadata, Filemetadata and FolderMetadata.