# Initialization

### Initialization

In order to initialize Snapscreen, the following class method must be called in your custom Application class in **`onCreate()`**

```kotlin
class MyApplication: Application() {
    
    override fun onCreate() {
        super.onCreate()

        Snapscreen.setup(
            this, 
            "your-client-id", 
            "your-client-secret", 
            Environment.PRODUCTION
        )
    }
}
```

### Additional Information

For best results, locational information must be provided for the user on initialization. Within the SDK, set the users country and US state information using the parameters **country** and **usState**. For US customers, country and state information must be provided. For non-US customers, at least country should be provided.

```kotlin
Snapscreen.instance?.country = "US"
Snapscreen.instance?.usState = "NJ"
```

### Accessing SDK Instance

Once Snapscreen has been initialized, it can be retrieved by calling:

```kotlin
Snapscreen.instance
```


---

# Agent Instructions: 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:

```
GET https://docs.snapodds.com/docs/mobile-sdk/android/snapodds-operator/initialization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
