btPrinterConnect
Description
Connects a bluetooth printer to the device.
Input / Parameter
printerID
The id of the printer to connent.
String/Text
-
-
Yes
extra
Extra parameters stored and passed to callback.
Any
-
-
No
Output
N/A
Callback
callback
The function to be executed if the printer is connected successfully.
errCallback
The function to be executed if the printer is not connected successfully.
Video
Coming Soon.
Example
The user wants to connect a printer to their device.
Steps
Drag a combobox and button component to a page in the mobile designer. Call the function
btPrinterConnect
in the button component.Call the function
componentValue
in theprinterId
parameter of thebtPrinterConnect
function. Select the combobox component in thecomponent
parameter of thecomponentValue
function to view the printers connected.Call the function
infoDialog
in the callbacks of thebtPrinterConnect
function.
Result
Select the printer to connect to from the combobox.
Press the Connect button. If the printer is connected to the device successfully, the success infoDialog will appear. If the printer is not connected successfully, the error dialog will appear.
Links
Last updated