Java Question Converting another Java Map to a B4A Map

DonManfred

Expert
Licensed User
Longtime User
Drive_Meta(true,Metadata [mImpl=MetadataBundle [values=Bundle[{originalFilename=Untitled, isGooglePhotosFolder=false, indexableText=null, isTrashable=true, starred=false, description=null, webViewLink=null, recencyReason=createdByMe, isGooglePhotosRootFolder=false, embedLink=[URL]https://drive.google.com/file/d/0B1xvZz7_R8ihVGVORWlxajYxT28/preview?usp=drivesdk[/URL], mimeType=application/x-www-form-urlencoded, isAppData=false, isCopyable=true, isOpenable=true, fileExtension=, subscribed=true, isPinnable=false, contentAvailability=0, trashed=true, writersCanShare=true, sharedWithMe=null, spaces=[DRIVE], parents=null, customProperties=com.google.android.gms.drive.metadata.internal.AppVisibleCustomProperties@20, fileSize=70, modifiedByMe=1496474496643, modified=1496474496643, md5Checksum=bcdeafec67796d2cbec69c67c638ea99, isPinned=false, isShared=false, alternateLink=https://drive.google.com/file/d/0B1xvZz7_R8ihVGVORWlxajYxT28/view?usp=drivesdk, isViewed=false, uniqueIdentifier=null, role=owner, sharingUser=null, title=Untitled, isLocalContentUpToDate=false, hasThumbnail=false, quotaBytesUsed=70, isExplicitlyTrashed=true, folderColorRgb=null, ownerNames=[name], isEditable=true, isRestricted=false, created=1496474496643, lastOpenedTime=null, recency=1496474496998, lastModifyingUser=Permission ID: '09513848838421129968', Display Name: 'Manfred Ssykor', Picture URL: 'https://lh5.googleusercontent.com/-WodZ_293gBM/AAAAAAAAAAI/AAAAAAAAGfI/EFoF4vVuvK0/s64/photo.jpg', Authenticated User: true, Email: '[email protected]', thumbnail=null, webContentLink=https://drive.google.com/uc?id=0B1xvZz7_R8ihVGVORWlxajYxT28&export=download, driveId=DriveId:CAESHDBCMXh2Wno3X1I4aWhWR1ZPUldseGFqWXhUMjgYoBMgrt7S6YxWKAA=}]]])

This is the output of

B4X:
Sub Drive_Meta(Success As Boolean, meta As Metadata)
    Log($"Drive_Meta(${Success},${meta})"$) 
    'Log(meta.CustomProperties)
    Log(meta.CustomProperties2)
End Sub

CustomProperties2 returns a
B4X:
java.util.Map<CustomPropertyKey, String>
It looks somehow that these Values are not seen in java. Or hidden somehow. Maybe i just don´t know how to access them :)

All i get is {}

I would like to parse this into a Map to use the values in B4A

I tried to adapt JMapToB4AMap but failed.

Can somebody help me parsing the
B4X:
java.util.Map<CustomPropertyKey, String>
?
 
Last edited:
Top