ANDROID SDK
With our Anfu AF30, Trendit S680, PAX terminal.. the below configurations works pretty weel.
Last updated
With our Anfu AF30, Trendit S680, PAX terminal.. the below configurations works pretty weel.
Last updated
<Application
android:name="com.konga.pos_utils.sdk.ApplicationClass"
Add the above to the Application name in the app manifest.// Add this to the app build.gradle file
implementation(files("libs/pos_utils-debug.aar"))
// While importing the file in the libs folder.
// when using ANFU terminal
implementation(files("libs/AFSDKInterface_202502211810_V0.0.236_236.aar"))
// Additional for Anfu terminal
implementation("com.github.getActivity:TitleBar:9.2")
implementation("com.github.getActivity:ToastUtils:9.5")
implementation("com.airbnb.android:lottie:6.0.0") private var posImpl: POSDeviceImpl? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContentView(R.layout.activity_main)
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
insets
}
POSDeviceImpl.init(PosType.Trendit) // Here init the type of terminal to use.
}
val transactionInfo = TransactionInfo(
"1492430209", // 1492430209 //1492018990 // S6805370006263
"196.6.103.18",
"501",
"60",
"31446",
"1234",
"31446",
"2101MN91", // 2ISWR874
"2348044433322",
"VoomNow Digital",
"84ed228de9f566ec-AMS",
"44e7152d9b160e0ec747b71687ff2e65be76e60a",
false,
"2001684006",
"KongaTrendit",
"",
Location(3.356170f, 6.650580f),
TerminalKey(
"F1DC7310753DF8623EBA3731CBBA804A",
"49FB2668DC6251949DC7BA10B6E6DA29",
"89D3E364F73D2561A87F64D51525F27F"
),
"31446",
"Barkey",
"10000312123",
"browndon200@yahoo.com",
"Nil",
"2348160764301",
true,
"1.2.3",
"19",
"company"
) // Initialize as needed posImpl = POSDeviceImpl(this@MainActivity, PosType.Trendit, transactionInfo) { intent: Intent? ->
// Handle the intent
someActivityResultLauncher.launch(intent)
}
findViewById<View>(R.id.btnTest).setOnClickListener { v: View? ->
posImpl?.cardTransaction(50.0) // Start the transaction with the amount.
}