{ "id": "170276", "key": "TIMOB-25500", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-09-05T18:04:11.000+0000", "created": "2017-11-10T19:57:04.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [ { "id": "56270", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "167570", "key": "TIMOB-24684", "fields": { "summary": "Hyperloop: Android - Cannot iterate over List interface", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-09-05T18:04:11.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": "13715", "name": "Hyperloop", "description": "Hyperloop project" } ], "description": "Hi,\r\nI tried creating a new android.view.SurfaceView, called getHolder() against the new instance, then tried to call lockCanvas() against the returned SurfaceHolder. Hyperloop said:\r\n{code}\r\n[ERROR] : TiExceptionHandler: (main) [13701,610730] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] : TiExceptionHandler: (main) [0,610730] - In /Graph/canvas.js:92,20\r\n[ERROR] : TiExceptionHandler: (main) [0,610730] - Message: Uncaught TypeError: holder.lockCanvas is not a function\r\n[ERROR] : TiExceptionHandler: (main) [0,610730] - Source: canvas = holder.lockCanvas();\r\n{code}\r\nThe problem is that none of the SurfaceHolder interface methods are defined in the SurfaceHolder definition generated by Hyperloop.\r\n\r\n*Steps to reproduce:*\r\n1. Create an simple single view apps.\r\n2. Add android.view.SurfaceView instance in index.js\r\n3. Call getHolder() in android.view.SurfaceView\r\n4. Now call lockConvas() with Holder\r\n5. There are no methods on that holder to be called!\r\n*Sample code* : \r\n{code}\r\nvar Activity = require('android.app.Activity');\r\nvar SurfaceView = require('android.view.SurfaceView');\r\nvar surfaceView = new SurfaceView(new Activity(Ti.Android.currentActivity));\r\nvar surfaceHolder = surfaceView.getHolder();\r\nsurfaceHolder.lockCanvas();\r\n{code}\r\nSummery : \r\nThat means that when Hyperloop generated its javascript definition, it didn't include the methods?\r\n\r\n*Test Environment* :\r\n1. Titanium SDK 6.3.0.GA\r\n2. Hyperloop Version 2.2.2\r\n3. Node 6.11.3\r\nThanks ", "attachment": [], "flagged": false, "summary": "Hyperloop: Android - Interfaces don't expose access to methods", "creator": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "subtasks": [], "reporter": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "environment": null, "closedSprints": [ { "id": 990, "state": "closed", "name": "2018 Sprint 02 SDK", "startDate": "2018-01-14T22:48:43.544Z", "endDate": "2018-01-28T22:48:00.000Z", "completeDate": "2018-01-29T16:22:42.911Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "439658", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~emerriman], checked it again and this issue was resolved with TIMOB-24684. Calling {{lockCanvas}} on the {{SurfaceHolder}} no longer causes a crash.\r\n\r\nTested with the sample code from this ticket and the following environment:\r\n\r\nSDK: 7.2.0.GA\r\nHyperloop: 3.0.5\r\nOS: Mac OS 10.14\r\nAppc CLI: 7.0.4\r\nNode: 8.11.2\r\nNPM: 6.0.1\r\nJava: 1.8.0_152\r\nDevices: AVD (Nexus 5X API Level 26), BQ Aquaris X (Android 7.1.1)", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-08-01T18:21:48.000+0000", "updated": "2018-08-01T18:22:49.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }