Hi,
I just switched from Parse to Backendless and I have been trying to figure this out for a while and I still don’t know how to accomplish this. I want to create a list of all registered users on the app and when the current user taps on another user in the list it will create a “friend” relation. Is there a tutorial on how to do this in android?
Hi Jordan,
To create a relation between a user and another user, you can put the other user (represented by the BackendessUser object) into a custom property of the user. Here’s the API to do that:
https://backendless.com/documentation/users/android/users_user_properties.htm
Once you put the property, make sure to save the “parent” user object.
To create a one-to-many relation (for example a user has a collection of friends), store the other user in a collection (for example ArrayList<BackendlessUser>) and save that collection in a property.
Regards,
Mark