> ## Documentation Index
> Fetch the complete documentation index at: https://devzone.nayax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TC服务

TC Service 允许您将 Agamento 应用程序用作后台服务。如果您希望在设备上运行自己的 Android 应用程序，并使用 Agamento 执行交易，您可以将 Agamento 配置为以 TC Service 方式运行。

每当您的应用程序发起交易时，Agamento 都会被触发并启动运行。应用程序之间的通信基于 TweezerComm 协议。

![](https://mintcdn.com/nayax-44d6e37b/gp-udlFbAMEECcYg/images/docs/tc-service/image1.png?fit=max\&auto=format\&n=gp-udlFbAMEECcYg\&q=85\&s=cd8983dcd0ab1a9ed72f807353dd92be)

## 演示 APK

该 APK 是用于使用 TC Service 的演示工具。它包含一个基本实现，展示了如何将我们的 Agamento 应用程序作为服务使用，并发送 TweezerComm 请求。

* [Demo .APK file](https://docs-engine.modularity.co.il/_static/TCServiceDemo.apk)

这将帮助您更好地理解其工作原理，从而更轻松地实现它。

## 示例代码

请使用以下代码示例，了解如何在您的 APK 中将 Agamento 应用程序作为服务进行集成。

* [TC Service Implementation Sample Code](https://github.com/ModularityLtd/TcsDemo)

代码中唯一需要调整的部分是请求中要发送的 JSON 字段。例如，请参阅 `doTransaction` Command 函数（位于 `AgamentoMethods.java` 中）。在该函数中，您可以找到设置 JSON 文件字段和值的位置。

例如，`put(“currency”,CURRENCY)` 是根据代码开头配置的货币设置的：`String CURRENCY = “376”`

![](https://mintcdn.com/nayax-44d6e37b/gp-udlFbAMEECcYg/images/docs/tc-service/image2.gif?s=5da76840f010a4cc79e3c9f5bba8c0b6)

> [!NOTE]
>
> TweezerComm 命令
>
> TweezerComm 命令应基于 API，并与您的特定支付服务相关。

## 参见

> **[开始](/docs/integrate-pos-device/tweezercomm/tweezercomm-get-started.md)**

> **[交易方法](/docs/integrate-pos-device/tweezercomm/global-payment-methods/payment-services-methods-copy-1)**


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.