Enable Dark Mode!
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: https://developer.android.com/studio/install

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 https://github.com/oogbox/odoo-mobile-api

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 'com.android.support:appcompat-v7:28.0.0-rc02'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
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 mydomain.com

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(R.id.spinnerDataBases); 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.

If you need any assistance in odoo, we are online, please chat with us.

cybrosys youtube



There is also a framework called Odoo Mobile Framework. I have tried it but found a lot of issues and I was not able to get it to work properly. I have discussed with an < a href="https://www.odooconsultant.com/">Odoo Consultant and he was unable to complete my doubt. If the author has any experience with Odoo framework. Let me know.





This URL not working ***https://github.com/oogbox/odoo-mobile-api***. And I'm facing session expired issues. it working odoo version 10 but 12 and 13 not working. It throwing "SESSION EXPIRED". Is this library working for odoo 13..? Thanks in adv.




Mansi Shah

Is this API still available?? I am working on this API but find Some issues. If you are still working with the same please do reply asap. Thank you, Mansi





Sir, I want to work on this API. Please Guide me how can I fully developed the Odoo HelpDesk module. Please help me. Thanking you Parimal





Is this library available for odoo v13?




Leave a comment


Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
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