{"id":28000600,"url":"https://github.com/star-micronics/starxpand-sdk-android","last_synced_at":"2026-05-22T08:13:50.251Z","repository":{"id":109611395,"uuid":"452643745","full_name":"star-micronics/StarXpand-SDK-Android","owner":"star-micronics","description":"StarXpand SDK for Android is a software development kit for supporting application development for Star Micronics devices.","archived":false,"fork":false,"pushed_at":"2025-08-26T05:53:46.000Z","size":13258,"stargazers_count":20,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-08-26T07:22:56.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://star-m.jp/starxpandsdk-oml.html","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/star-micronics.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-27T10:48:57.000Z","updated_at":"2025-08-26T05:52:56.000Z","dependencies_parsed_at":"2023-11-14T03:32:02.430Z","dependency_job_id":"26ec61cf-b2b3-4fde-b86e-39ff0e1731e9","html_url":"https://github.com/star-micronics/StarXpand-SDK-Android","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/star-micronics/StarXpand-SDK-Android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/star-micronics%2FStarXpand-SDK-Android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/star-micronics%2FStarXpand-SDK-Android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/star-micronics%2FStarXpand-SDK-Android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/star-micronics%2FStarXpand-SDK-Android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/star-micronics","download_url":"https://codeload.github.com/star-micronics/StarXpand-SDK-Android/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/star-micronics%2FStarXpand-SDK-Android/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001435,"owners_count":26083078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-08T23:53:46.148Z","updated_at":"2026-05-22T08:13:50.242Z","avatar_url":"https://github.com/star-micronics.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"text-align: center;\"\u003e\n  \u003cimg\n    src=\"docs/logo.png\"\n    width=\"600\"\n    style=\"margin-top: 20px; margin-bottom: 20px;\"\n  /\u003e\n\u003c/div\u003e\n\n- [日本語はこちら](docs/README_JP.md)\n\n# StarXpand SDK for Android\n\n`StarXpand SDK for Android` is a software development kit for supporting application development for Star Micronics devices.\n\nThis software development kit provides the StarIO10 library (StarIO10.aar) as a library to control the Star Micronics devices.\n\n## Documentation\n\nPlease refer [here](https://www.star-m.jp/starxpandsdk-oml.html) for StarXpand SDK documentation.\n\nDocumentation includes an overview of the SDK, how to build a sample application, how to use the API, and a API reference.\n\n## About collection and transmission of diagnostic information By StarIO10 library\n\nSome of the APIs provided by the StarIO10 library collect information about the user device and connected printer during execution and send it to the server managed by Star Micronics Co., Ltd. as diagnostic information.\nPlease refer [here](DIAG_INFO.md) for details.\n\n## Requirements\n\n| Language | StarIO10 Kotlin Version | Platform | Version[*](#OsVersion) | Arch | Test Environment[*](#TestEnvironment) |\n| --- | --- | --- | --- | --- | --- |\n| Kotlin | 1.7.21 | Android | Android 11.0 or later | arm64-v8a, armeabi-v7a, x86, x86_64 | Gradle 8.11.1, AGP 8.9.1 |\n\n\u003ca id=\"OsVersion\"\u003e\u003c/a\u003e*The Bluetooth Low Energy interface is only supported on Android 12.0 and later.\u003cbr\u003e\n\u003ca id=\"TestEnvironment\"\u003e\u003c/a\u003e*The sample app included with this SDK is being built, and its operation is being confirmed.\n\n## Installation\n\n### 1. Add the StarIO10 library to your project\n\nIn order to integrate the StarIO10 library into your Android application, Use Maven repository. Add the following dependencies to the `dependencies` block in `app/build.gradle`.\n\nThe `VERSION_NUMBER` part is the version of the library. Please refer to [app/build.gradle](app/build.gradle) for the latest version of the library.\n\n```gradle\ndependencies {\n    implementation 'com.starmicronics:stario10:VERSION_NUMBER'\n    ...\n}\n```\n\nFor more information on how to integrate a library into your application, please refer to the following URL.\n\nhttps://developer.android.com/studio/build/dependencies\n\n### 2. Add settings to your project\n\n#### 2.1. When using a Bluetooth interface\n\nRefer to [sample code](app/src/main/java/com/starmicronics/starxpandsdk/ContentView.kt) and obtain BLUETOOTH_CONNECT and BLUETOOTH permission before starting Bluetooth(Classic) communication. Also, enable Bluetooth in the Android device's Bluetooth settings screen.\n\n#### 2.2. To prevent the connection permission dialog from being displayed every time the USB cable is plugged in or unplugged\n\nWhen communicating with a USB printer, a dialog box will appear asking for connection permission. This permission is reset when the USB cable is plugged in or unplugged (including when the printer is turned on or off).\n\nIf you do not want to display the connection permission dialog every time the USB cable is plugged in or unplugged, configure the following settings. This setting will also allow the application to start automatically when the USB cable is plugged.\n\n##### 2.2.1. Add settings to AndroidManifest.xml\n\nAdd the following `\u003cintent-filter\u003e` and `\u003cmeta-data\u003e` elements to AndroidManifest.xml.\n\n```xml\n\u003cintent-filter\u003e\n    \u003caction android:name=\"android.hardware.usb.action.USB_DEVICE_ATTACHED\" /\u003e\n    \u003caction android:name=\"android.hardware.usb.action.USB_ACCESSORY_ATTACHED\" /\u003e\n\u003c/intent-filter\u003e\n\n\u003cmeta-data android:name=\"android.hardware.usb.action.USB_DEVICE_ATTACHED\" android:resource=\"@xml/device_filter\" /\u003e\n\u003cmeta-data android:name=\"android.hardware.usb.action.USB_ACCESSORY_ATTACHED\" android:resource=\"@xml/accessory_filter\" /\u003e\n```\n\n##### 2.2.2. Add a resource file\n\nStore the following resource files under `res/xml` with the names `device_filter.xml` and `accessory_filter.xml`.\n\n- device_filter.xml\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cresources\u003e\n    \u003cusb-device class=\"255\" subclass=\"66\" protocol=\"1\" /\u003e\n\n    \u003cusb-device vendor-id=\"1305\" product-id=\"0003\" /\u003e   \u003c!--TSP100IIU+/IIIU/IV/IV SK--\u003e\n    \u003cusb-device vendor-id=\"1305\" product-id=\"0071\" /\u003e   \u003c!--mC-Print3--\u003e\n    \u003cusb-device vendor-id=\"1305\" product-id=\"0073\" /\u003e   \u003c!--mC-Print2--\u003e\n    \u003cusb-device vendor-id=\"1305\" product-id=\"0025\" /\u003e   \u003c!--mC-Label3--\u003e\n    \u003cusb-device vendor-id=\"1305\" product-id=\"0029\" /\u003e   \u003c!--mC-Label2--\u003e\n    \u003cusb-device vendor-id=\"1305\" product-id=\"0023\" /\u003e   \u003c!--mPOP--\u003e\n    \u003cusb-device vendor-id=\"1305\" product-id=\"4104\" /\u003e   \u003c!--mC-Connect Drawer--\u003e\n    \u003cusb-device vendor-id=\"1305\" product-id=\"0001\" /\u003e   \u003c!--TSP650II/TSP650II SK/TSP700II/TSP800II/SP700--\u003e\n    \u003cusb-device vendor-id=\"1305\" product-id=\"0027\" /\u003e   \u003c!--BSC10II--\u003e\n    \u003cusb-device vendor-id=\"1305\" product-id=\"0075\" /\u003e   \u003c!--SK1-211/221/V211--\u003e\n    \u003cusb-device vendor-id=\"1305\" product-id=\"0077\" /\u003e   \u003c!--SK1-311/321/V311--\u003e\n    \u003cusb-device vendor-id=\"1305\" product-id=\"0079\" /\u003e   \u003c!--SK5-31--\u003e\n    \u003cusb-device vendor-id=\"1305\" product-id=\"0081\" /\u003e   \u003c!--SK1-41--\u003e\n    \u003cusb-device vendor-id=\"1305\" product-id=\"4113\" /\u003e   \u003c!--CD5 : 4113, 4114, ..., 4120--\u003e\n\n\u003c/resources\u003e\n```\n\n- accessory_filter.xml\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cresources\u003e\n    \u003cusb-accessory model=\"Star TSP143IV-UE\" manufacturer=\"STAR\"/\u003e\n    \u003cusb-accessory model=\"Star TSP143IV-UE SK\" manufacturer=\"STAR\"/\u003e\n    \u003cusb-accessory model=\"Star TSP143IV-UEWB\" manufacturer=\"STAR\"/\u003e\n    \u003cusb-accessory model=\"Star TSP143IV-UEWB SK\" manufacturer=\"STAR\"/\u003e\n    \u003cusb-accessory model=\"mC-Print3\" manufacturer=\"Star Micronics\"/\u003e\n    \u003cusb-accessory model=\"mC-Label3\" manufacturer=\"Star Micronics\"/\u003e\n    \u003cusb-accessory model=\"mC-Label2\" manufacturer=\"Star Micronics\"/\u003e\n    \u003cusb-accessory model=\"mPOP\" manufacturer=\"Star Micronics\"/\u003e\n    \u003cusb-accessory model=\"BSC10II\" manufacturer=\"Star Micronics\"/\u003e\n\u003c/resources\u003e\n```\n\n#### 2.3. When using the Bluetooth Low Energy interface\n\nThe Bluetooth Low Energy interface is only supported on Android 12.0 and later.\n\n##### 2.3.1. Add settings to AndroidManifest.xml\n\nAdd the following `\u003cuses-permission\u003e` elements to AndroidManifest.xml.  \n\n- If you need to obtain location information, the neverForLocation specification is not required.\n\n```xml\n    \u003cuses-permission android:name=\"android.permission.BLUETOOTH_SCAN\"\n        android:usesPermissionFlags=\"neverForLocation\" /\u003e\n```\n\n##### 2.3.2. Bluetooth enablement\n\nRefer to the [sample code](app/src/main/java/com/starmicronics/starxpandsdk/ContentView.kt) and obtain the necessary permissions before starting Bluetooth Low Energy communication. Also, enable Bluetooth in the Android device's Bluetooth settings screen.\n\n##### 2.3.3. Perform pairing\n\nWhen using Bluetooth Low Energy communication, pairing is required.  \nFor pairing instructions, please refer to [here](https://star-m.jp/products/s_print/sdk/starxpand/manual/en/pairing.html).\n\nPlease note that if the Android device is in silent mode, pairing may not be performed correctly. Please disable silent mode when performing pairing.\n\n## Examples\n\nStarXpand SDK includes an example application that can be used in combination with the printer to check its operation. Please use it in conjunction with the explanations of each function in the linked pages.\n\n#### 1. [Discover printers](https://star-m.jp/products/s_print/sdk/starxpand/manual/en/searchPrinter.html)\n\n#### 2. [Create printing data](https://star-m.jp/products/s_print/sdk/starxpand/manual/en/basic-step1.html)\n\nThe sample code and printed result images are also [available here](app/src/main/java/com/starmicronics/starxpandsdk/printingsamples/README.md).\n\n- Sample to create print layouts for receipts and labels for each type of business\n- Sample to generate receipt images from text data\n\n\u003e :warning: Some printer models may not be able to print some samples. Please adjust the layout accordingly when using this samples.\n\n#### 3. [Create printing data using template printing function](https://star-m.jp/products/s_print/sdk/starxpand/manual/en/template-step1.html)\n\n#### 4. [Send printing data](https://star-m.jp/products/s_print/sdk/starxpand/manual/en/basic-step2.html)\n\n#### 5. [Send printing data using spooler function](https://star-m.jp/products/s_print/sdk/starxpand/manual/en/spooler.html)\n\n#### 6. [Get printer status](#GetPrinterStatus)\n\n#### 7. [Monitor printer](#MonitorPrinter)\n\n#### 8. [Update printer firmware](https://star-m.jp/products/s_print/sdk/starxpand/manual/en/fw-update.html)\n\n\u003ca id=\"GetPrinterStatus\"\u003e\u003c/a\u003e\n\n### Get printer status\n\n```kotlin\nfun getStatus() {\n    // Specify your printer connection settings.\n    val settings = StarConnectionSettings(interfaceType.Lan, \"00:11:62:00:00:00\")\n    val printer = StarPrinter(settings, applicationContext)\n\n    val job = SupervisorJob()\n    val scope = CoroutineScope(Dispatchers.Default + job)\n\n    scope.launch {\n        try {\n            // Connect to the printer.\n            printer.openAsync().await()\n\n            // Get printer status.\n            val status = printer.getStatusAsync().await()\n            Log.d(\"Status\", \"${status}\")\n        } catch (e: Exception) {\n            // Exception.\n            Log.d(\"Status\", \"${e.message}\")\n        } finally {\n            // Disconnect from the printer.\n            printer.closeAsync().await()\n        }\n    }\n}\n```\n\n\u003ca id=\"MonitorPrinter\"\u003e\u003c/a\u003e\n\n### Monitor printer\n\n```kotlin\nfun monitor() {\n    val job = SupervisorJob()\n    val scope = CoroutineScope(Dispatchers.Default + job)\n\n    scope.launch {\n        // Specify your printer connection settings.\n        val settings = StarConnectionSettings(interfaceType.Lan, \"00:11:62:00:00:00\")\n        printer = StarPrinter(settings, applicationContext)\n\n        // Callback for printer state changed.\n        printer?.printerDelegate = object : PrinterDelegate() {\n            override fun onReady() {\n                super.onReady()\n                Log.d(\"Monitor\", \"Printer: Ready\")\n            }\n\n            // ...\n            // Please refer to document for other callback.\n        }\n\n        printer?.drawerDelegate = object : DrawerDelegate() {\n            override fun onOpenCloseSignalSwitched(openCloseSignal: Boolean) {\n                super.onOpenCloseSignalSwitched(openCloseSignal)\n                Log.d(\"Monitor\", \"Drawer: Open Close Signal Switched: ${openCloseSignal}\")\n            }\n\n            // ...\n            // Please refer to document for other callback.\n        }\n\n        printer?.inputDeviceDelegate = object : InputDeviceDelegate() {\n            override fun onDataReceived(data: List\u003cByte\u003e) {\n                super.onDataReceived(data)\n                Log.d(\"Monitor\", \"Input Device: DataReceived ${data}\")\n            }\n\n            // ...\n            // Please refer to document for other callback.\n        }\n\n        printer?.displayDelegate = object : DisplayDelegate() {\n            override fun onConnected() {\n                super.onConnected()\n                Log.d(\"Monitor\", \"Display: Connected\")\n            }\n\n            // ...\n            // Please refer to document for other callback.\n        }\n\n        try {\n            // Connect to the printer.\n            printer?.openAsync()?.await()\n        } catch (e: Exception) {\n            // Exception.\n            Log.d(\"Monitor\", \"${e.message}\")\n        }\n    }\n}\n```\n\n## Copyright\n\nCopyright 2022 Star Micronics Co., Ltd. All rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstar-micronics%2Fstarxpand-sdk-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstar-micronics%2Fstarxpand-sdk-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstar-micronics%2Fstarxpand-sdk-android/lists"}