[jira] [Created] (CB-11476) iOS app audio keeps playing in background while paused

2016-06-23 Thread Jonathan Bencomo (JIRA)
Jonathan Bencomo created CB-11476:
-

 Summary: iOS app audio keeps playing in background while paused
 Key: CB-11476
 URL: https://issues.apache.org/jira/browse/CB-11476
 Project: Apache Cordova
  Issue Type: Bug
  Components: CLI, iOS
Affects Versions: 3.5.0
 Environment: Intel XDK, Cordova, iOS
Reporter: Jonathan Bencomo
Assignee: Shazron Abdullah


Hello,

I got the following line of code from an older issue:
(code used in the html index file)

"// register these after deviceready event fires
document.addEventListener("resign", onResign, false);
document.addEventListener("active", onActive, false);

function onResign() {
console.log("on resign");
}
function onActive() {
console.log("on active");
}"

>From this issue’s link: 
>https://issues.apache.org/jira/browse/CB-115?jql=project%20%3D%20CB%20AND%20text%20~%20pause


That code is being used to pause the app while the notification centre, or 
control centre are displayed – it is also used anytime there is a notification 
received on the screen (like a low battery indication or a phone call). The 
code works perfectly, except that it does not stop the audio while pausing the 
game. The audio keeps playing in background, while the game is paused.

Also, now that I have introduced this code - my game behaves differently when I 
resume it after a while / before using the mentioned code I could leave the 
game in the background for hours and then return to it and the game was going 
to be exactly where I left it. Now with the new code, when I return to the game 
after minutes of being idle I see the game where I left it but for like 3 
seconds only and then the game restarts. Is there a relation between the code 
used and this bug? I believe there is because that was not happening before 
using it,


Many thanks in advance for your help,
I am using an iPhone 6S as a test device and Intel XDK 3400 to build the game,

Also: I have raised this issue to the INTEL team with no reply so far, 
https://software.intel.com/en-us/forums/intel-xdk/topic/643682

BR




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-115) Pause/Resume events do not fire when locking/unlocking screen in ios < 5

2016-06-22 Thread Jonathan Bencomo (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15344977#comment-15344977
 ] 

Jonathan Bencomo commented on CB-115:
-

Hello @Shazron Abdullah , 
Many thanks for posting that code here, it worked for me.
But despite pausing the game the audio keeps playing in the background - do you 
know a way of stoping the audio too? 

Also, now that I have introduced your code - my game behaves differently when I 
resume it after a while / before using the mentioned code I could leave the 
game in the background for hours and then return to it and the game was going 
to be exactly where I left it. Now with the new code, when I return to the game 
after minutes of being idle I see the game where I left it but for like 3 
seconds only and then the game restarts. Is there a relation between the code 
used and this bug? I believe there is because that was not happening before 
using it,

Many thanks in advance for your help, 
I am using an iPhone 6S as a test device and Intel XDK 3400 to build the game, 

BR


> Pause/Resume events do not fire when locking/unlocking screen in ios < 5
> 
>
> Key: CB-115
> URL: https://issues.apache.org/jira/browse/CB-115
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: iOS
>Affects Versions: 1.2.0
> Environment: iOS < 5
>Reporter: Avidan Chen
>Assignee: Shazron Abdullah
>  Labels: iOS4
> Fix For: 1.6.0
>
>
> I have tested this in the iOS simulator (4.3.2) and an actual device running 
> iOS 4.2.1. When locking the screen with the power button and then unlocking 
> it, in iOS 5, the pause and resume events fire properly.
> However, in iOS 4, these events do not fire.
> Anyone else seen this? Is there any fix on the way?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org