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-1160) this.webView.sendJavascript() not working when using this.onNewIntent from activity.
Date Mon, 30 Jul 2012 12:33:34 GMT
Olivier Louvignes created CB-1160:

             Summary: this.webView.sendJavascript() not working when using this.onNewIntent
from activity.
                 Key: CB-1160
             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 clean/simple facebook-connect plugin (

I'm stuck on the Android implementation, I found that in some case, using either this.success()
or this.webView.sendJavascript() do not work :

FacebookConnect SSO requires a onActivityResult() override to get an intent back from the
Facebook application. This method is never called on the plugin so I had to hack this piece
of code inside the main activity to broadcast the intent to the plugin :

    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        //String error = (data != null) ? data.getStringExtra("error") : "";
        //Log.d("CordovaActivity", "onActivityResult requestCode=" + requestCode + ", resultCode="
+ resultCode + ", error=" + error);
        super.onActivityResult(requestCode, resultCode, data);
        if(resultCode == Activity.RESULT_CANCELED) data = new Intent();
        data.putExtra("requestCode", requestCode);
        data.putExtra("resultCode", resultCode);

Id does work, as I can get the intent using onNewIntent(Intent intent) in my plugin however,
at this point no callback will work, this.webView.sendJavascript neither.

Not sure it is an actual bug, but I guess you will probably be the only one able to answer
to that. Thanks!

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