By: Muhammed Nishad

How to Integrate Odoo with Android

Odoo is a virtual jungle with immense possibilities of customization, to deal with the diverse territories of an organization or industry. The Open Source ERP constantly expand its effectiveness via third-party applications. The rich API library and web administrations in Odoo help in bringing qualitative innovations every now and then. The android integrations with Odoo, facilitates the new generation business, a way to modernize, combine, and facilitate the business operations in new dimensions.

Here I’m Going to discuss creating an Android application, that communicates with odoo server.I’m doing this tutorial in Android Studio.

For Android Studio Installation, 

you can Visit here:

First of All, let’s Create a new project: 

You can go to file > new > new project Or Do it from this window


Create a new project by filling up this window.


The next thing we have to do is, downloading and installing the OOG Box API

This can get a bit technical.

Firstly, you have to go to

Then a page will appear like the below image


Click the clone or download button, and choose Download ZIP


Now extract this file to a folder you like, and  it will have a name like “odoo-mobile-api-1.0.0

Now go to your project location and create a new folder named libraries. And paste the extracted folder to that folder.

Now, the directory structure will look somewhat like below:


In the next step, we have to add this to settings Gradle, Try the below code

include ':app'
include 'libraries:odoo-mobile-api-1.0.0'

Now we are partially set to get into the code, But there is one more important thing we have to do i.e. including the OOG Box API in your apps build.gradle

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation ''
implementation ''
testImplementation 'junit:junit:4.12'
androidTestImplementation ''
androidTestImplementation ''
implementation 'com.oogbox.api:odoo:1.0.1'

Now,  Let’s get coded:

Here I create an application that simply lets the user login to odoo.

So I have created a login page, and I have set the host to

Let’s see the code.

These are my imports from OOG Box.api

import oogbox.api.odoo.OdooClient;
import oogbox.api.odoo.OdooUser;
import oogbox.api.odoo.client.AuthError;
import oogbox.api.odoo.client.OdooVersion;
import oogbox.api.odoo.client.listeners.AuthenticateListener;
import oogbox.api.odoo.client.helper.OdooErrorException;
import oogbox.api.odoo.client.listeners.OdooErrorListener;
import oogbox.api.odoo.client.listeners.OdooConnectListener;

And we can set up the login by the below code.

client = new OdooClient.Builder(getApplicationContext())
.setErrorListener(new OdooErrorListener() {
@Override public void onError(OdooErrorException error) {
// Error exception with detail of errors } })
// Success connection
.setConnectListener(new OdooConnectListener() { @Override public void onConnected(OdooVersion version) {
ArrayAdapter<String> listAdapter = new ArrayAdapter<String>(getApplicationContext(),android.R.layout.simple_spinner_dropdown_item, databases);
List<String> databases = client.getDatabases(); dataBases = (Spinner)findViewById(; dataBases.setAdapter(listAdapter);

In the above code, I have established a connection to the server and fetched the names of Odoo databases and put across in a spinner.

Now let’s see how the login works.

buttonLogin.setOnClickListener(new View.OnClickListener() {
AuthenticateListener loginCallback = new AuthenticateListener() {
public void onClick(View v) {
public void onLoginSuccess(OdooUser user) {
Intent intent = new Intent(getApplicationContext(),HomeActivity.class);
intent.putExtra("sessionId",user.sessionId); startActivity(intent);
} @Override public void onLoginFail(AuthError error) { }
String password = editPassword.getText().toString();
}; String email = editEmail.getText().toString();

Here, I have a button named button Login,  I have set an onclick method to it.

When a click is performed, the username and the password along with the database selected from the spinner is sent to Odoo. And If the username and password get correct, It will return an Odoo user object. You can get the session id from this object and you can use it for odooClient.setSession() method.

Now we can use the Odoo object for any communication with the server just like the volley does.



Leave a comment


Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kerala, India - 673635


Cybrosys Limited
Alpha House,
100 Borough High Street, London,
SE1 1LB, United Kingdom


Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.


Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message