--- title: "API Reference" slug: "method-library" updated: 2026-03-10T08:50:04Z published: 2026-03-10T08:50:04Z canonical: "docs.mapp.com/method-library" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # API Reference ## Overview This page provides a reference of the public methods available in the Mapp Engage Android SDK v6. > [!NOTE] > Note > > The Android SDK v6 is a legacy version. For new implementations, we recommend using [Android SDK v7](/v1/docs/android-sdk-v7-1). This reference is intended for maintaining or updating existing v6 integrations. --- ## Initialization Methods ### Engage The `Engage` method initializes the SDK by injecting connection parameters. It accepts two parameters: 1. **Application instance**: Used as the context. 2. **AppoxeeOptions**: Contains values required to connect to a backend service, including: - Server - SdkKey - TenantID - AppID #### Engage Call Once the SDK is ready, it can be accessed using the static method `Instance`. ## Setup Methods Setup methods allow user-level customization and configuration for enhanced engagement. These methods are only callable once the SDK is initialized. ### SDK Status #### Is Ready Checks whether the Mapp SDK is properly initialized. Returns `true` if ready; otherwise, `false`. ```java public boolean isReady() ``` #### Is Ready Call ```java boolean isReady = Appoxee.instance().isReady(); ``` ### Device Information #### Get Device Info Retrieves stored information about a registered device. This data is essential for other methods. ```java public DeviceInfo getDeviceInfo() ``` #### Get Device Info Call ```java DeviceInfo deviceInfo = Appoxee.instance().getDeviceInfo(); ``` ### Alias Management #### Set Alias Sets a user alias in a format convenient for the client’s system. ```java public RequestStatus setAlias(String alias, boolean resendCustomAttributes) ``` > [!NOTE] > Note > > For backward compatibility, a version without the boolean parameter may still exist in earlier 6.x releases. #### Set Alias Call ```java Appoxee.instance().setAlias("alias@example.com", false); ``` > [!NOTE] > Note > > When `resendCustomAttributes` is set to true, previously stored custom attributes will be re-synchronized with the backend. #### Get Alias Returns the current alias for a registered user. ```java public String getAlias() ``` #### Get Alias Call ```java String alias = Appoxee.instance().getAlias(); ``` ### Push Notifications #### Set Push Enabled Enables or disables push notifications. ```java public RequestStatus setPushEnabled(boolean isPushEnabled) ``` #### Set Push Enabled Call ```java Appoxee.instance().setPushEnabled(true); // or false ``` #### Is Push Enabled Checks whether push notifications are enabled. ```java public boolean isPushEnabled() ``` #### Is Push Enabled Call ```java boolean isEnabled = Appoxee.instance().isPushEnabled(); ``` ### User Management #### Logout Logs out a user, resets the alias, and toggles push notifications. ```java public void logOut(boolean pushEnable) ``` #### Logout Call ```java Appoxee.instance().logout(true); // or false ``` ### Firebase Token Management #### Set Token Registers a Firebase token for push notifications. ```java public void setToken(String token) ``` #### Set Token Call ```java Appoxee.instance().setToken("FIREBASE_TOKEN"); ``` #### Get Token Retrieves the registered Firebase token. ```java public void getFcmToken(ResultCallback callback) ``` #### Get Token Call ```java Appoxee.instance().getFcmToken(token -> Log.d(TAG, token)); ``` ### Custom Attributes #### Set Attribute Allows defining custom attributes for campaign targeting. Supported types: - Boolean - Date - Number - String #### Set Attribute Call ```java Appoxee.instance().setAttribute("key", value); ``` #### Get Custom Attribute Value Retrieves the value of a custom attribute as a string. ```java public String getAttributeStringValue(String key) ``` #### Get Custom Attribute Value Call ```java String value = Appoxee.instance().getAttributeStringValue("key"); ``` #### Get Custom Attributes Fetches a list of custom attributes. ```java public RequestStatus getCustomAttributes(boolean persist, List attributesKeys, GetCustomAttributesCallback callback) ``` #### Get Custom Attributes Call ```java        Appoxee.instance().getCustomAttributes(true, customAttributesNames, new GetCustomAttributesCallback() {            @Override            public void onSuccess(Map customAttributes) {                runOnUiThread(new Runnable() {                      // use the returned list of custom attributes                });            }            @Override            public void onError(String exception) {                runOnUiThread(new Runnable() {                    @Override                    public void run() {                       // handle error                    }                });            }        }); ``` #### Remove Attribute Deletes a custom attribute. ```java public void removeAttribute(String key) ``` #### Remove Attribute Call ```java Appoxee.instance().removeAttribute("key"); ``` ### Tags #### Add Tag Adds a tag to a device. ```java public RequestStatus addTag(String tag) ``` #### Add Tag Call ```java Appoxee.instance().addTag("tag"); ``` #### Get Tags Retrieves a list of tags applied to a device. ```java public Set getTags() ``` #### Get Tags Call ```java Set tags = Appoxee.instance().getTags(); ``` #### Remove Tag Removes a tag from a device. ```java public RequestStatus removeTag(String tag) ``` #### Remove Tag Call ```java Appoxee.instance().removeTag("tag"); ``` ### Inbox Messages #### Fetch Inbox Messages Fetches a list of inbox messages. ```java public void fetchInboxMessages() ``` #### Fetch Inbox Messages Call ```java InAppInboxCallback inAppInboxCallback = new InAppInboxCallback(); inAppInboxCallback.addInAppInboxMessagesReceivedCallback(new InAppInboxCallback.onInAppInboxMessagesReceived() {     @Override     public void onInAppInboxMessages(List richMessages) {           Log.d(TAG, "messages = " + richMessages);     }     @Override     public void onInAppInboxMessage(APXInboxMessage message) {     } }); Appoxee.instance().fetchInboxMessages(); ``` #### Fetch Single Inbox Message Fetches a specific message by template ID. ```java public void fetchInboxMessage(int templateId) ``` #### Fetch Inbox Message Call ```java Appoxee.instance().fetchInboxMessage(messageId); ``` ### Rich Push Messages #### Handle Rich Push Messages Handles multimedia-rich push messages. This method should be called in `MainActivity` or similar. ```java public static RequestStatus handleRichPush(Context context, Intent intent) ``` #### Handle Rich Push Call ```java Appoxee.handleRichPush(this, intent); ``` ### Geofencing #### Start Geofencing Initiates geofencing for location-based engagement. ```java public void startGeoFencing(ResultCallback callback) ``` #### Start Geofencing Call ```java    private final ResultCallback geofenceCallback = new ResultCallback<>() {        @Override        public void onResult(@Nullable String result) {            devLogger.d(result);            if (result != null) {                switch (result) {                    case GeofenceStatus.GEOFENCE_STARTED_OK:                        Toast.makeText(MainActivity.this, "Geofence started successfully", Toast.LENGTH_SHORT).show();                        break;                    case GeofenceStatus.GEOFENCE_STOPPED_OK:                        Toast.makeText(MainActivity.this, "Geofence stopped successfully", Toast.LENGTH_SHORT).show();                        break;                    default:                        Toast.makeText(MainActivity.this, result, Toast.LENGTH_SHORT).show();                        break;                }            }        }    };    Appoxee.instance().startGeoFencing(geofenceCallback); ``` #### Stop Geofencing Stops the geofencing service. ```java public void stopGeoFencing(@Nullable ResultCallback callback) ``` #### Stop Geofencing Call ```java Appoxee.instance().stopGeoFencing(geofenceCallback); ``` #### Is Geofencing Activated Checks if geofencing is active. ```java public boolean isGeofencingActive() ``` #### Is Geofencing Activated Call ```java boolean isGeoActive = Appoxee.instance().isGeofencingActive(); ``` ## Event Notifier Methods ### Initialization Listeners #### Add Init Listener Registers a listener for SDK initialization events. ```java public void addInitListener(OnInitCompletedListener onInitCompletedListener) ``` #### Add Init Listener Call ```java    private final Appoxee.OnInitCompletedListener initFinishedListener = new Appoxee.OnInitCompletedListener() {        @Override        public void onInitCompleted(boolean successful, Exception failReason) {            Log.i("APX", "init completed listener - Application class");        }    };    @Override    public void onCreate() {        super.onCreate(); // other initialisation part        Appoxee.instance().addInitListener(initFinishedListener);    } ``` #### Remove Init Listener Removes a previously added initialization listener. ```java public void removeInitListener(OnInitCompletedListener onInitCompletedListener) ``` #### Remove Init Listener Call ```java Appoxee.instance().removeInitListener(this); ``` ### Push Event Receivers #### Register Push Events Receiver Registers a class to handle push message events (e.g., clicked, opened, dismissed). ```java public synchronized void setReceiver(Class receiver) ``` #### Register Push Events Receiver Call ```java Appoxee.instance().setReceiver(MyPushBroadcastReceiver.class); ``` > [!NOTE] > **Note:** `MyPushBroadcastReceiver` must subclass `PushDataReceiver`.