> For the complete documentation index, see [llms.txt](https://ftcoders.first-tech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ftcoders.first-tech.com/first-tech-ttp-sdk-pt/area-do-desenvolvedor/migrando-versoes/atualizando-da-versao-1.0.22-para-a-versao-1.0.25v19.md).

# Atualizando da versão 1.0.22 para a versão 1.0.25v19

Na versão 1.0.22 e anteriores, para inicializar o SDK era necessário estender a classe `TapOnPhoneApplication`. Essa classe, por sua vez, estendia `Application()`, e muitas aplicações têm sua própria classe que estende `Application()`. Como o Android não permite herança múltipla de Application, isso poderia causar erro na aplicação, já que duas classes Application estavam sendo estendidas. Para corrigir isso, não exigimos mais estender `TapOnPhoneApplication()`, mas sim que solicitamos agora fazer uma inicialização com a classe `TapOnPhoneInitializer`.\
\
Abaixo está como a implementação era feita na versão 1.0.22 e anteriores.

```
class Application : TapOnPhoneApplication() {
    override val terminalConfig = TerminalConfigEntity(
        companyDocument = BuildConfig.COMPANY_DOCUMENT,
        companyName = BuildConfig.COMPANY_NAME,
        merchantId = UUID.fromString(BuildConfig.MERCHANT_ID),
        terminalNumber = BuildConfig.TERMINAL_NUMBER,
        clientId = BuildConfig.CLIENT_ID,
        clientSecret = BuildConfig.CLIENT_SECRET
    )
}
```

A partir da versão 1.0.25v19, a implementação é feita da seguinte forma:

```
class Application : Application() {

    override fun onCreate() {
        super.onCreate()

        if (!TapOnPhoneInitializer.isApplicationInitAllowed(this)) return

        TapOnPhoneInitializer.initializeTerminal(this)

        TapOnPhoneInitializer.setTerminalConfig(
            TerminalConfigEntity(
                companyDocument = BuildConfig.COMPANY_DOCUMENT,
                companyName = BuildConfig.COMPANY_NAME,
                merchantId = UUID.fromString(BuildConfig.MERCHANT_ID),
                terminalNumber = BuildConfig.TERMINAL_NUMBER,
                clientId = BuildConfig.CLIENT_ID,
                clientSecret = BuildConfig.CLIENT_SECRET,
                sdkScope = BuildConfig.SDK_SCOPE,
                sdkClientId = BuildConfig.SKD_CLIENT_ID,
                sdkClientSecret = BuildConfig.SDK_CLIENT_SECRET,
                appVersion = "1.0.0",
                packageName = applicationContext.packageName,
                sdkOrganization = "Organization 123",
                versionCode = (if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
                    packageManager.getPackageInfo(packageName, 0).longVersionCode
                } else {
                    packageManager.getPackageInfo(packageName, 0).versionCode.toLong()
                }).toString()
            )
        )
    }
}
```


---

# 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://ftcoders.first-tech.com/first-tech-ttp-sdk-pt/area-do-desenvolvedor/migrando-versoes/atualizando-da-versao-1.0.22-para-a-versao-1.0.25v19.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.
