incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier Louvignes (JIRA)" <>
Subject [jira] [Created] (CB-1161) Javascript callbacks are broken after using runOnUIThread() with Facebook SSO
Date Mon, 30 Jul 2012 14:19:34 GMT
Olivier Louvignes created CB-1161:

             Summary: Javascript callbacks are broken after using runOnUIThread() with Facebook
                 Key: CB-1161
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 2.0.0
            Reporter: Olivier Louvignes
            Assignee: Joe Bowser

I've been working on a alternative post-2.0 FacebookConnect plugin that would not require
the javascript SDK (check there : 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 :

You can check the login function where the JS call is made :

final FacebookConnect me = this;
			this.authorizeDialogListener = new AuthorizeDialogListener(me, callbackId);
			Runnable runnable = new Runnable() {
				public void run() {
					me.getFacebook().authorize(me.cordova.getActivity(), permissions, me.authorizeDialogListener);

When onActivityResult returns, JS is off :(

	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 :(

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:!default.jspa
For more information on JIRA, see:


View raw message