{ "id": "163909", "key": "TIMOB-24022", "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": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" }, { "id": "18247", "name": "Hyperloop 2.0.0", "archived": false, "released": true, "releaseDate": "2016-10-18" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-10-12T21:12:34.000+0000", "created": "2016-10-12T20:00:33.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "18247", "name": "Hyperloop 2.0.0", "archived": false, "released": true, "releaseDate": "2016-10-18" } ], "issuelinks": [ { "id": "53062", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "163548", "key": "TIMOB-23966", "fields": { "summary": "Android: Unable to send a feature event with a number as the data objects key", "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": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2016-10-25T01:19:51.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": "When attempting to instantiate a native class in JS, we end up with a class cast exception about casting a String to Integer.", "attachment": [ { "id": "60504", "filename": "Screen Shot 2016-10-12 at 3.59.13 PM.png", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-10-12T19:59:25.000+0000", "size": 191580, "mimeType": "image/png" } ], "flagged": false, "summary": "Hyperloop: Android: Unable to instantiate hyperloop classes", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 733, "state": "closed", "name": "2016 Sprint 21 SDK", "startDate": "2016-10-08T00:53:00.000Z", "endDate": "2016-10-22T00:53:00.000Z", "completeDate": "2016-10-24T03:58:08.547Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "398773", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "This is a result of a behavior change due to the fix for TIMOB-23966. We now force JS objects to turn into Map going across the bridge. Before it would auto-convert a key like '1' to an actual Integer on the Java side, which broke analytics. Hyperloop relied on this broken conversion when receiving an array of arguments and assumed we'd get Map. We no longer do, so I need to handle Map instead.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-10-12T20:02:56.000+0000", "updated": "2016-10-12T20:02:56.000+0000" }, { "id": "398774", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "To test, try this as your app.js in a hyperloop project:\r\n{code:javascript}\r\nvar Intent = require('android.content.Intent');\r\nvar Activity = require('android.app.Activity');\r\nvar Uri = require(\"android.net.Uri\");\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"#fff\"\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: \"Trigger\"\r\n});\r\n\r\nbtn.addEventListener(\"click\", openIntent);\r\n\r\nwin.add(btn);\r\nwin.open();\r\n\r\nfunction openIntent() {\r\n var activity = new Activity(Ti.Android.currentActivity);\r\n\r\n var intent = Ti.Android.createIntent({\r\n action: Ti.Android.ACTION_VIEW\r\n });\r\n\r\n var nativeIntent = new Intent(intent);\r\n nativeIntent.setData(Uri.parse(\"sms://\"));\r\n nativeIntent.putExtra(\"sms_body\", \"Hello world!\");\r\n\r\n activity.startActivity(nativeIntent);\r\n}\r\n\r\n{code}", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-10-12T20:14:11.000+0000", "updated": "2016-10-12T20:14:11.000+0000" }, { "id": "398777", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "PR (master): https://github.com/appcelerator/hyperloop.next/pull/86\r\nPR (2_0_X): https://github.com/appcelerator/hyperloop.next/pull/85", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-12T20:14:49.000+0000", "updated": "2016-10-12T20:46:51.000+0000" }, { "id": "399749", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\nHyperloop classes can be instantiated successfully.\r\nClosing.\r\n\r\nAppc Studio : 4.8.0.201610171310\r\nSDK Version : 6.0.0.v20161024145110\r\nMac OS Version : 10.11.6\r\nXcode Version : Xcode 8.0 Build version 8A218a\r\nAppc CLI AND Appc NPM : {\"NPM\":\"4.2.8-9\",\"CLI\":\"6.0.0-64\"}\r\nTi CLI : 5.0.10\r\nAlloy : 1.9.3\r\nNode : v4.6.0\r\nHyperloop: 2.0.0 Beta 4", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-25T01:19:37.000+0000", "updated": "2016-10-25T01:19:37.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }