Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code block in README.md #1

Merged
merged 1 commit into from
Oct 17, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
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