{ "id": "109464", "key": "TIMOB-12651", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15397", "description": "2013 Soprint 07 API", "name": "2013 Sprint 07 API", "archived": true, "released": true, "releaseDate": "2013-04-08" }, { "id": "15105", "description": "2013 Sprint 07", "name": "2013 Sprint 07", "archived": true, "released": true, "releaseDate": "2013-04-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-03-29T21:38:28.000+0000", "created": "2013-02-08T22:32:22.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api" ], "versions": [], "issuelinks": [ { "id": "25651", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "108918", "key": "TIMOB-12504", "fields": { "summary": "iOS: Standardize error reporting in callbacks and events", "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": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "25677", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "109489", "key": "TIMOB-12659", "fields": { "summary": "MobileWeb: Standardize error reporting in callbacks and events", "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": "Low", "id": "4" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "25652", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "98972", "key": "TIMOB-10376", "fields": { "summary": "TiAPI: event system: Event contents", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } }, { "id": "25676", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "109350", "key": "TIMOB-12610", "fields": { "summary": "DOC: Standardize error reporting in callbacks and events", "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": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T00:16:56.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" } ], "attachment": [], "flagged": false, "summary": "Android: Standardize error reporting in callbacks and events", "creator": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "238319", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Progress tracker: https://github.com/BlainHamon/titanium_mobile/compare/timob-12651", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-13T05:19:03.000+0000", "updated": "2013-02-13T05:19:03.000+0000" }, { "id": "240092", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-28T00:56:45.000+0000", "updated": "2013-03-29T00:08:38.000+0000" }, { "id": "240493", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Another test case to verify the new events are working correctly:\n\n1. Run the following code and click 'launch camera'\n{code}\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\nTitanium.UI.setBackgroundColor('#000');\n \n// create base UI tab and root window\n//\nvar win1 = Titanium.UI.createWindow({ \n title:'Tab 1',\n backgroundColor:'#fff'\n});\n\nvar button = Ti.UI.createButton({\n title:'launch camera',\n width:200,\n height:100\n});\nbutton.addEventListener('click', function(){\n\tTitanium.Media.showCamera({\n\t\n\t\tsuccess:function(event)\n\t\t{\n\t\t},\n\t\tcancel:function(e)\n\t\t{\n\t\t\tTi.API.info('---------- keys: ' + Object.keys(e));\n\t\t\tTi.API.info('---------- code: ' + e.code);\n\t\t\tTi.API.info('---------- success: ' + e.success);\n\t\t},\n\t\terror:function(error)\n\t\t{\n\t\t},\n\t\tsaveToPhotoGallery:true,\n\t\tallowEditing:true,\n\t\tmediaTypes:[Ti.Media.MEDIA_TYPE_VIDEO,Ti.Media.MEDIA_TYPE_PHOTO]\n\t});\n});\nwin1.add(button);\n \nwin1.open();\n{code}\n2. After the camera launches, push cancel\n3. Look at logcat for results\n\n\nExpected Result:\n{code}\nI/TiAPI ( 9991): ---------- keys: code,success\nI/TiAPI ( 9991): ---------- code: 0\nI/TiAPI ( 9991): ---------- success: true\n{code}\n\nActual results:\nRuntime error since e is undefined before this change.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-04T01:52:52.000+0000", "updated": "2013-03-04T01:52:52.000+0000" }, { "id": "240494", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Another test case as a sanity check to make sure events aren't broken after this change:\n\n1. Run the following code and click on 'play sound'\n{code}\nvar win1 = Titanium.UI.createWindow({ \n title:'Tab 1',\n backgroundColor:'#fff'\n});\n\nvar button = Ti.UI.createButton({\n title:'play sound',\n width:200,\n height:100\n});\nbutton.addEventListener('click', function(){\n\tvar player = Ti.Media.createSound({url:\"cricket.wav\"});\n\tplayer.addEventListener('complete', function(e){\n\t\tTi.API.info('------------------------' + e.type);\n\t\tTi.API.info('------------------------' + e.source);\n\t\tTi.API.info('------------------------' + e.bubbles);\n\t\tTi.API.info('------------------------' + e.cancelBubble);\n\t})\n\tplayer.play();\n});\nwin1.add(button);\n \nwin1.open();\n{code}\n2. After the sound completes, look at logcat and you should see the following:\n\n{code}\nI/TiAPI (13949): ------------------------complete\nI/TiAPI (13949): ------------------------[object Sound]\nI/TiAPI (13949): ------------------------false\nI/TiAPI (13949): ------------------------false\n{code}", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-04T02:50:02.000+0000", "updated": "2013-03-04T02:50:02.000+0000" }, { "id": "243799", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After looking through the docs, there are some places where Android doesn't generate error issues even though it should have.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-23T01:05:05.000+0000", "updated": "2013-03-23T01:05:05.000+0000" }, { "id": "243800", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Looks like the 'heading' event from geolocation module, and 'completed' event from sound proxy doesn't have have the error codes.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-23T01:10:32.000+0000", "updated": "2013-03-23T01:10:32.000+0000" }, { "id": "244040", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Furthermore, Ti.Media.VideoPlayerProxy has the following issues:\n* Error event is missing code, success, and error. (MW, MW and Android documentation)\n* Complete event is missing code, success, and error. (Android, iOS, MW, and all documentation)\n", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-25T23:44:01.000+0000", "updated": "2013-03-25T23:44:01.000+0000" }, { "id": "244584", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/4034", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-28T23:42:26.000+0000", "updated": "2013-03-28T23:42:26.000+0000" }, { "id": "244620", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "test case with video player to verify that it has the correct event properties after the change:\n\n{code}\nvar win1 = Titanium.UI.createWindow({ \n title:'Tab 1',\n backgroundColor:'#fff'\n});\n \n var videoPlayer = Titanium.Media.createVideoPlayer({\n top : 2,\n autoplay : true,\n backgroundColor : 'blue',\n height : 300,\n width : 300,\n mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT,\n scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT\n});\n\nvideoPlayer.url = 'movie.mp4';\n\n videoPlayer.addEventListener('complete', function(e){\n Ti.API.info('------------------------' + e.type);\n Ti.API.info('------------------------' + e.source);\n Ti.API.info('------------------------' + e.bubbles);\n Ti.API.info('------------------------' + e.cancelBubble);\n Ti.API.info('------------------------' + Object.keys(e));\n })\n\nwin1.add(videoPlayer);\n \nwin1.open();\n{code}\n\nExpected Result:\n{code}\nI/TiAPI (13216): ------------------------complete\nI/TiAPI (13216): ------------------------[object VideoPlayer]\nI/TiAPI (13216): ------------------------true\nI/TiAPI (13216): ------------------------false\nI/TiAPI (13216): ------------------------type,source,reason,bubbles,success,code,error,cancelBubble\n{code}", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-29T00:59:37.000+0000", "updated": "2013-03-29T00:59:37.000+0000" }, { "id": "244719", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull https://github.com/appcelerator/titanium_mobile/pull/4034 merged", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-03-29T21:38:28.000+0000", "updated": "2013-03-29T21:38:28.000+0000" }, { "id": "245845", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Follow-up PR: https://github.com/appcelerator/titanium_mobile/pull/4069", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-04T23:48:40.000+0000", "updated": "2013-04-04T23:48:40.000+0000" }, { "id": "414703", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T00:16:56.000+0000", "updated": "2017-03-22T00:16:56.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }