{ "id": "167570", "key": "TIMOB-24684", "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": "20070", "description": "", "name": "Hyperloop 3.0.2", "archived": false, "released": true, "releaseDate": "2018-02-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-02-02T18:40:47.000+0000", "created": "2017-05-11T07:02:04.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "Android", "Hyperloop" ], "versions": [ { "id": "19101", "name": "Hyperloop 2.1.0", "archived": false, "released": true, "releaseDate": "2017-04-28" }, { "id": "19381", "name": "Hyperloop 2.1.1", "archived": false, "released": true, "releaseDate": "2017-06-02" } ], "issuelinks": [ { "id": "56270", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "170276", "key": "TIMOB-25500", "fields": { "summary": "Hyperloop: Android - Interfaces don't expose access to methods", "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": "None", "id": "6" }, "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-02-05T17:16:41.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": "When I get some List I can't iterate. In this case getInstalledApplications returns a List.\r\n\r\n{code:javascript}\r\n$.addListener($.index, 'open', onOpen);\r\n\r\nfunction onOpen(e) {\r\n var Activity = require('android.app.Activity'),\r\n activity = new Activity(Ti.Android.currentActivity);\r\n\r\n var PackageManager = require('android.content.pm.PackageManager');\r\n\r\n\r\n var pm = activity.getPackageManager();\r\n var installedApplications = pm.getInstalledApplications(PackageManager.GET_META_DATA);\r\n\r\n console.log('installedApplication: ' + installedApplications);\r\n console.log('installedApllications className: ' + installedApplications['className']);\r\n console.log('List size : ' + installedApplications.size()); //Throws exception \r\n}\r\n\r\n//Output:\r\n[INFO] installedApplication: [ApplicationInfo{769a688 com.example.android.livecubes}, ApplicationInfo{de98821 com.android.providers.telephony}, ApplicationInfo{e6f3446 com.google.android.googlequicksearchbox}...\r\n[INFO] installedApllications className: java.util.List\r\n[ERROR] TiExceptionHandler: (main) [407,407] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] TiExceptionHandler: (main) [0,407] - In /alloy/controllers/index.js:19,60\r\n[ERROR] TiExceptionHandler: (main) [1,408] - Message: Uncaught TypeError: installedApplications.size is not a function\r\n[ERROR] TiExceptionHandler: (main) [0,408] - Source: console.log(\"List size : \" + installedApplications.size());\r\n[ERROR] V8Exception: Exception occurred at /alloy/controllers/index.js:19: Uncaught TypeError: installedApplications.size is not a function\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Hyperloop: Android - Cannot iterate over List interface", "creator": { "name": "jormagar", "key": "jormagar", "displayName": "Jorge Macias Garcia", "active": true, "timeZone": "Europe/Brussels" }, "subtasks": [], "reporter": { "name": "jormagar", "key": "jormagar", "displayName": "Jorge Macias Garcia", "active": true, "timeZone": "Europe/Brussels" }, "environment": null, "comment": { "comments": [ { "id": "433599", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/hyperloop.next/pull/269", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-24T18:40:11.000+0000", "updated": "2018-01-24T18:40:11.000+0000" }, { "id": "434054", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with hyperloop 3.0.2.\r\n\r\nNo issues in iterating over list interfaces.\r\nClosing.\r\n\r\nStudio Ver: 5.0.0.201712081732\r\nSDK Ver: 7.0.2.v20180201155017\r\nOS Ver: 10.13.2\r\nXcode Ver: Xcode 9.2\r\nAppc NPM: 4.2.11\r\nAppc CLI: 7.0.2-master.7\r\nDaemon Ver: 1.0.1\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.10.12\r\nNode Ver: 8.9.1\r\nNPM Ver: 5.5.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Nexus 5 --- Android 6.0.1\r\n ⇨ google Pixel --- Android 7.1.1\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-05T17:16:31.000+0000", "updated": "2018-02-05T17:16:31.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }