Closed slorber closed 5 years ago
Hey @slorber
Talked to Intercom about this and it seems like it just to chain the builder with .withCompany()
like builder.withCompany().withCompany()
so basically the best way would be to just loop over the array of companies just adding them. I've done a little try myself but can't get it to work
} else if (key.equals("companies")) {
ArrayList companies = (ArrayList)value;
for (int i = 0; i < companies.size(); i++) {
Log.w(TAG, "Adding company");
builder.withCompany((Company)companies.get(i));
}
}
Maybe we can help each other to solve this? @slorber or maybe @browniefed can help us?
@EmilScherdin I don't know what else to do than your solution so if it does not work I can't really help.
@browniefed is not maintaining this lib anymore as he's not using it on any project currently
Currently it's possible to provide companies in user attributes but it works for iOS only ({..., companies: {company_id: "x", name: "y"}}`)
Android implementation is missing and has not been done in PR: https://github.com/tinycreative/react-native-intercom/pull/137
Just creating this issue so that we don't forget to fix that as it's not documented.
@jtreanor maybe you can provide some hint on what is left to be done so that companies are supported in Android please?