> For the complete documentation index, see [llms.txt](https://docs.zipy.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zipy.ai/zipy-for-mobile/android-setup/install-in-an-android-app.md).

# Install in an Android app

## Step 1: Add Dependency

In your app-level `build.gradle` file with the latest version:

Go to the following link for latest version:\
<https://central.sonatype.com/artifact/ai.zipy/zipy-android>&#x20;

```gradle
dependencies {
    implementation 'ai.zipy:zipy-android:1.0.1'
}
```

## Step 2: Initialize SDK

Initialize Zipy as early as possible (typically inside `Application` class).

```java
import com.zipy.zipyandroid.Zipy;

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        // Provide application context
        Zipy.setApplicationContext(application);
        // Initialize with API Key
        Zipy.init("YOUR_API_KEY");
    }
}

```

If you just want the latest version without hardcoding the number—which gives you flexibility but reduces clarity—you can use a dynamic version specifier:

```gradle
dependencies {
    implementation 'ai.zipy:zipyandroid:+'
}
```

Add these rules in proguard rules file if you are minifying code in release

```
-dontwarn com.zipy.zipyandroid.**
-keep class com.zipy.zipyandroid.** { *; }
-keepclassmembers class com.zipy.zipyandroid.** { *; }
-keepattributes *Annotation*,Signature,EnclosingMethod

# Prevent protobuf Lite classes (used by Zipy events/types) from being stripped/obfuscated.
# The crash "Field kind_ for j3.z1 not found" indicates Value/Struct fields were obfuscated.
-dontwarn com.google.protobuf.**
-keep class com.google.protobuf.** { *; }
-keepclassmembers class com.google.protobuf.** { *; }

# Keep generated proto event classes under types.* to preserve field names for reflection.
-dontwarn types.**
-keep class types.** { *; }
-keepclassmembers class types.** { *; } 
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zipy.ai/zipy-for-mobile/android-setup/install-in-an-android-app.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
