Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BFD33105DD for ; Tue, 1 Jul 2014 08:34:24 +0000 (UTC) Received: (qmail 6200 invoked by uid 500); 1 Jul 2014 08:34:24 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 6176 invoked by uid 500); 1 Jul 2014 08:34:24 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 6165 invoked by uid 99); 1 Jul 2014 08:34:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jul 2014 08:34:24 +0000 Date: Tue, 1 Jul 2014 08:34:24 +0000 (UTC) From: "Syed shahryar (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-7058) Cordova onresume event not working/firing on Android 4.0.3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-7058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14048637#comment-14048637 ] Syed shahryar commented on CB-7058: ----------------------------------- the code is fine as I managed to force the device to fire the resume event. Here is what I had to do while my test app was running: - press the shutdown button to lock the device - press shutdown again that will show the lock pattern - once the pattern is entered/matched and app shows the event is fired I am using Sony Tablet for testing. This is a bug in Cordova. > Cordova onresume event not working/firing on Android 4.0.3 > ---------------------------------------------------------- > > Key: CB-7058 > URL: https://issues.apache.org/jira/browse/CB-7058 > Project: Apache Cordova > Issue Type: Bug > Affects Versions: 3.3.0 > Reporter: Syed shahryar > Priority: Blocker > > Here is my event handler code: > /** Code **/ > // > function onResume() { > console.log( 'on resume' ); > } > // > function onDeviceReady(){ > document.addEventListener( "pause", function(){console.log('on pause');}, false); > document.addEventListener( "resume", onResume, false); > } > // > function onLoad() { > document.addEventListener( "deviceready", onDeviceReady, false ); > } > /*********/ > I have tried weinre and Android ddms tools for troubleshooting but did not see the "on resume" msg logged on console when I switch between apps during testing on the device. Pause event is working fine however and logging messages. > > I am also seeing the underlying on resume events getting called but my event handler for some reason does not get called. Here is what I see in logs. > 06-30 23:49:50.500: I/CordovaLog(6118): Found start page location: index.html > 06-30 23:49:50.500: D/CordovaActivity(6118): Resuming the App > 06-30 23:49:50.500: D/CordovaActivity(6118): CB-3064: The errorUrl is null > 06-30 23:49:50.510: D/CordovaActivity(6118): onMessage(onPageStarted,file:///android_asset/www/index.html) > 06-30 23:49:50.610: D/CordovaActivity(6118): onMessage(spinner,stop) > FYI: Code works fine on iOS simulator. > Any ideas why this may be happening and how to fix it? -- This message was sent by Atlassian JIRA (v6.2#6252)