First of all, we will need to add relevant dependencies so we that can load the Twitter4J library. To do this, as usual, add the following entries to app/build.gradle:
compile 'org.twitter4j:twitter4j-core:4.0.6'
compile 'org.twitter4j:twitter4j-stream:4.0.6'
The first line is a general interface to the Twitter API (to make status updates, for example) that contains the core domain objects, such as Status or User.
The following line adds support for streaming the Twitter API through TwitterStream, which allows you to constantly listen for the status updates without making multiple connections to Twitter:
compile 'org.twitter4j:twitter4j-stream:4.0.6'
More information about Twitter4J is available at http://twitter4j.org/en/index.html#introduction - do not forget to check it out