Android
API Reference
For a complete reference of all classes, methods, and properties available in the Toro Android SDK, view our API documentation.
Hardware Prerequisites
Android device
- Running Android 7.0 (API level 24) or higher.
- With Bluetooth capabilities (if using devices in Bluetooth mode).
- With internet access.
Miura PIN Entry Device (PED)
- Miura Payments Interface (MPI) installed.
The SDK has been tested with
- Miura M010 and M021 devices.
- Pixel 4a (Android 13) and Nexus 5X (Android 8.1).
Your project
Android Configuration
- Minimum Android SDK (minSdk): 24 (Android 7.0 Nougat).
Java/Kotlin Configuration
- Java 8 compatibility required.
- Kotlin projects should use JVM target 1.8.
Code Optimisation and Security
We strongly recommend enabling ProGuard/R8 code optimization and obfuscation in your application's release builds. This is crucial for:
- Protecting your application and the SDK from reverse engineering.
- Optimising the final APK size.
- Ensuring secure handling of cardholder data.
Java Interoperability
While the Toro SDK is primarily designed and tested for Kotlin projects, we have made accommodations to support Java integration where possible. The main consideration has been handling Kotlin Coroutines, which are used extensively throughout the SDK.
For methods that use Coroutines, we provide Java-friendly alternatives that use callback patterns. These wrapper methods handle all the Coroutine complexity internally, allowing Java developers to work with familiar callback interfaces instead.
For example, instead of:
suspend fun getDeviceInfo(): MiuraDeviceInfoJava developers can use:
void getDeviceInfo(ToroCallback<MiuraDeviceInfo> callback)While we've made efforts to support Java integration, the SDK is specifically designed and tested for Kotlin projects. If you're starting a new project, we strongly recommend using Kotlin to ensure the best experience with the SDK.
If you encounter any issues using the SDK in a Java project, please let us know.