# MD for: https://www.mercadopago.com.mx/developers/en/docs/smartapps/development-environment.md \# Configure development environment To integrate your SmartApp with Point Smart, it is necessary to prepare the Point terminal environment so that the payment flow between your application and Mercado Pago works correctly. Below, you will find the necessary configurations to make your SmartApp available. :::AccordionComponent{title="Update debug terminal" pill="1"} Before starting your integration, update the debug terminal received with the kit with the sandbox version provided by the team responsible for your integration. After this update, the team will perform some internal configurations so that the terminal can operate correctly in the sandbox environment. This is a simulation application designed to replicate and test the key functionalities of our SDK. This application allows you to simulate fundamental processes such as logging in with user and password credentials, as well as complete payment processing flows. The installation process can be performed using \`adb\` (\_Android Debug Bridge\_) using the following command and replacing \`\` with the full path of the downloaded \`APK\` file. \`\`\`bash adb install \`\`\` > WARNING > > It is recommended to \*\*uninstall any previous version\*\* of the application installed on your terminal before proceeding with the sandbox \`APK\` installation. This will ensure proper functioning of the simulation application and avoid possible conflicts. To use the simulation functionality, you need to install the \`APK\` with the \_sandbox\_ flavor. This \`APK\` is available in the integration kit, from which you can download it. Once downloaded, you should install it on the terminal. ::: :::AccordionComponent{title="Include the development kit library" pill="2"} The development kit contains the necessary resources to integrate the payment flow using the Mercado Pago SDK. With your application base developed and after the authorizations performed on the terminal, follow these steps: 1\. Add the Development Kit library to the \`app/libs\` directory. 2\. Install the demo version of the SmartApp to serve as a base for your integration. If you prefer, you can directly install your own SmartApp. 3\. Then, in the \`.gradle\` file of the module where you will use the SDK, include the dependency for the added library: \`\`\`gradle dependencies { .... implementation files("libs/nativesdk-0.1.0.aar") ... } \`\`\` > RED\_MESSAGE > > Integration is only possible with the latest available SDK version. If you receive an error indicating that the version is not the most up to date, request the updated files from the team responsible for your integration. ::: :::AccordionComponent{title="Configure AndroidManifest" pill="3"} After defining which SmartApp will be integrated with the Point terminal, indicate in the \`AndroidManifest.xml\` file the main activity that will be set as the application's \_launcher\_. ### Main Apps \*\*Main Apps\*\* are business management applications that you can integrate with Point Smart and that will become the main interface of the terminal. In other words, the entire terminal operating system will have the Main Apps interface and you will be able to use the available functionalities (such as Bluetooth, scanner camera, etc.) to process payments. To do this, add the following \`intent-filter\` in the \`XML\` file: \`\`\`xml ... \`\`\` Example of \_Manifest\_ configuration. \`\`\`xml \`\`\` ::: :::AccordionComponent{title="Configure metadata in AndroidManifest" pill="4"} The \_metadata\_ configuration in the \`AndroidManifest.xml\` file is fundamental to ensure the complete integration of the Mercado Pago SDK in your application. This \_metadata\_ is responsible for defining mandatory and customized configurations so that the SDK operates properly and, thus, ensures that your application better leverages payment functionalities and offers a consistent and optimized shopping experience. Below you will see how to configure the mandatory and optional \_metadata\_ in the \`AndroidManifest.xml\`. #### :TagComponent{tag="REQUIRED" text="CLIENT\_ID"} The \`CLIENT\_ID\` field is used to identify integrator transactions and must contain the value assigned to the :toolTipComponent\[application\]{link="/developers/en/docs/smartapps/resources/application-details"} created in Mercado Pago. This field must be defined in the \`AndroidManifest.xml\` file according to the following example: \`\`\`xml \`\`\` | Field | Description | |---|---| | \`android:name\` | The \_metadata\_ name must be exactly \`com.mercadolibre.android.sdk.CLIENT\_ID\`. Any variation in the name will prevent its recognition by the SDK. | | \`android:value\` | The value must be the \`client\_id\` assigned to the application and must mandatorily contain the letter \*\*L\*\* at the end of the number, indicating that it is of type \_Long\_. | #### :TagComponent{tag="OPTIONAL/REQUIRED" text="OAUTH\_ENABLED"} The \`OAUTH\_ENABLED\` field activates the \[OAuth\](https://www.mercadopago.com.mx/developers/en/docs/smartapps/resources/security/landing-hub) security protocol, necessary when terminals use accounts different from the application developer's main account. This field is optional :toolTipComponent\[for your own terminal integration\]{link="/developers/en/docs/smartapps/create-application#bookmark\_access\_credentials" linkText="Access credentials" content="Mercado Pago Point integrations to your system for your own use and configured using your application's production credentials. For more information, access the link below."} and required :toolTipComponent\[for a third-part integration\]{link="/developers/en/docs/smartapps/create-application#bookmark\_access\_credentials" linkText="Access credentials" content="Mercado Pago Point integrations to your system on behalf of a seller and configured using credentials obtained through the OAuth security protocol. For more information, access the link below."}. If not included a value, the default will be \`false\`. > WARNING > > Users who use this business model must accept the permissions from the authentication URL and will be able to generate their credentials via OAuth if required. For more information, see \[Obtaining credentials for integration for a third-part integration\](https://www.mercadopago.com.mx/developers/en/docs/smartapps/create-application#bookmark\_access\_credentials). \`\`\`xml \`\`\` | Field | Description | |-----------------|-------------| | \`android:name\` | The \_metadata\_ name must be exactly \`com.mercadolibre.android.sdk.OAUTH\_ENABLED\`. Any variation in the name will prevent its recognition by the SDK. | | \`android:value\` | The value must be \`true\` or \`false\`, indicating whether the OAuth model is enabled or not. | #### :TagComponent{tag="OPTIONAL/REQUIRED" text="PLATFORM\_ID"} The \`PLATFORM\_ID\` field is a unique code for each integration that identifies your application in our ecosystem, which facilitates detailed analysis and traceability of the payment flow. This field is optional if your integration does not fall under the concept of platforms, and mandatory if it does. If it is not mandatory, leaving this field blank will not affect the SDK’s functionality. > NOTE > > To obtain your \`PLATFORM\_ID\`, contact the team responsible for your integration. \`\`\`xml \`\`\` | Field | Description | |-----------------|-------------| | \`android:name\` | The \_metadata\_ name must be exactly \`com.mercadolibre.android.sdk.PLATFORM\_ID\`. Any variation in the name will prevent its recognition by the SDK. | | \`android:value\` | The value must contain the unique identifier of your integration in Mercado Pago. | ::: :::AccordionComponent{title="Configure payment SDK" pill="5"} After running the development kit, including the SmartApp on the Point terminal and configuring the \_AndroidManifest\_ file, configure the SDK responsible for the payment flow received in the application. To do this, create a class, inherited from the \`Application\` class, and include the SDK configuration as in the following example. * [java ](#editor%5F2) * [kotlin ](#editor%5F1) kotlin java ``` class MainApplication : Application() { override fun onCreate() { super.onCreate() val config = MPConfigBuilder(this, "123456789") .withBluetoothConfig() .withBluetoothUIConfig() .build() MPManager.initialize(this, config) } } ``` Copiar ``` public class MainApplication extends Application { @Override public void onCreate() { super.onCreate(); MPConfig config = new MPConfigBuilder(this, "CLIENT_ID") .withBluetoothConfig() .withBluetoothUIConfig() .build(); MPManager.INSTANCE.initialize(this, config); } } ``` Copiar With the SDK configured, you can \[integrate the payment flow\](https://www.mercadopago.com.mx/developers/pt/docs/smartapps/integrate-payment-flow). :::