{ "id": "116282", "key": "TIMOB-14324", "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": "15547", "description": "2013 Sprint 14", "name": "2013 Sprint 14", "archived": true, "released": true, "releaseDate": "2013-07-15" }, { "id": "15548", "description": "2013 Sprint 14 API", "name": "2013 Sprint 14 API", "archived": true, "released": true, "releaseDate": "2013-07-15" }, { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-07-08T21:44:48.000+0000", "created": "2013-06-20T21:26:43.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-closed-3.1.3", "supportTeam" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "31320", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "118804", "key": "TIMOB-14919", "fields": { "summary": "Android: App crashes when calling Ti.UI.Android.openPreferences() when using Urban Airship ", "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": "30031", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "115780", "key": "TIMOB-14179", "fields": { "summary": "openPreferences rise error when a service is running", "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": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-08-29T22:33:20.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" } ], "description": "h6.Issue\r\nLooks like an Android Service (TIMOB-14179) may prevent the preferences window be opened. \r\n\r\nThis is another use case where the developer noticed that after installing his app from Google Play, he couldn't open the preferences window for the first time the app ran.\r\n\r\nYet another way one can re-produce it on an emulator. After a fresh install, the first time the app runs, if you try to open the preferences window, you got:\r\n\r\n- Runtime Error:\r\n{code}\r\nMessage:\r\n\r\nUncaught Error: Java Exception occurred\r\n\r\nSource:\r\n\r\nTi.UI.Android.openPreferences();\r\n{code}\r\n\r\nh6.Tested on\r\nHTC One (Android 4.1.2)\r\n\r\nh6.preferences.xml\r\n{code}\r\n\r\n\r\n \r\n\r\n{code}\r\n\r\nh6.Docs\r\nhttp://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Android-method-openPreferences\r\n\r\nh6.A sample\r\n- app.js\r\n{code}\r\nvar prefs = require('preferences');\r\nvar args = {\r\n\ttitle: 'Preferences'\r\n};\r\nvar win = new prefs(args);\r\nwin.open();\r\n{code}\r\n\r\n- preferences.js\r\n{code}\r\n\t// See:\r\n\t//\tplatform/android/res/xml/preferences.xml\r\n\t//\tplatform/android/res/values/array.xml\r\n\t// Similar files MUST be present at build time or\r\n\t// Titanium.UI.Android.openPreferences() will simply\r\n\t// do nothing.\r\nfunction prefs(_args) {\r\n\tvar win = Ti.UI.createWindow({\r\n\t\ttitle: _args.title\r\n\t});\r\n\tvar btn = Titanium.UI.createButton({\r\n\t\ttitle:\t'Click to Open Preferences'\r\n\t});\r\n\tbtn.addEventListener('click', function() {\r\n\t\tTitanium.UI.Android.openPreferences();\r\n\t});\r\n\twin.add(btn);\r\n\treturn win;\r\n};\r\n\r\nmodule.exports = prefs;\r\n{code}", "attachment": [ { "id": "40087", "filename": "logOpenPreferences.txt", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-06-20T21:26:43.000+0000", "size": 154955, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android: openPreferences( ) not working (after installed from google play) ", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Android 4.x\r\nTiSDK 3.1.0.GA & 3.2 CI build", "comment": { "comments": [ { "id": "260698", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Master PR: https://github.com/appcelerator/titanium_mobile/pull/4436", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-03T00:45:05.000+0000", "updated": "2013-07-03T00:45:05.000+0000" }, { "id": "268481", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4608", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-27T22:48:47.000+0000", "updated": "2013-08-27T22:48:47.000+0000" }, { "id": "268967", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested the above code and did not get a runtime \"Uncaught Error: Java Exception occurred\"\n\nAppcelerator Studio, build: 3.1.3.201308292449\nTitanium SDK, build: 3.1.3.v20130828171413\nCLI: 3.1.2\nalloy 1.2.1\nDevice: GalaxyS4 Android version 4.2.2\n\nClosing as fixed.\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-29T22:32:13.000+0000", "updated": "2013-08-29T22:32:13.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }