Creating modules is a good practice since it aids in reusability. In your Android project you can easily add a Java or Android module.
Follow the video to create a Java module and add it as a dependency in your Android Project.
Project source code is available in GitHub