This is a simple project showing how to use the Clarifai API in Android. It uses the Clarifai Java Client to perform Concept recognition.
To set your environment up for Android development, you'll need to install the Java SE Development Kit (JDK) and Android Studio.
Replace YOUR_API_KEY_HERE
with your Clarifai API Key in strings.xml
.
This project will compile in the standard manner through Android Studio or ./gradlew clean build
in your terminal.
RecognizeConceptsActivity
contains most of the non-boilerplate code. In particular, RecognizeConceptsActivity.onImagePicked
makes the API call to Clarifai.
You can also look at RecognizeConceptsAdapter.onBindViewHolder
to see how we display the information that the API returns to the user.