{ "id": "159579", "key": "TIMOB-23213", "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": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-04-27T16:18:35.000+0000", "created": "2016-04-14T14:53:48.000+0000", "epic": { "id": 151897, "key": "TIMOB-19699", "name": "Android: Hyperloop for Android module", "summary": "Bring Hyperloop to Android", "color": { "key": "color_4" }, "done": false }, "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "hyperloop" ], "versions": [], "issuelinks": [ { "id": "51348", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "159501", "key": "TIMOB-23198", "fields": { "summary": "Hyperloop: Android can't access fields with primitive array types", "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 } } } }, { "id": "51349", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "159431", "key": "TIMOB-23179", "fields": { "summary": "Hyperloop: Android - Java primitives arrays are wrapped in hyperloop proxies improperly", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "51474", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "159780", "key": "TIMOB-23267", "fields": { "summary": "Hyperloop: Android - Unable to call method accepting byte[] argument", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2016-08-03T00:05:46.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": "We have no conversion of char/char[]/Character in our Kroll/V8 bridge - and we don't handle this special in our hyperloop code - so I assume right now it'll try to wrap in a hyperloop proxy and fail miserably.\r\n\r\nFrom discussion on https://github.com/appcelerator/hyperloop.next/pull/16\r\n\r\n\r\nIdeally I think we should:\r\n- accept a JS String for any argument/field that accepts Character/char/char[]\r\n- if the string is for a single char/Character and has more than one character, we should take the first char of the string and spit out a nasty warning in the log.\r\n- When a method/field returns a char/char[]/Character, convert it into a Java String and the bridge will convert that to a JS string for us.", "attachment": [], "flagged": false, "summary": "Hyperloop: Android doesn't convert char/char[]/Character", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 624, "state": "closed", "name": "2016 Sprint 09 SDK", "startDate": "2016-04-23T00:39:45.452Z", "endDate": "2016-05-07T00:39:00.000Z", "completeDate": "2016-05-09T03:43:10.279Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "392250", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed. Verified Hyperloop with Android is able to convert char/char[]/Character. Use the following Alloy code:\r\n{code}\r\nvar\r\n String = require('java.lang.String'),\r\n Character = require('java.lang.Character');\r\n\r\nvar\r\n single = new String('d'),\r\n longString = new String('monkey lord'),\r\n arrayOfChars = new String(['b', 'o', 'b']);\r\n\r\nfunction doClick(e) {\r\n Ti.API.info('### ' + single.charAt(0));\r\n Ti.API.info('### ' + longString.toCharArray());\r\n Ti.API.info('### ' + arrayOfChars.toUpperCase());\r\n Ti.API.info('### ' + Character.valueOf('B'));\r\n Ti.API.info('### ' + Character.toUpperCase('z'));\r\n Ti.API.info('### ' + Character.toLowerCase('BOB')); // spits out error\r\n}\r\n\r\n$.index.open();\r\n{code}\r\n\r\nTested on:\r\n\r\nAppc CLI NPM: 4.2.7\r\nAppc CLI Core: 5.4.0-37\r\nArrow: 1.8.2\r\nSDK: 5.4.0.v20160801022303\r\nNode: v4.4.7\r\nOS: Mac OS X (10.11.6)\r\nDevice: Genymotion Emulator (5.1.0)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-03T00:05:34.000+0000", "updated": "2016-08-03T00:05:34.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }