First you need to have an API ready with the required recommender algorithms implemented (the engine). It is common to access this API from your Android app by sending HTTP requests to the endpoint (see how to send HTTP requests in Android).
Now there are two ways to get access to a recommender engine.
Build it yourself - this often involves doing extensive research on the several method, learning a new programming language (e.g. Neo4J, etc.) and implementing and hosting this engine (monthly fees can be quite high)
Tap into Recommender Algorithms as a Service libraries such as the Abracadabra Recommender API. The setup is very straightforward: you only need to send HTTP calls to the API to train your model and to receive recommendations. View the docs.
With the Abracadabra Recommender API, when using Java
, you first add data to your model:
// These code snippets use an open-source library. http://unirest.io/java
HttpResponse<JsonNode> response = Unirest.post("https://noodlio-abracadabra-recommender-systems-v1.p.mashape.com/add/subjects?recommenderId=rec1&subjectId=See+docs")
.header("X-Mashape-Key", "<required>")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.asJson();
Then you train the model by rating or liking subjects (for instance movies):
// These code snippets use an open-source library. http://unirest.io/java
HttpResponse<JsonNode> response = Unirest.post("https://noodlio-abracadabra-recommender-systems-v1.p.mashape.com/rate/subject?recommenderId=rec1&subjectId=gameofthrones&subjectWeight=10&userId=user1")
.header("X-Mashape-Key", "<required>")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.asJson();
Once done, then you receive recommendations based on Content-Based, Collaborative or Hybrid filtering as follows:
// These code snippets use an open-source library. http://unirest.io/java
HttpResponse<JsonNode> response = Unirest.post("https://noodlio-abracadabra-recommender-systems-v1.p.mashape.com/recommend?method=content&recommenderId=rec1&userId=user1")
.header("X-Mashape-Key", "<required>")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.asJson();