For Developers: Setting Up the Environment to Get Started

You can start the project in two ways:

  1. Creating a new project from scratch in your IDE.

  2. Using our prebuilt sample projects, which are already set up for testing and compilation.

In this page, we will focus on creating the project from the ground up.

Below, we highlight the essential points to ensure the correct functionality of our Tap On Phone SDK.

Creating a New Android Project

1

Restoring the Development Mobile Device Factory Mode

It is strongly recommended that the developer starts the project using a factory-reset mobile device.

This practice prevents contamination from previous device usage, ensuring a clean and reliable environment for development and testing. Additionally, it helps avoid unnecessary troubleshooting processes, which can be time-consuming.

2

Starting Android Project

We understand that there are various approaches to creating a new project, whether through a graphical user interface (GUI) or the command line.

We will follow the GUI path here:

In Android Studio, start a new project by selecting the 'Phone and Tablet' template and choosing the 'Empty Activity' model.

New Android Project Creation Screen in [Android Studio]

Click Next to proceed to the configuration step for two of the most important project elements: the application name and the package name.

New Android Project Information Screen in [Android Studio]

These details are essential for credential generation, troubleshooting, and ensuring the SDK functions correctly within the application.

Field Descriptions:

  • Name: Enter the project name (e.g., My Application).

  • Package Name: Define a unique and meaningful package name (e.g., com.companyname.payments.myapp).

The Package Name is a critical piece of information required to authorize the application during deployment. If you change this field after the app has been deployed to production, you must notify First Tech to have it reauthorized. Otherwise, session activation errors may occur during Tap to Phone transactions.

  • Save Location: Choose the directory where the project will be saved (e.g., E:\Dev\FirstTech\AppNative\MyApplication).

  • Minimum SDK: Select the minimum Android SDK version that the application should support.

Minimum Android SDK version supported by the Tap On Phone SDK: [Android 10 - API Level 29]

Language: Choose the programming language (e.g., Kotlin [recommended] or Java).

After filling in these details, click Finish to create the project.

Wait until the Gradle synchronization is fully completed and the project is ready for editing.

Once everything is loaded and set up, your Android Studio file structure should resemble the one shown bellow:

Android Studio IDE Loaded and Ready for Development
3

First Build & Testing

At this point, you can already perform the Build process for the project and validate that everything is set up correctly before proceeding to the next steps. To do this, you need a configured device or emulator in your development environment.

To list the devices/emulators connected to your development environment, open the Android Studio terminal ([ALT + F12]) and enter the following command:

adb devices
Android Studio IDE Terminal Listing Devices Ready for Use in the Development Environment.

Last updated