ANDROID SDK
With our Anfu AF30, Trendit S680, PAX terminal.. the below configurations works pretty weel.
TO START A CARD TRANSACTIONS
Download the aar file here -> https://github.com/ostilo/pos_sdk/blob/dc1078511a75d41c4095466f19411399b934a58d/pos_utils-debug.aar ->>>> Base SDK
https://github.com/ostilo/pos_sdk/blob/0c59e7a32d32c9166071063b2947359abb119447/AFSDKInterface_202502211810_V0.0.236_236.aar ->>>> Additional for ANFU
LINK TO SAMPLE GITHUB DEMO -> DEVELOP BRANCH
<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.
}Last updated