androidusb

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package androidusb adapts Android's USB host APIs to the S&D printer interface. Android permission prompts and device access stay in Kotlin/Java; this Go package only forwards endpoint discovery and ESC/POS bytes.

Index

Constants

View Source
const PrinterName = "Android USB Printing"

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

type Bridge interface {
	AvailableEndpointsJSON() (string, error)
	Print(endpoint string, data []byte) error
}

type USB

type USB struct {
	// contains filtered or unexported fields
}

func New

func New(bridge Bridge) *USB

func (*USB) AvailableEndpoints

func (u *USB) AvailableEndpoints() (map[string]string, error)

func (*USB) Description

func (u *USB) Description() string

func (*USB) Name

func (u *USB) Name() string

func (*USB) Print

func (u *USB) Print(endpoint string, image image.Image, data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL