I'm working on a mini social network app were the current user can follow other friends and can see all his friend's posts.
For the following I've create a class in Parse.com were there is the followerId (which is the current user) and the followedId( (which is the friend he is following).
In the second activity I want to show only the posts of the followed friends. I already have a class with the published posts of all the users with writerId (the Id of the post's publisher) and the post (which is only a string)
My idea is to retrieve an array string containing only the followed users using This line with the following class :
pQuery.whereEqualsTo("followerId", ParseUser.getCurrentUser().getObjectId());
I don't know how to convert the query to array string.
postsQuery.whereContains("writerId", array string);
And after this querying the friend's id that are present in the array string.
I don't know if there is a best way to show the posts of only the friends I follow, but in my way I can't convert the querying ids in a string array and compare them with the writer Id column.