I am trying to query the https://jsonplaceholder.typicode.com/posts api using user input. Right now I use hardcoded text to query it, because I can't figure out how to dynamically query it. I have an activity with an EditText for input and a second activity where the api response is displayed. How do I give the user input to the next activity?
My Interface
public interface PostsApi {
@GET("posts")
Call<List<Posts>> getPosts(@Query("id") int id, @Query("title") String title);
A part of my Retrofit Service Class
public Call<List<Posts>> getPosts(){
return postsApi.getPosts(2, "qui est esse"); //this should use the user input
}