From f7c2133dcb15ad3b73215b3ac2c2ae44e13c5a70 Mon Sep 17 00:00:00 2001 From: bandit-ibayashi Date: Tue, 18 Apr 2023 09:22:58 +0900 Subject: [PATCH] V2.4.0 --- Readme_En.txt | 78 +++++------------ Readme_Jp.txt | 71 +++++----------- Samples/app/build.gradle | 2 +- .../star_m/passprnttester/MainActivity.java | 85 ++++++++++++++----- 4 files changed, 108 insertions(+), 128 deletions(-) diff --git a/Readme_En.txt b/Readme_En.txt index f74414f..7053833 100644 --- a/Readme_En.txt +++ b/Readme_En.txt @@ -1,6 +1,6 @@ ************************************************************ - Star PassPRNT Android SDK Ver 2.3.0 - Readme_En.txt Star Micronics Co., Ltd. + Star PassPRNT Android SDK Ver 2.4.0 + Readme_En.txt Star Micronics Co., Ltd. ************************************************************ 1. Overview @@ -12,14 +12,15 @@ ============= 1. Overview ============= + This package contains SDK for PassPRNT. - "PassPRNT" is an application intervening outer applications (hereinafter + "PassPRNT" is an application intervening outer applications (hereinafter called "Coordinating App") and Star Device (hereinafter called "Device"). This App transfers to the printer the print data converted from all Coordinating App information including receipt design, paper width and other related data. Therefore the Coordinating App needs no designing or development to establish communication with the printer. - Similarly printer status and print result are monitored as well so that + Similarly printer status and print result are monitored as well so that Coordinating App is not required on such control. Receipt design put out of this system is supported by HTML/PDF layout, so there is @@ -36,7 +37,7 @@ 2. Contents ============= - PassPRNT_Android_SDK_Ver2.3.0 + PassPRNT_Android_SDK_Ver2.4.0 | | Readme_En.txt // Release Note(English) | Readme_Jp.txt // Release Note(Japanese) @@ -46,77 +47,44 @@ | +- Samples // Android Studio project file for sample program - ================= 3. Scope ================= + [OS] - Android OS 5.0 - 12 + Android OS 7.0 - 13 [Software] - PassPRNT Ver2.5.0 + PassPRNT Ver 2.7.0 [Printer Model] - SM-L200 (Ver 1.1 or later - StarPRNT mode) - SM-S210i *1 (Ver 3.0 or later - StarPRNT mode) - (Ver 2.5 or later - ESC/POS mode) - SM-S220i *2 (Ver 3.0 or later - StarPRNT mode) - (Ver 2.1 or later - ESC/POS mode) - SM-S230i *2 (Ver 1.0 or later - StarPRNT mode) - (Ver 1.0 or later - ESC/POS mode) - SM-L300 (Ver 1.0 or later - StarPRNT mode) - SM-T300i/T300DB (Ver 3.0 or later - StarPRNT mode) - (Ver 2.5 or later - ESC/POS mode) - SM-T400i (Ver 3.0 or later - StarPRNT mode) - (Ver 2.5 or later - ESC/POS mode) - TSP650II (Ver 2.1 or later) - TSP700II (Ver 5.1 or later) - TSP800II (Ver 2.1 or later) - TSP100IIIBI (Ver 1.0 or later) - TSP100IIIW (Ver 1.4 or later) - TSP100IIILAN (Ver 1.3 or later) - TSP100IIIU (Ver 1.0 or later) - TSP100IV (Ver 1.0 or later) - FVP10 (Ver 1.3 or later) - BSC10 *2 (Ver 1.0 or later) - mPOP (Ver 1.0.1 or later) - mC-Print2 (Ver 1.0 or later) - mC-Print3 (Ver 1.0 or later) - - *1-JP model only - *2-US EU model only - - [Interface] - Bluetooth: TSP series (IFBD-HB03/HB04 Ver 1.0.0 or later) - : Portable printers - : mPOP, mC-Print2, mC-Print3 - Ethernet : TSP series, FVP10, BSC10 (IFBD-HE05/HE06 Ver 1.0.1 or later) - mC-Print2, mC-Print3 - USB : TSP series, FVP10, BSC10 (IFBD-HU07/HU08) - mPOP, mC-Print2, mC-Print3 + Please refer to Users Manual. ============== 4. Copyright ============== - Copyright 2016 - 2021 Star Micronics Co., Ltd. All rights reserved. + + Copyright 2016 - 2023 Star Micronics Co., Ltd. All rights reserved. ==================== 5. Release History ==================== + Ver 2.4.0 + 2023/04/10 : Added `gap` query. + Added `1` and `2w5` to `size` query. + Updated target OS and target software. + Ver 2.3.0 - 2021/10/29 : Added TSP100IV support. - Added Buzzer (BU01) and Melody Speaker (mC-Sound) support. + 2021/10/29 : Added Buzzer (BU01) and Melody Speaker (mC-Sound) support. Ver 2.2 - 2020/01/23 : Added Web Download Print function ('Url' query). + 2020/01/23 : Added Web Download Print function (`Url` query). Ver 2.1 - 2018/07/02 : Add printer models (mC-Print2/mC-Print3) - Add queries (drawerpulse/cut) - Change specification of Black mark. + 2018/07/02 : Added queries (drawerpulse/cut). + Changed specification of Black mark. Ver 2.0 - 2017/09/29 : Add printer models (SM-L300/TSP100III U) - Add printer settings (Drawer pulse/Cut type) - Change specification of Black mark and PDF function + 2017/09/29 : Added printer settings (Drawer pulse/Cut type). + Changed specification of Black mark and PDF function. diff --git a/Readme_Jp.txt b/Readme_Jp.txt index ec08f37..04ef9ca 100644 --- a/Readme_Jp.txt +++ b/Readme_Jp.txt @@ -1,5 +1,5 @@ ************************************************************ - Star PassPRNT Android SDK Ver 2.3.0 + Star PassPRNT Android SDK Ver 2.4.0 Readme_Jp.txt スター精密(株) ************************************************************ @@ -12,6 +12,7 @@ ========== 1. 概要 ========== + 本パッケージは、AndroidのStarPassPRNT専用SDKです。 “PassPRNT”とは、外部アプリケーション(以降、”連携アプリ”とする)と スターデバイス(以降、”デバイス”とする)の間に配置するアプリケーションです。 @@ -34,7 +35,8 @@ ========== 2. 内容 ========== - PassPRNT_Android_SDK_Ver2.3.0 + + PassPRNT_Android_SDK_Ver2.4.0 | | Readme_En.txt // リリースノート(英語) | Readme_Jp.txt // リリースノート(日本語) @@ -47,75 +49,42 @@ ============= 3. 適用 ============= + ■ 対象OS - Android OS 5.0 - 12 + Android OS 7.0 - 13 ■ 対象ソフトウェア - PassPRNT Ver 2.5.0 + PassPRNT Ver 2.7.0 ■ 対象プリンタモデル - ◇ プリンタモデル (F/W ver) - SM-L200 (Ver 1.1以降 - StarPRNT mode) - SM-S210i *1 (Ver 3.0以降 - StarPRNT mode) - (Ver 2.5以降 - ESC/POS mode) - SM-S220i *2 (Ver 3.0以降 - StarPRNT mode) - (Ver 2.1以降 - ESC/POS mode) - SM-S230i *2 (Ver 1.0以降 - StarPRNT mode) - (Ver 1.0以降 - ESC/POS mode) - SM-L300 (Ver 1.0以降 - StarPRNT mode) - SM-T300i/T300DB (Ver 3.0以降 - StarPRNT mode) - (Ver 2.5以降 - ESC/POS mode) - SM-T400i (Ver 3.0以降 - StarPRNT mode) - (Ver 2.5以降 - ESC/POS mode) - TSP650II (Ver 2.1以降) - TSP700II (Ver 5.1以降) - TSP800II (Ver 2.1以降) - TSP100IIIBI (Ver 1.0以降) - TSP100IIIW (Ver 1.4以降) - TSP100IIILAN (Ver 1.3以降) - TSP100IIIU (Ver 1.0以降) - TSP100IV (Ver 1.0以降) - FVP10 (Ver 2.0以降) - BSC10 *2 (Ver 1.0以降) - mPOP (Ver 1.0.1以降) - mC-Print2 (Ver 1.0以降) - mC-Print3 (Ver 1.0以降) - - *1-日本向けモデルのみ - *2-欧米向けモデルのみ - - ◇ 対応インターフェース - Bluetooth: TSPシリーズ (IFBD-HB03/HB04 Ver 1.0.0以上) - : ポータブルプリンタシリーズ - : mPOP, mC-Print2, mC-Print3 - Ethernet : TSPシリーズ, FVP10, BSC10 (IFBD-HE05/HE06 Ver 1.0.1以上) - : mC-Print2, mC-Print3 - USB : TSPシリーズ, FVP10, BSC10 (IFBD-HU07/HU08) - : mPOP, mC-Print2, mC-Print3 + Users Manualをご参照ください。 =========== 4. 著作権 =========== - スター精密(株)Copyright 2016 - 2021 + + スター精密(株)Copyright 2016 - 2023 ====================================== 5. Star PassPRNT Android SDK 更新履歴 ====================================== - Ver 2.3.0 - 2021/10/29 : TSP100IVに対応 - ブザー(BU01), メロディースピーカー(mC-Sound)のサポートを追加 + Ver 2.4.0 + 2023/04/10 : `gap`クエリを追加 + `size`クエリに`1`と`2w5`を追加 + 対象OS、対象ソフトウェアを更新 + + Ver 2.3.0 + 2021/10/29 : ブザー(BU01), メロディースピーカー(mC-Sound)のサポートを追加 Ver 2.2 - 2020/01/23 : Webダウンロード印刷に対応 ('url'クエリ) + 2020/01/23 : Webダウンロード印刷に対応 (`url`クエリ) Ver 2.1 - 2018/07/02 : 対応機種追加 - 印刷設定項目(クエリ)追加 + 2018/07/02 : 印刷設定項目(クエリ)追加 Blackmark仕様変更 Ver 2.0 - 2017/09/29 : 対応機種追加 - 印刷設定項目追加 + 2017/09/29 : 印刷設定項目追加 Blackmark仕様変更 PDF印刷仕様変更 diff --git a/Samples/app/build.gradle b/Samples/app/build.gradle index ac2b0e9..d2b9f08 100644 --- a/Samples/app/build.gradle +++ b/Samples/app/build.gradle @@ -9,7 +9,7 @@ android { minSdkVersion 21 targetSdkVersion 29 versionCode 6 - versionName "2.3.0" + versionName "2.4.0" } buildTypes { release { diff --git a/Samples/app/src/main/java/jp/star_m/passprnttester/MainActivity.java b/Samples/app/src/main/java/jp/star_m/passprnttester/MainActivity.java index 3095761..5b928df 100644 --- a/Samples/app/src/main/java/jp/star_m/passprnttester/MainActivity.java +++ b/Samples/app/src/main/java/jp/star_m/passprnttester/MainActivity.java @@ -49,6 +49,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe String m_soundVolume = null; String m_callBack = null; String m_blackmark = null; + String m_gap = null; String m_cuttype = null; String m_popup = null; @@ -91,6 +92,7 @@ protected void onCreate(Bundle savedInstanceState) { m_soundVolume = (m_soundVolume == null) ? "none" : m_soundVolume; m_callBack = (m_callBack == null) ? "startest://" : m_callBack; m_blackmark = (m_blackmark == null) ? "none" : m_blackmark; + m_gap = (m_gap == null) ? "none" : m_gap; m_cuttype = (m_cuttype == null) ? "none" : m_cuttype; m_popup = (m_popup == null) ? "none" : m_popup; try { @@ -236,7 +238,7 @@ public void onClick(DialogInterface dialog, int which) { break; case 3: //Width // Configured for printing area - final String[] widthIndexList = {"none", "2", "2w1", "2w2", "2w3", "2w4", "3", "3w", "3w2", "4"}; + final String[] widthIndexList = {"none", "1", "2", "2w1", "2w2", "2w3", "2w4", "2w5", "3", "3w", "3w2", "4"}; for (int i = 0; i < widthIndexList.length; i++) { if (widthIndexList[i].equalsIgnoreCase(m_width)) { @@ -637,7 +639,35 @@ public void onClick(DialogInterface dialog, int which) { .setNegativeButton("Cancel", null) .show(); break; - case 17: //CutType + case 17: // Gap + final String[] gapIndexList = {"none", "disable", "enable", "enableAndDetectAtPowerOn"}; + + for (int i = 0; i < gapIndexList.length; i++) { + if (gapIndexList[i].equalsIgnoreCase(m_gap)) { + selectedIndex = i; + break; + } + } + + new AlertDialog.Builder(view.getContext()) + .setTitle("Gap") + .setSingleChoiceItems(gapIndexList, selectedIndex, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + selectedIndex = which; + } + }) + .setPositiveButton("OK", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + m_gap = gapIndexList[selectedIndex]; + refreshListInfo(); + } + }) + .setNegativeButton("Cancel", null) + .show(); + break; + case 18: //CutType final String[] cutTypeIndexList = {"none", "partial", "full", "tearbar", "nocut"}; for (int i =0 ;i < cutTypeIndexList.length; i++) { @@ -665,7 +695,7 @@ public void onClick(DialogInterface dialogInterface, int which) { .setNegativeButton("Cancel", null) .show(); break; - case 18: //Popup + case 19: //Popup final String[] popupIndexList = {"none", "disable", "enable"}; for (int i = 0; i < popupIndexList.length; i++) { @@ -693,7 +723,7 @@ public void onClick(DialogInterface dialog, int which) { .setNegativeButton("Cancel", null) .show(); break; - case 19: //HTML Receipt Design + case 20: //HTML Receipt Design for (int i = 0; i < fileList.length; i++) { if (fileList[i].equalsIgnoreCase(m_htmlReceiptData)) { selectedIndex = i; @@ -719,7 +749,7 @@ public void onClick(DialogInterface dialog, int which) { .setNegativeButton("Cancel", null) .show(); break; - case 20: //PDF Receipt Design + case 21: //PDF Receipt Design for (int i = 0; i < pdfFileList.length; i++) { if (pdfFileList[i].equalsIgnoreCase(m_pdfReceiptData)) { selectedIndex = i; @@ -745,7 +775,7 @@ public void onClick(DialogInterface dialog, int which) { .setNegativeButton("Cancel", null) .show(); break; - case 21: //URL Design + case 22: //URL Design final String[] urlIndexList = {"none", "https://www.star-m.jp/products/s_print/sdk/passprnt/sample/resource/receipt_sample.html", "https://www.star-m.jp/products/s_print/sdk/passprnt/sample/resource/receipt_sample.pdf"}; @@ -875,6 +905,13 @@ public void onClick(View v) { builder.appendQueryParameter("blackmark", m_blackmark); } } + if (!m_gap.equalsIgnoreCase("none")) { + if (m_gap.equalsIgnoreCase("blank")) { + builder.appendQueryParameter("gap", ""); + } else { + builder.appendQueryParameter("gap", m_gap); + } + } if (!m_cuttype.equalsIgnoreCase("none")) { if (m_cuttype.equalsIgnoreCase("blank")) { builder.appendQueryParameter("cut", ""); @@ -1036,36 +1073,42 @@ private void refreshListInfo() { map7.put("sub", m_blackmark); listViewItems.add(map7); - //cuttype + // gap Map map8 = new HashMap<>(); - map8.put("main", "Cut Type(cut=)"); - map8.put("sub", m_cuttype); + map8.put("main", "Gap(gap=)"); + map8.put("sub", m_gap); listViewItems.add(map8); - //popup + //cuttype Map map9 = new HashMap<>(); - map9.put("main", "Popup(popup=)"); - map9.put("sub", m_popup); + map9.put("main", "Cut Type(cut=)"); + map9.put("sub", m_cuttype); listViewItems.add(map9); - //html Receipt data + //popup Map map10 = new HashMap<>(); - map10.put("main", "Receipt(html=)"); - map10.put("sub", m_htmlReceiptData); + map10.put("main", "Popup(popup=)"); + map10.put("sub", m_popup); listViewItems.add(map10); - //pdf Receipt data + //html Receipt data Map map11 = new HashMap<>(); - map11.put("main", "Receipt(pdf=)"); - map11.put("sub", m_pdfReceiptData); + map11.put("main", "Receipt(html=)"); + map11.put("sub", m_htmlReceiptData); listViewItems.add(map11); - //url + //pdf Receipt data Map map12 = new HashMap<>(); - map12.put("main", "Receipt(url=)"); - map12.put("sub", m_url); + map12.put("main", "Receipt(pdf=)"); + map12.put("sub", m_pdfReceiptData); listViewItems.add(map12); + //url + Map map13 = new HashMap<>(); + map13.put("main", "Receipt(url=)"); + map13.put("sub", m_url); + listViewItems.add(map13); + adapter.notifyDataSetChanged(); }