> For the complete documentation index, see [llms.txt](https://create.cloud4wi.ai/dev-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://create.cloud4wi.ai/dev-hub/location-sdk/integrating-the-sdk/android/project-initialization.md). Agents can also search and read this documentation through its [MCP server](https://create.cloud4wi.ai/dev-hub/~gitbook/mcp).

# Project initialization

## Initialize Users

In order to track geofencing events, you need to initialize a user in your Cloud4Wi account.

{% hint style="warning" %}
The method to initialize users is exposed in the WiFi SDK, so you need to integrate also the WiFi SDK into your project.
{% endhint %}

Once both the WiFi and Location SDKs are installed you can use the following snippet to initialize the customer in Cloud4Wi as soon the `deviceId` is assigned to the phone.  This function will initialize an anonymous user without any additional attribute or personal data associated.

```java
Cloud4WiSDKWiFi mobileSDK = new Cloud4WiSDKWiFi(getApplicationContext());
GeoUniq mGeoUniq = GeoUniq.getInstance(this);
            mGeoUniq.setDeviceIdListener(new GeoUniq.IDeviceIdListener() {
                @Override
                public void onDeviceIdAvailable(String deviceId) {
                    mobileSDK.setupCustomer(
                            customerCreateResponse -> {
                                Log.d("", customerCreateResponse.toString());
                            },
                            e -> {
                                Log.d("", e.getMessage());
                            });
                }
            });
```

In the alternative, you can use the native WiFi SDK methods to [initialize a customer](https://create.cloud4wi.ai/dev-hub/wifi-sdk/integrating-the-sdk/android/sdk-methods/createcustomer.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://create.cloud4wi.ai/dev-hub/location-sdk/integrating-the-sdk/android/project-initialization.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
