Android Question How to access java Map via JavaObject?

Lee Gillie CCP

Active Member
Licensed User
Longtime User
The 3rd party documentation describes a method I am attempting to provide a B4A wrapper for. The Java method template documented as:

public Map<String, String> getFirmwareInformation();​

I can get a JavaObject for this Map, but can't figure out how to get inside the Map (ultimately I will convert this to a B4A Map). I want its size, keys, and values of course.

Thanks for any hints.
 

DonManfred

Expert
Licensed User
Longtime User
I cant help on javaobject. But i can provide a working JAVA-Code for this.
Maybe you are able to do this with JO?

B4X:
for (Iterator it = map.keySet().iterator(); it.hasNext(); ){
    Object key = it.next();
    Object value = map.get(key);
}
 
Upvote 0
Top