Skip to content

Commit

Permalink
Merge pull request #1 from ignacysokolowski/patch-1
Browse files Browse the repository at this point in the history
Fix code block in README.md
  • Loading branch information
piotrekpa committed Oct 17, 2012
2 parents 27e147c + 08d9122 commit 5ab5e8e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Expand Up @@ -9,7 +9,7 @@ AndroidInterface enables you to execute methods from Android JavascriptInterface
Create class, which inherits for the JavascriptInterfaceAbstract from android/JavascriptInterfaceAbstract.java file.

public class FooJSInterface extends JavascriptInterfaceAbstract {

}

Implement your methods.
Expand All @@ -18,15 +18,15 @@ Remeber that this method:
* the last argument must be a string variable - this is the callback,
* returns results by executing this.runCallback(String callback, JSONArray results) method. The result is an optional argument


```
import org.json.JSONArray;
import android.webkit.WebView;
public class FooJSInterface extends JavascriptInterfaceAbstract {

public SomeJSInterface(WebView web){
super(web);
}

public void bar(String callback){
JSONArray result;
// block of code
Expand All @@ -36,8 +36,9 @@ Remeber that this method:
result.put(true);
this.runCallback(callback, result);
}

}
```

Add to your webView in activity. For example:

Expand Down

0 comments on commit 5ab5e8e

Please sign in to comment.