Skip to content

Example Android Project 💡

This chapter provides a sample Android project to see the basic usage of the Yoli API in action.

⬇️ You can download the Android project here

Basic Information

  • Native Android project
  • Kotlin as programming language
  • 21 as mininum SDK version
  • 27 as target SDK version

The Example App

The app in the sample project has a basic user interface and includes some example queries and mutations against the Yoli API. It should showcase the usage of the Yoli API and is not engineered to be bullet proof.

Welcome Screen

The first screen allows the user to enter his/her name and press the create button. This will create a user on the Yoli API and sets the entered name as username.

Android Example Project Screen 1

Bank Login Screen

On the second screen the user has the possibility to connect a bank account. The sample project simply connects a demo bank account. You can look into the code to see how this works.

Android Example Project Screen 2

After the user taps on Connect Bank Account the view changes into a loading mode where an activity indicator and a description label appears. The Yoli API now connects the bank account, loads the transactions and starts the contract detection. Android Example Project Screen 3

Contracts Screen

On the final screen the user can see the detected contracts together with the determined category, amount, interval and his own username.

Android Example Project Screen 4

Project Structure

We have structured the example project for an easy unterstanding. Everything code-related is located in the yoliapisample package. This package has three sub-packages. The dagger-package contains all classes that are needed for dependency injection. The repository-package contains all classes that are needed for the network communication. This package represents the model-layer of your MVP-Pattern. The third package is the ui-package and contains all classes related to the user interface. This package has three sub-packages, every sub-package contains the classes for one screen. Each screen consists at least of three classes, activity, contract and presenter. The activity is a subclass of the Android activity. The contract defines the communication between view (activity) and presenter. And the presenter is responsible for the communication between view- and model-layer.

If you have questions about the sample project, don't hesitate to contact us.

What's Next?

On the next page we describe all the requests from the example project in detail.