{ "id": "121709", "key": "TIMOB-15598", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-11-12T16:28:13.000+0000", "created": "2013-10-28T19:05:58.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-16T20:30:53.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": "12956", "name": "Tizen", "description": "HTML5 os for phones tablets, IVI" } ], "description": "User is not able to play audio in the background when the app is minimized or when the lockscreen is on.", "attachment": [], "flagged": false, "summary": "Tizen: Cannot play audio in the background when the app is minimized or when the lockscreen is on.", "creator": { "name": "ralcocer", "key": "ralcocer", "displayName": "Ricardo Alcocer", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ralcocer", "key": "ralcocer", "displayName": "Ricardo Alcocer", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "277020", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can we get steps to reproduce the issue?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-28T20:16:09.000+0000", "updated": "2013-10-28T20:16:09.000+0000" }, { "id": "277048", "author": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Ingo,\r\n\r\nHere is the code for the appropriate page. It's pretty standard, and works well with iOS and Android, but with Tizen, as soon as the lockscreen is engaged, or the home button is clicked, audio cuts off. I'm testing on an actual device, I can't run the emulator until HAXM is updated for Maverick\r\n\r\n{code}\r\nvar win = Titanium.UI.currentWindow;\r\nvar media = win.response; //this object contains all information (artist, song name, url, etc. All works)\r\nTi.App.player.url = media.item_play_url; /The player is created in app.js so it is global. Tried making it local to this JS file, no change\r\n\r\n\r\nTi.App.player.play();\r\n\t\r\n\r\nvar artist_label = Titanium.UI.createLabel({\r\n color : '#000',\r\n right : 0,\r\n left : 0,\r\n top : 0,\r\n text : media.item_artist_name,\r\n textAlign:'center',\r\n height : Ti.UI.SIZE,\r\n className : 'row',\r\n font : {\r\n fontFamily : 'Helvetica Neue',\r\n fontSize : '30dp',\r\n fontWeight : 'bold'\r\n }\r\n});win.add(artist_label);\r\n\r\nvar album_label = Titanium.UI.createLabel({\r\n color : '#000',\r\n right : 0,\r\n left : 0,\r\n top : 0,\r\n text : media.item_album_name,\r\n textAlign:'center',\r\n height : Ti.UI.SIZE,\r\n className : 'row',\r\n font : {\r\n fontFamily : 'Helvetica Neue',\r\n fontSize : '24dp',\r\n fontWeight : 'bold'\r\n }\r\n});win.add(album_label);\r\n\r\n\r\nvar song_label = Titanium.UI.createLabel({\r\n color : '#000',\r\n right : 0,\r\n left : 0,\r\n top : 0,\r\n text : media.item_song_name,\r\n textAlign:'center',\r\n height : Ti.UI.SIZE,\r\n className : 'row',\r\n font : {\r\n fontFamily : 'Helvetica Neue',\r\n fontSize : '18dp',\r\n fontWeight : 'bold'\r\n }\r\n});win.add(song_label);\r\n\r\nvar startStopButton = Titanium.UI.createButton({\r\n title:'Start/Stop Streaming',\r\n top:10,\r\n width:200,\r\n height:40\r\n});\r\n\r\nvar pauseResumeButton = Titanium.UI.createButton({\r\n title:'Pause/Resume Streaming',\r\n top:10,\r\n width:200,\r\n height:40,\r\n enabled:true\r\n});\r\n\r\nwin.add(startStopButton);\r\nwin.add(pauseResumeButton);\r\n\r\n// allowBackground: true on Android allows the \r\n// player to keep playing when the app is in the \r\n// background.\r\n \r\nstartStopButton.addEventListener('click',function() {\r\n // When paused, playing returns false.\r\n // If both are false, playback is stopped.\r\n if (Ti.App.player.playing || Ti.App.player.paused)\r\n {\r\n Ti.App.player.stop();\r\n Ti.App.player.url = media.item_play_url;\r\n Ti.App.player.start();\r\n pauseResumeButton.enabled = true;\r\n if (Ti.Platform.name === 'android')\r\n { \r\n Ti.App.player.release();\r\n } \r\n }\r\n else\r\n {\r\n \tTi.App.player.url = media.item_play_url;\r\n Ti.App.player.start();\r\n pauseResumeButton.enabled = true;\r\n }\r\n});\r\n\r\npauseResumeButton.addEventListener('click', function() {\r\n if (Ti.App.player.paused) {\r\n Ti.App.player.start();\r\n }\r\n else {\r\n Ti.App.player.pause();\r\n }\r\n});\r\n\r\nTi.App.player.addEventListener('progress',function(e) {\r\n Ti.API.info('Time Played: ' + Math.round(e.progress) + ' milliseconds');\r\n});\r\n\r\nTi.App.player.addEventListener('change',function(e)\r\n{\r\n Ti.API.info('State: ' + e.description + ' (' + e.state + ')');\r\n});\r\n{code}", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-28T22:26:30.000+0000", "updated": "2013-11-07T16:42:51.000+0000" }, { "id": "277491", "author": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Ingo, \r\nHave you had time to figure out a fix for this?", "updateAuthor": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-31T12:38:17.000+0000", "updated": "2013-10-31T12:38:17.000+0000" }, { "id": "278960", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~joshlewis] According to our research this is expected behavior for web-based apps where the audio stops. Evidently the Samsung app store reviewers block app that continue play music after window go to background. Do you have information that says otherwise?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-11T18:17:33.000+0000", "updated": "2013-11-11T18:17:33.000+0000" }, { "id": "278963", "author": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Ingo, \r\n\r\nI've read the same, but I assumed creating a Tizen app would make this native, and not web-based. Is that not the case?\r\n", "updateAuthor": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-11T18:26:24.000+0000", "updated": "2013-11-11T18:26:24.000+0000" }, { "id": "279043", "author": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ingo, according to a contact at Samsung, they have another developer who is working on a music app, and it plays in the background and when the screen is locked.", "updateAuthor": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-11T23:17:01.000+0000", "updated": "2013-11-11T23:17:01.000+0000" }, { "id": "279048", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is it a web app or a native app? To your previous question, Tizen has two versions, a web version and a native version. The web came first, and that is the platform we implemented. Samsung followed with a native platform and we will look at supporting that in the future.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-11T23:31:19.000+0000", "updated": "2013-11-11T23:31:19.000+0000" }, { "id": "279052", "author": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I believe there's is native, and I assumed that Appcelerator's was well..", "updateAuthor": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-12T00:02:46.000+0000", "updated": "2013-11-12T00:02:46.000+0000" }, { "id": "279064", "author": { "name": "joshlewis", "key": "joshlewis", "displayName": "Josh Lewis", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Ingo, \r\n\r\nJust an FYI, I was able to get it working. In the tiapp.xml file, in the tizen group, you have to add\r\n\r\n{code}\r\n\r\n{code}\r\n\r\nAnd it will play in the background, and while navigating other apps.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-12T01:40:01.000+0000", "updated": "2013-11-12T16:27:32.000+0000" }, { "id": "279144", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Great to hear. I'll mark this ticket as invalid since all it was was a configuration issue, but let me know if we need to do anything else.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-12T16:28:13.000+0000", "updated": "2013-11-12T16:28:13.000+0000" }, { "id": "412899", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-16T20:30:53.000+0000", "updated": "2017-03-16T20:30:53.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }