Ocamba SDK

Info
Status of Ocamba features (push and analytics) can be override from web platform.
  1. Open project level build.gradle allprojects or settings.gradle dependencyResolutionManagement and add following:

        repositories {
            maven {
                url "https://maven.delsystems.net/public"
            }
        }

  1. Open app level build.gradle and add dependecies debug (with logs) and release:

    ```xml
        debugImplementation 'com.ocamba:hoood—debug:3.0.0'
    ```

or


    ```xml
        releaseImplementation 'com.ocamba:hoood:3.0.0'
    ```

  1. Create Application class and choose one of two ways to initilaize Ocamba:
  • Add Ocampa Api Key to manifest:

Open App module AndroidManifest.xml and add a new line in application tag:



<meta-data android:name="com.ocamba.ApiKey" android:value="API_KEY" />

  • Open application class and in onCreate method add following:


OcambaHoood.getBuilder().init();

  • Or add Ocamba Api Key directly in init method:

    ```java
        OcambaHoood.getBuilder().init("API_KEY");
    ```

  1. If you want to receive callback on initialization (use it if you work with push feature):

    ```java
        OcambaHoood.push().setPushResponse(new OcambaResponseCallback() {
            @Override
            public void onFailure(Exception e) { }
            @Override
            public void onResponse(int code, String response) { }
        }).init();
    ```
Info
NOTE: replace API_KEY with your app api key.
Info
NOTE: our recommendation is add OcambaHoood.getBuilder().init() method inside onCreate() method of Application class.
On This Page