ZCAPI
zc init
kotlin
import com.zcapi
class MainActivity : ComponentActivity() {
// init zcapi
// public or private
private var displayer = zcapi()
override fun onCreate(savedInstanceState: Bundle?) {
// setting context
this.displayer.getContext(applicationContext)
// ...
}
}
Methods of System Control
method | description |
---|---|
shutdown | Shut down your vending machine |
reboot | Reboot your vending machine |
setPowerOnOffTime | Scheduled Power On/Off |
getBuildModel | Get the Board Model Number |
getBuildSerial | Get the Board Serial Number (SN) |
setStatusBar | Hide Or Show the Navigation Bar and Status Bar. |
setGestureStatusBar | Allow or Disable Swipe to Pull Down the Status Bar. |
The above are the commonly used methods. For more details on other methods, you can click the JAR file to view further information.
Production Environment
we recommend that the app hides the navigation bar and status bar upon startup, as well as disables the swipe-to-pull-down feature for the status bar.
kotlin
class MainActivity : ComponentActivity() {
// init zcapi
private var displayer = zcapi()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
this.displayer.setStatusBar(false)
this.displayer.setGestureStatusBar(false)
// ....
}
}