{ "id": "150209", "key": "TIMOB-19633", "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": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-10-12T05:29:05.000+0000", "created": "2015-08-06T10:40:39.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "ios", "qe-5.2.0" ], "versions": [ { "id": "16919", "description": "Critical updates", "name": "Release 4.1.1", "archived": true, "released": true, "releaseDate": "2015-07-15" } ], "issuelinks": [ { "id": "49861", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "153211", "key": "TIMOB-19996", "fields": { "summary": "iOS: deadlock occurs on sound.play", "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": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-01-22T00:43:15.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "This command stops iPod music, while it shouldn't.\r\n\r\nTi.Media.audioSessionCategory = Ti.Media.AUDIO_SESSION_CATEGORY_AMBIENT;\r\n\r\nSomeone found a workaround for this, see [this link|https://community.appcelerator.com/topic/2819/ios-app-stops-device-audio-at-startup-music-app-pandora-etc/2]\r\n\r\nSummarized:\r\n\r\n>>I ended up solving this problem by editing TiApp.m on the SDK and adding the following code to didFinishLaunchingWithOptions:\r\n\r\nNSError *setCategoryError = nil;\r\nBOOL audioOk = [[AVAudioSession sharedInstance]\r\n setCategory: AVAudioSessionCategoryAmbient\r\n error: &setCategoryError];", "attachment": [ { "id": "56400", "filename": "alloy.js", "author": { "name": "nsndvd", "key": "nsndvd", "displayName": "Davide Ensini", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-08-12T10:24:33.000+0000", "size": 602, "mimeType": "text/javascript" } ], "flagged": false, "summary": "iOS: AUDIO_SESSION_CATEGORY_AMBIENT stops background music", "creator": { "name": "nsndvd", "key": "nsndvd", "displayName": "Davide Ensini", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "nsndvd", "key": "nsndvd", "displayName": "Davide Ensini", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS\r\nTitanium 3.5.1 (It should affect > 3.5.0 GA)\r\n", "closedSprints": [ { "id": 494, "state": "closed", "name": "2015 Sprint 20 SDK", "startDate": "2015-09-26T00:29:19.845Z", "endDate": "2015-10-10T00:29:00.000Z", "completeDate": "2015-10-12T05:33:30.964Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "359550", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~nsndvd],\r\n\r\nCould you please share a runnable test case with steps to reproduce and environment so that we can figure out this issue.\r\n\r\nThanks.", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2015-08-11T09:55:58.000+0000", "updated": "2015-08-11T09:55:58.000+0000" }, { "id": "359558", "author": { "name": "nsndvd", "key": "nsndvd", "displayName": "Davide Ensini", "active": true, "timeZone": "Europe/Berlin" }, "body": "Nope, because, unless there is a way to use the ipod player in the simulator, this can only be reproduced on real devices, and you would need provisioning profiles and stuff. So you can try this way:\r\n\r\nOn any project you have ready to be deployed on an iOS device, in alloy.js add the line:\r\nTi.Media.audioSessionCategory = Ti.Media.AUDIO_SESSION_CATEGORY_AMBIENT;\r\n\r\nDeploy, then launch music, and start the app (start, not resume). Music will stop.", "updateAuthor": { "name": "nsndvd", "key": "nsndvd", "displayName": "Davide Ensini", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-08-11T15:08:40.000+0000", "updated": "2015-08-11T15:08:40.000+0000" }, { "id": "359597", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "[~nsndvd] please provide a test case, we can test on our devices", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-08-11T21:07:49.000+0000", "updated": "2015-08-11T21:07:49.000+0000" }, { "id": "359655", "author": { "name": "nsndvd", "key": "nsndvd", "displayName": "Davide Ensini", "active": true, "timeZone": "Europe/Berlin" }, "body": "Please find at this [link|https://dl.dropboxusercontent.com/u/63904025/daddyhunt/test_case_audio_session_category_ambient.zip] a titanium alloy project that i just generated with studio. I only added the following line in alloy.js.\r\nTi.Media.audioSessionCategory = Ti.Media.AUDIO_SESSION_CATEGORY_AMBIENT;\"\r\nI'm also attaching the alloy.js file.\r\n\r\nYou have to add an app id in tiapp.xml, I'm not giving you mine because you need a matching provisioning profile.\r\n\r\nI tested this on an iphone4 with iOS 7. Music from iPod is stopped when the app is started (not resumed).\r\n\r\nThanks", "updateAuthor": { "name": "nsndvd", "key": "nsndvd", "displayName": "Davide Ensini", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-08-12T10:26:07.000+0000", "updated": "2015-08-12T10:26:07.000+0000" }, { "id": "366472", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR Here: https://github.com/appcelerator/titanium_mobile/pull/7270\r\nApproved and merged.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-10-12T05:28:55.000+0000", "updated": "2015-10-12T05:28:55.000+0000" }, { "id": "375082", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, Tested demo code both with speaker / headphone output. App no longer pauses background music when launched.\r\n\r\nTested on:\r\niPhone 6s Plus Device (9.2) & iPhone 6 Plus Device (8.4) \r\nMac OSX El Capitan 10.11 (15A284)\r\nTi SDK: 5.2.0.v20160114021251\r\nAppc NPM: 4.2.3-1\r\nApp CLI: 5.2.0-231\r\nXcode 7.2\r\nNode v4.2.3\r\n\r\n*Closing Ticket.*\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-01-21T18:54:55.000+0000", "updated": "2016-01-21T18:54:55.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }