> For the complete documentation index, see [llms.txt](https://docs.winzogames.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.winzogames.com/old-sdk/producing-apk.md).

# Producing APK

Build two APKs one with keeping the launcher intent filter for MainActivity and the other without keeping the launcher intent filter for MainActivity.\
While building and providing WinZO APK do the following changes for the main activity in the manifest file.

**Keeping the launcher intent filter** \
This is for Android 10 and above devices

```markup
<activity
    android:name="com.base.aidllib.MainActivity"
    android:exported="true"
    android:theme="@style/SplashTheme">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <intent-filter>
        <action android:name="com.base.aidllib.MainActivity" />
    </intent-filter>
</activity>
```

**Not keeping the launcher intent filter** \
This is for Android 9 and below devices

```markup
<activity
    android:name="com.base.aidllib.MainActivity"
    android:exported="true"
    android:theme="@style/SplashTheme">
    <intent-filter>
        <action android:name="com.base.aidllib.MainActivity" />
    </intent-filter>
</activity>
```

**Building Apk**

{% hint style="info" %}

1. Build two APKs with and without the launcher intent filters
2. Please include firebase crashlytics for crash tracking of the product.
3. Add Product Flavours in your app module *build.gradle* And WinzoSdk modules *build.gradle*
   {% endhint %}

```groovy
android {
...
    productFlavors {
        live {
            buildConfigField "boolean", "is_live", "true"
            buildConfigField "boolean", "is_stag", "false"
            dimension "api"
        }
        stag {
            buildConfigField "boolean", "is_stag", "true"
            buildConfigField "boolean", "is_live", "false"
            dimension "api"
        }
    }
}
```

**Analytics**\
\
Use WinzoSdk.connectToWinZO method to connect to WinZO. We Receive a WinZOClient in  `onConnectedToWinZO(winZOClient: WinZOClient)` callback use this client to log events `winZOClient.logEvent("Log Dummy Event")` If we want to add parameters to an event pass a bundle in `logEvent` method

```kotlin
connectToWinZO(WeakReference(this), object : IWinZOConnectionListener {
    override fun onConnectedToWinZO(winZOClient: WinZOClient) {
        winZOClient.logEvent("Log Dummy Event", Bundle().apply {
            putString("parameter name", "parameter name")
        })
    }

    override fun onDisConnectedToWinZO() {
    }
})
```
