The fastest way to add printing to your Android app: send text, HTML, or images to Bluetooth Printer+ using a standard share Intent - the same mechanism you'd use to share to WhatsApp or Gmail.
Bluetooth Printer+ registers itself as a receiver for ACTION_SEND (and ACTION_SEND_MULTIPLE) intents. Any Android app - yours, or a user picking it from the system share sheet - can hand it text, HTML, or images and it opens, connects to the default printer, and prints. No pairing, account, or internet connection required; everything happens locally on the phone.
| Content type | Extra | Behavior |
|---|---|---|
text/plain | EXTRA_TEXT | Printed as-is (see markup syntax below) |
text/html | EXTRA_TEXT | HTML tags are stripped down to formatted plain text - not styled (use text/plain + markup syntax for real bold/underline) |
image/* | EXTRA_STREAM | Printed as a dithered image |
image/* (ACTION_SEND_MULTIPLE) | EXTRA_STREAM (ArrayList) | Each image printed in sequence |
val intent = Intent(Intent.ACTION_SEND).apply {
setPackage("com.iyaltamizh.app.btprinter")
type = "text/plain"
putExtra(Intent.EXTRA_TEXT, "Hello from my app!\nOrder #A-1042 confirmed.")
}
startActivity(intent)
Omit setPackage(...) to show the normal Android share sheet instead of targeting Bluetooth Printer+ directly.
For real bold/underline/alignment/QR output, send text/plain using the same lightweight markup Deep Link and JS Interface accept (**bold**, [center]/[right]/[small], [qr], an 8+ dash divider line) rather than text/html, since HTML formatting itself is flattened on print:
val intent = Intent(Intent.ACTION_SEND).apply {
setPackage("com.iyaltamizh.app.btprinter")
type = "text/plain"
putExtra(Intent.EXTRA_TEXT,
"[center]**MY STORE**[/center]\n" +
"--------------------------------\n" +
"2x Coffee $7.00\n" +
"--------------------------------\n" +
"**Total: $7.00**")
}
startActivity(intent)
Content containing [[name]] or #[[name]] tokens is detected automatically when the app opens:
[[name]] tokens auto-fill from values already saved in-app (Main Menu โ Placeholders) - no prompt shown.#[[name]] tokens pop up an on-screen input dialog for the user to fill in before printing.val intent = Intent(Intent.ACTION_SEND).apply {
setPackage("com.iyaltamizh.app.btprinter")
type = "text/plain"
putExtra(Intent.EXTRA_TEXT,
"Hello #[[customer]],\nYour table #[[table]] order is ready.")
}
startActivity(intent)
// The app prompts the user for "customer" and "table" before printing.
By default, text/plain content prints as raw ESC/POS text using the printer's own built-in font. Add the boolean extra strict_mode to render it as a dithered image instead - pixel-for-pixel what a formatted on-screen template would look like, independent of whatever the phone's Settings screen has Strict Mode set to.
val intent = Intent(Intent.ACTION_SEND).apply {
setPackage("com.iyaltamizh.app.btprinter")
type = "text/plain"
putExtra(Intent.EXTRA_TEXT, "[center]**MY STORE**[/center]\nThank you!")
putExtra("strict_mode", true)
}
startActivity(intent)
Slower and heavier than normal text printing (it dithers and rasters an image instead of writing text bytes) - reach for it when formatting fidelity matters more than speed, not as the default for every job.
text/html is flattened to plain, word-wrapped text - HTML tags (bold, tables, etc.) are not rendered. Use the markup syntax shown above for real formatting.#[[placeholder]] tokens require a human present to answer the prompt - not suitable for unattended/automated flows.