{ "id": "165003", "key": "TIMOB-24224", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2016-12-16T11:46:50.000+0000", "created": "2016-12-13T16:56:00.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "hyperloop", "titanium" ], "versions": [], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-31T22:48:40.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "13715", "name": "Hyperloop", "description": "Hyperloop project" } ], "description": "Trying to print to a bluetooth printer with the Zebra SDK from Android via Hyperloop, but the mappings seem incomplete.\r\n\r\nI am able to connect to the printer but when I try to get and instance of ZebraPrinter and then print an image with that instance I am told the method does not exist even though it should be(its inherited, but is clearly documented by Zebra). This also seems to be true of other inherited methods as well, I have tried a few others to see what works and what doesn't.\r\n\r\nthe documentation:\r\nhttp://link-os.github.io/PC/v2.9.2275/documentation/com/zebra/sdk/printer/ZebraPrinter.html\r\n\r\n\r\n{code:java}\r\nvar ZComm = require('com.zebra.sdk.comm.*'),\r\nZPrinter = require('com.zebra.sdk.printer.*'),\r\nZDevice = require('com.zebra.sdk.device.*');\r\n\r\nvar theBtMacAddress = \"XX:XX:XX:XX:XX:XX\";\r\n\r\nfunction print(e) {\r\n var thePrinterConn = new ZComm.BluetoothConnection(theBtMacAddress);\r\n thePrinterConn.open();\r\n var printer = ZPrinter.ZebraPrinterFactory.getInstance(thePrinterConn);\r\n printer.printImage('/testPage.png', 0, 0);\r\n thePrinterConn.close();\r\n}\r\n\r\n\r\n$.index.open();\r\n{code}\r\n", "attachment": [ { "id": "61101", "filename": "hyperloop-android-1.2.9.zip", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-16T18:32:27.000+0000", "size": 5255856, "mimeType": "application/zip" }, { "id": "61079", "filename": "ZSDK_ANDROID_API.jar", "author": { "name": "cliff_stander", "key": "cliff_stander", "displayName": "Mike Stancliffe", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-13T16:54:57.000+0000", "size": 481200, "mimeType": "application/java-archive" } ], "flagged": false, "summary": "Hyperlooop: Android - 3rd Party Android Library not correctly mapped", "creator": { "name": "cliff_stander", "key": "cliff_stander", "displayName": "Mike Stancliffe", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "cliff_stander", "key": "cliff_stander", "displayName": "Mike Stancliffe", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "MacOS 10.12.1 (16B2555)\r\nAppcelerator Studio 4.8.0.201611121409", "comment": { "comments": [ { "id": "403494", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-16T11:44:14.000+0000", "updated": "2016-12-16T11:47:14.000+0000" }, { "id": "403510", "author": { "name": "cliff_stander", "key": "cliff_stander", "displayName": "Mike Stancliffe", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Any chance of a port to 1.x hyperloop? Our app is not 6.0 ready yet.", "updateAuthor": { "name": "cliff_stander", "key": "cliff_stander", "displayName": "Mike Stancliffe", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-16T15:40:21.000+0000", "updated": "2016-12-16T15:40:21.000+0000" }, { "id": "403525", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-16T18:35:19.000+0000", "updated": "2016-12-16T18:35:19.000+0000" }, { "id": "403914", "author": { "name": "cliff_stander", "key": "cliff_stander", "displayName": "Mike Stancliffe", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@gmathews Thank you for the backport, but I am seeing the same thing with it as well. I tried the same code as above with the same result when using the 1.2.9 provided\r\n\r\n\r\n{noformat}\r\nERROR] : TiExceptionHandler: (main) [76155,111463] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] : TiExceptionHandler: (main) [0,111463] - In print.js:21,13\r\n[ERROR] : TiExceptionHandler: (main) [0,111463] - Message: Uncaught TypeError: Object [object com.zebra.sdk.printer.ZebraPrinter] has no method 'printImage'\r\n[ERROR] : TiExceptionHandler: (main) [0,111463] - Source: printer.printImage(\"/testPage.png\", 0, 0);\r\n[ERROR] : V8Exception: Exception occurred at print.js:21: Uncaught TypeError: Object [object com.zebra.sdk.printer.ZebraPrinter] has no method 'printImage'\r\n{noformat}\r\n", "updateAuthor": { "name": "cliff_stander", "key": "cliff_stander", "displayName": "Mike Stancliffe", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-29T14:43:12.000+0000", "updated": "2016-12-29T14:54:13.000+0000" }, { "id": "403917", "author": { "name": "cliff_stander", "key": "cliff_stander", "displayName": "Mike Stancliffe", "active": true, "timeZone": "America/Los_Angeles" }, "body": "as I keep looking for ways to get this project done, this seems to continue to happen, here is another example with java.util.Set\r\n\r\n\r\n{code:javascript}\r\nvar BluetoothAdapter = require('android.bluetooth.BluetoothAdapter');\r\nvar JSet = require('java.util.Set');\r\n\r\nvar adapter = BluetoothAdapter.getDefaultAdapter();\r\nvar pairedDevices = new JSet(adaptor.getBondedDevices());\r\nTi.API.warn(pairedDevices.toArray());\r\n{code}\r\n\r\nand here is the documentation\r\nhttps://developer.android.com/reference/java/util/Set.html#toArray()", "updateAuthor": { "name": "cliff_stander", "key": "cliff_stander", "displayName": "Mike Stancliffe", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-29T19:31:58.000+0000", "updated": "2016-12-29T19:32:33.000+0000" }, { "id": "416620", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate, the relevant ticket is linked above.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-31T22:48:40.000+0000", "updated": "2017-03-31T22:48:40.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }