USDK API
Installation
DeviceHelper.java
For the first time to use USDK API please import the file DeviceHelper.java.
If want to example project Download here (~167.6 MB)
(In the Zip file include documentation and java library.)
The MainActivity class is called USDK from DeviceHelper class to the initial module to use APOS A8 device.
In the First step, this function is initialization when activity going start. If don't call this function it can't use all services of APOS A8.
class MainActivity : ComponentActivity(), DeviceHelper.ServiceReadyListener {
...
DeviceHelper.me().init(this)
DeviceHelper.me().bindService()
DeviceHelper.me().setServiceListener(this)
override fun onReady(version: String?) {
//If activity is ready
DeviceHelper.me().register(true)
}
override fun onDestroy() {
super.onDestroy()
// If activity destroy
DeviceHelper.me().unregister()
DeviceHelper.me().unbindService()
DeviceHelper.me().setServiceListener(null)
}
...
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
DeviceHelper.java
DeviceHelper.java is a file for the helper to use USDK API to make it easier such as calling IC reader swipe card camera LED control and more. If want to use download here.