Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BA74299BA for ; Mon, 30 Jul 2012 17:19:36 +0000 (UTC) Received: (qmail 69105 invoked by uid 500); 30 Jul 2012 17:19:35 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 69035 invoked by uid 500); 30 Jul 2012 17:19:35 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 68919 invoked by uid 99); 30 Jul 2012 17:19:35 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2012 17:19:35 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 1E199142860 for ; Mon, 30 Jul 2012 17:19:35 +0000 (UTC) Date: Mon, 30 Jul 2012 17:19:35 +0000 (UTC) From: "Joe Bowser (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1473666355.116820.1343668775124.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1616296399.116114.1343657974954.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (CB-1161) Javascript callbacks are broken in 1.9/2.0 after using runOnUIThread() (ie. Facebook SSO) 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-1161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425022#comment-13425022 ] Joe Bowser commented on CB-1161: -------------------------------- Using your plugin against the latest master which is based on 2.0 and has no change to the CordovaInterface, I'm seeing the success callbacks all work. I recommend that you use the latest and test it out with that. I'm not seeing the issue on this end on my Galaxy Nexus. > Javascript callbacks are broken in 1.9/2.0 after using runOnUIThread() (ie. Facebook SSO) > ----------------------------------------------------------------------------------------- > > Key: CB-1161 > URL: https://issues.apache.org/jira/browse/CB-1161 > Project: Apache Cordova > Issue Type: Bug > Components: Android > Affects Versions: 2.0.0 > Reporter: Olivier Louvignes > Assignee: Joe Bowser > Labels: android, plugin > > I've been working on a alternative post-2.0 FacebookConnect plugin that would not require the javascript SDK (check there : https://github.com/mgcrea/cordova-facebook-connect). But I'm stuck after the AuthorizeDialog returns, calls to success() or sendJavascript() does not work anymore. > So I'm not sure if I just missed something or if something broke in 1.9 / 2.0 on this. > The source code can be found there : https://github.com/mgcrea/cordova-facebook-connect/blob/master/Android/src/org/apache/cordova/plugins/FacebookConnect.java > You can check the login function where the JS call is made : > {code:java} > final FacebookConnect me = this; > this.authorizeDialogListener = new AuthorizeDialogListener(me, callbackId); > this.cordova.setActivityResultCallback(this); > Runnable runnable = new Runnable() { > public void run() { > me.getFacebook().authorize(me.cordova.getActivity(), permissions, me.authorizeDialogListener); > }; > }; > this.cordova.getActivity().runOnUiThread(runnable); > {code} > When onActivityResult returns, JS is off :( > {code:java} > @Override > public void onActivityResult(int requestCode, int resultCode, Intent data) { > super.onActivityResult(requestCode, resultCode, data); > this.getFacebook().authorizeCallback(requestCode, resultCode, data); > //this.webView.sendJavascript("window.alert('test')"); //@todo not working :( > } > {code} > Would love to get some feedback on this as I'm clearly not goog enough in Java dev to fully understand what happens there. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira