> 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/developer-zone/migrating-versions/upgrading-from-version-1.0.22-to-version-1.0.25v19.md).

# Upgrading from version 1.0.22 to version 1.0.25v19

In version 1.0.22 and earlier, in order to initialize the SDK it was necessary to extend the `TapOnPhoneApplication` class. This class, in turn, extended `Application()`, and many applications have their own class that extends `Application()`. As Android doesn't allow multiple inheritance of Application, this could cause an error in the application, as two Application classes were being extended. To fix this, we no longer require `TapOnPhoneApplication()` to be extended, but we now require it to be initialized with the `TapOnPhoneInitializer` class.

Below is how the implementation was done in version 1.0.22 and earlier.

```
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
    )
}
```

As of version 1.0.25v19, the implementation is as follows:

```
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/developer-zone/migrating-versions/upgrading-from-version-1.0.22-to-version-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.
