Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QrCode printing on Android #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions src/hprt.android.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import 'rxjs/add/operator/distinctUntilChanged';
import { HPRTPrinter } from "./hprt.common";
export declare class Hprt {
private printer;
private hpm;
private hphc;
private encoding;
private printerModel;
private HPRTPrinterHelper;
private mBluetoothAdapter;
constructor();
enableBluetooth(timeout?: number): Promise<any>;
isBluetoothEnabled(): boolean;
isBluetoothEnabledPromise(): Promise<any>;
searchPrinters(): Promise<Array<HPRTPrinter>>;
connect(portSetting: HPRTPrinter): Promise<any>;
disconnect(): Promise<any>;
isConnected(): boolean;
printTextSimple(text: string): boolean;
printText(text: string, alignment: number, attribute: number, textSize: number): boolean;
printTextDouble(text: string): boolean;
printTextDoubleHeight(text: string): boolean;
printTextDoubleWidth(text: string): boolean;
printTextUnderline(text: string): boolean;
printTextBold(text: string): boolean;
printTextMini(text: string): boolean;
printTextWhite(text: string): boolean;
printTextLeft(text: string): boolean;
printTextCenter(text: string): boolean;
printTextRight(text: string): boolean;
newLine(lines?: number): boolean;
horizontalLine(): boolean;
printQrCode(text: string, alignment: number, attribute: number, textSize: number): boolean;
testPrint(): Promise<any>;
private toBytes(val);
private LanguageEncode();
private getEncodedString(val);
private AfterPrintAction();
private listenToBluetoothEnabled();
}
export declare class PrinterProperty {
static Barcode: string;
static PrintableWidth: number;
static Cut: boolean;
static CutSpacing: number;
static TearSpacing: number;
static ConnectType: number;
static Cashdrawer: boolean;
static Buzzer: boolean;
static Pagemode: boolean;
static PagemodeArea: string;
static GetRemainingPower: boolean;
static SampleReceipt: boolean;
static StatusMode: number;
}
300 changes: 300 additions & 0 deletions src/hprt.android.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added src/platforms/android/nativescript_hprt.aar
Binary file not shown.