Thanks for your reply!
I tried your suggestion, but setting buildings.setFeatureVisible(feature, true); after initially setting visible to "none" didn't work. So in my buildings.selectFeatureAsync task, I added:
buildings.setVisible(true);
Map<String, Object> attr = feature.getAttributes();
Object value = (String) attr.get("piz");
buildings.setDefinitionExpression("piz LIKE '"+value+"'");
where "piz" is the name for the unique ID of the building. At first this did not work either, since my feature service contains many fields and only the first couple of fields were actually returned; I also couldn't specify outfields as I used to do in the old API. So I tried this:
ServiceFeatureTable table = (ServiceFeatureTable) buildings.getFeatureTable();
final ListenableFuture<FeatureQueryResult> future =
table.queryFeaturesAsync(query, ServiceFeatureTable.QueryFeatureFields.LOAD_ALL);
and now the definition query works because the piz field value is returned.
However, I do hope that there is an easier way of doing this (or maybe will be added to the API in the future)