GaloyMoney / pos-print-companion

3 stars 1 forks source link

POS Print Companion App

Overview

This Android app is a wrapper for the NyxPrinterClient, an SDK used for printing receipts from Bitcoinzie POS machines. The app does not have a user interface, which fixes the problem of switching between apps while using Deeplink. It uses a deep link approach to receive data and initiate printing commands.

Description

Building the App

To build the app, you need to have the Java Development Kit (JDK-17) installed on your computer. Use the following command to compile the app:

./gradlew assembleDebug

usage

// Define the parameters
var username = 'blinkUsername';
var amount = 'TransactionAmount';
var paymentHash = 'UniquePaymentHash';

// Encode the parameters and construct the deep link URL
var deepLinkUrl = `blink-pos-companion://print?username=${encodeURIComponent(username)}&amount=${encodeURIComponent(amount)}&paymentHash=${encodeURIComponent(paymentHash)}`;

// Redirect to the deep link URL to initiate the printing process
window.location.href = deepLinkUrl;